Index Page
cspice_str2et
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_STR2ET converts a string representing an epoch to a
   double precision value representing the number of TDB seconds
   past the J2000 epoch corresponding to the input epoch.

I/O


   Given:

      str   an array of strings recognized by SPICE as an epoch.

            [n,c1] = size(str); char = class(str)

               or

            [1,n] = size(str); cell = class(str)

   the call:

      et = cspice_str2et( str )

   returns:

      et   the value(s) representing TDB seconds past the J2000 epoch that 
           corresponds to the 'str'.

           [1,n] = size(et); double = class(et)

           'et' returns with the same vectorization measure, N, as 'str'.

   Note: Reference the function cspice_tsetyr for information concerning
   the translation of two digit representations of the century count.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      %
      % Load a leapseconds kernel.
      %
      cspice_furnsh( 'standard.tm' )

      %
      % Define the epoch as a string.
      %
      date = 'Thu Mar 20 12:53:29 PST 1997';

      %
      % Convert a string to ephemeris time (ET).
      %
      et = cspice_str2et( date );

      disp( 'Scalar:' )
      txt = sprintf( '%20.8f', et );
      disp( txt )

      disp( ' ' )

      %
      % Define a vector of time strings:
      %
      time = strvcat( 'JD2454000.', ...
                      'JD2464000.', ...
                      'JD2474000.', ...
                      'JD2484000.', ...
                      'JD2494000.' );

      %
      % Convert the array of time strings 'time' to
      % and array of ephemeris times 'et'.
      %
      et = cspice_str2et( time );

      disp( 'Vector:' )
      fprintf( '%20.8f\n', et' );

      %
      % It's always good form to unload kernels after use,
      % particularly in MATLAB due to data persistence.
      %
      cspice_kclear

  MATLAB outputs:

     Scalar:
       -87836728.81438904

     Vector:
       212112064.18239054
      1076112064.18491936
      1940112064.18430591
      2804112064.18263292
      3668112064.18564129

Particulars


   None.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine str2et_c.

   MICE.REQ
   TIME.REQ

Version



   -Mice Version 1.0.1, 06-JAN-2015, EDW (JPL)

       Edited I/O section to conform to NAIF standard for Mice documentation.

   -Mice Version 1.0.0, 22-NOV-2005, EDW (JPL)

Index_Entries


    Convert a string to TDB seconds past the J2000 epoch


Wed Apr  5 18:00:35 2017