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. 

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

I/O

   
   Given:
   
      sc   the scalar integer NAIF ID of the spacecraft whose 
           encoded SCLK value at the epoch 'et' is desired
   
      et   the scalar or N-vector of double precision epochs, 
           specified as ephemeris seconds past J2000
   
   the call:
   
      cspice_sce2c, sc, et, sclkdp
   
   returns:
   
      sclkdp   the double precision scalar or N-vector encoded SCLK 
               value corresponding to 'et' for 'sc'

               'sclkdp' returns with the same measure of vectorization (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 s-clock 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.
      ;;
      cspice_str2et, event_time, et
   
      ;;
      ;; Convert the ephemeris time to the encoded s-clock
      ;; format.
      ;;
      cspice_sce2c, SC, et, sclkdp
      print, format='(F16.6)', sclkdp
      
      print

      ;;
      ;; Vectorized use, a vector of UTC times.
      ;;
      event_time = [ '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.
      ;;
      cspice_str2et, event_time, et
      
      ;;
      ;; Convert the 'et' array to the encoded
      ;; spacecraft clock.
      ;;
      cspice_sce2c, SC, et, sclkdp
      
      for i=0, 2 do begin
         print, format='(3F16.6)', sclkdp[i]
      endfor

      ;;
      ;; It's always good form to unload kernels after use,
      ;; particularly in IDL due to data persistence.
      ;;
      cspice_unload, SCLK
      cspice_unload, 'standard.tm'

   IDL outputs in scalar case:  
   
      985327949.999971

   IDL outputs in vector case:

      985387950.043701
      985447950.087433
      985507950.131163

Particulars


   None.

Required Reading


   ICY.REQ
   SCLK.REQ

Version


   -Icy Version 1.1.1, 05-FEB-2008, EDW (JPL)

      Edited I/O section, replaced comment
      
         "returns with the same order"
      
      with
      
         "returns with the same measure of vectorization"
      
   -Icy Version 1.1.0, 14-OCT-2005, EDW (JPL)

       Added capability to process 'et' as vector
       input returning vector 'sclkdp' on output.

   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries

 
   ephemeris time to continuous spacecraft_clock ticks 
 



Wed Apr  5 17:58:03 2017