Index Page
cspice_sce2c
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_SCE2C converts ephemeris seconds past J2000 (ET) to
   continuous encoded spacecraft clock ("ticks").  Non-integral
   tick values may be returned.

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:

      sclkdp = cspice_sce2c( sc, et )

   returns:

      sclkdp   the encoded SCLK value(s) corresponding to 'et' 
               for 'sc'.

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

               'sclkdp' 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),
      % and SCLK kernel.
      %
      SC         = -32;
      SCLK       = '/kernels/voyager2/sclk/vg200004.tsc';
      event_time = '1979 JUL 05 21:50:21.23379';

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

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

      %
      % Convert the ephemeris time to the encoded SCLK
      % format.
      %
      sclkdp = cspice_sce2c( SC, et );
      txt    = sprintf( ' %16.6f', sclkdp );
      disp( txt )

      %
      % 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 'et' array to the encoded
      % spacecraft clock.
      %
      sclkdp = cspice_sce2c( SC, et );

      for i=1:3
         txt = sprintf( ' %16.6f', sclkdp(i) );
         disp( txt )
      end

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

   MATLAB outputs:

      Scalar:
       985327949.999971

      Vector:
       985387950.043701
       985447950.087433
       985507950.131163

Particulars


   None.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine sce2c_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 continuous spacecraft_clock ticks


Wed Apr  5 18:00:34 2017