Index Page
cspice_sce2s
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_SCE2S converts an epoch specified as ephemeris seconds
   past J2000 (ET) value describing a date to a character string
   representation of a spacecraft clock value (SCLK).

I/O


   Given:

      sc   the NAIF ID of the spacecraft clock whose encoded SCLK value 
           at the epoch 'et' is desired.

           [1,1] = size(sc); int32 = class(sc)

      et   the ephemeris time(s) expressed as ephemeris seconds
           past J2000.

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

   the call:

      sclkch = cspice_sce2s( sc, et )

   returns:

      sclkch   the representation(s) of spacecraft 'sc' clock count that 
               corresponds to 'et'.

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

               'sclkch' returns with the same vectorization measure (N)
               as 'et'.

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 the leapseconds kernel for time conversion.
      %
      cspice_furnsh( 'standard.tm' )

      %
      % Assign values for the spacecraft ID (Voyager2),
      % SCLK kernel.
      %
      SC         = -32;
      SCLK       = '/kernels/voyager2/sclk/vg200004.tsc';
      event_time = '1979 JUL 05 21:50:21.23379';

      %
      % Load the SCLK kernel.
      %
      cspice_furnsh( SCLK )

      %
      % Convert the time string to ephemeris time.
      %
      et = cspice_str2et( event_time );

      %
      % Convert the ephemeris time to the corresponding
      % SCLK string appropriate for this spacecraft
      %
      sclkch = cspice_sce2s( SC, et );

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

      txt = sprintf( 'SCLK string    : %s', sclkch );
      disp( txt )

      disp(' ')

      %
      % Vectorized use, a vector of UTC times.
      %
      event_time =  strvcat( '1979 JUL 05 22:50:21.23379', ...
                             '1979 JUL 05 23:50:21.23379', ...
                             '1979 JUL 06 00:50:21.23379' );

      %
      % Convert the time strings to ET.
      %
      et = cspice_str2et( event_time );

      %
      % Convert the ephemeris time to the corresponding
      % SCLK string appropriate for this spacecraft
      %
      sclkch = cspice_sce2s( SC, et );

      disp( 'Vector:' )
      for i=1:3

         txt = sprintf( 'Ephemeris time : %20.8f',  et(i) );
         disp( txt )

         txt = sprintf( 'SCLK string    : %s', sclkch(i,:) );
         disp( txt )
         disp (' ')

      end

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

   MATLAB outputs:

      Scalar
      Ephemeris time :  -646668528.58223021
      SCLK string    : 2/20538:39:768

      Vector:
      Ephemeris time :  -646664928.58223140
      SCLK string    : 2/20539:54:768

      Ephemeris time :  -646661328.58223248
      SCLK string    : 2/20541:09:768

      Ephemeris time :  -646657728.58223367
      SCLK string    : 2/20542:24:768

Particulars


   None.

Required Reading


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

   MICE.REQ
   SCLK.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, 18-APR-2006, EDW (JPL)

Index_Entries


   ephemeris time to spacecraft_clock string


Wed Apr  5 18:00:34 2017