Index Page
cspice_et2utc
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_ET2UTC converts an input time from ephemeris seconds 
   past J2000 to Calendar, Day-of-Year, or Julian Date format, UTC. 

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

I/O

   
   Given:
   
      et       the scalar double precision or N-vector of ephemeris 
               time expressed as ephemeris seconds past J2000.
   
      format   the scalar string describing the format of the output time
               string, it may be any of the following:
               
                  "C"      Calendar format, UTC
   
                  "D"      Day-of-Year format, UTC
                  
                  "J"      Julian Date format, UTC
   
                  "ISOC"   ISO Calendar format, UTC
   
                  "ISOD"   ISO Day-of-Year format, UTC

      prec     the scalar integer number of decimal places of precision to 
               which fractional seconds (for Calendar and Day-of-Year
               formats) or days (for Julian Date format) are to be 
               computed. 
   
   the call:
   
      cspice_et2utc, et, format, prec, utcstr
   
   returns:
   
      utcstr   the scalar or N-vector output time strings equivalent 
               to the input epoch 'et', in the specified 'format'.
                

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

   Use of this routine requires a loaded leapseconds kernel.
   

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.

      ;;
      ;; Define an arbitrary ephemeris time.
      ;;
      et     = -527644192.5403653d
      format = 'J'
      prec   = 6
      SIZE   = 5

      ;;
      ;; Load a leapseconds kernel.
      ;;
      cspice_furnsh, 'standard.tm'
 
      ;;
      ;; Convert the ephemeris time to Julian Date
      ;; 'format'. Define precision to 6 decimal
      ;; places.
      ;;
      cspice_et2utc, et, format, prec, utcstr
      print, 'Scalar:'
      print, 'ET              : ', et
      print, 'Converted output: ', utcstr
      print

      ;;
      ;; Create an array of ephemeris times beginning
      ;; at -527644192.5403653 with graduations of 10000.0
      ;; ephemeris seconds.
      ;;
      et     = 10000.d * dindgen( SIZE ) -527644192.5403653d 
      format = 'C'

      ;;
      ;; Convert the array of ephemeris times 'et' to an
      ;; array of UTC strings, 'utcstr', in calendar 
      ;; 'format'.
      ;;
      cspice_et2utc, et, format, prec, utcstr
      
      print, 'Vector:'
      for i=0, (SIZE-1) do begin
         print, 'ET              : ', et[i]
         print, 'Converted output: ', utcstr[i]
         print
      endfor

   IDL outputs:
   
      Scalar:
      ET              :   -5.2764419e+08
      Converted output: JD 2445438.006415

      Vector:
      ET              :   -5.2764419e+08
      Converted output: 1983 APR 13 12:09:14.274000

      ET              :   -5.2763419e+08
      Converted output: 1983 APR 13 14:55:54.274001

      ET              :   -5.2762419e+08
      Converted output: 1983 APR 13 17:42:34.274001

      ET              :   -5.2761419e+08
      Converted output: 1983 APR 13 20:29:14.274002

      ET              :   -5.2760419e+08
      Converted output: 1983 APR 13 23:15:54.274002

Particulars


   None.

Required Reading


   ICY.REQ
   TIME.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, 12-SEP-2004, EDW (JPL)

       Added capability to process vector 'et' input
       returning a vector 'utcstr' on output.

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

Index_Entries


   ephemeris time to utc




Wed Apr  5 17:58:01 2017