Index Page
cspice_deltet
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_DELTET returns value of Delta ET (ET-UTC)
   for an input epoch.

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

I/O

   
   Given:

      epoch    the double precision scalar or N-vector of 
               epochs at which "delta ET" is to be computed.
               'epoch' may be either UTC or ephemeris seconds
               past J2000, as specified by 'eptype'. 

      eptype   the scalar string indicating the type of input 
               epoch. It may be either of the following: 

                  "UTC"   UTC seconds past J2000 UTC.

                  "ET"    Ephemeris seconds past J2000 TDB,
                          also known as barycentric
                          dynamical time (TDB).

   the call:

      cspice_deltet, epoch, eptype, delta

   returns:

      delta   the double precision scalar or N-vector 
              values of

                 "delta ET" = ET - UTC 

              at the input 'epoch'. This is added to UTC to
              give ET, or subtracted from ET to give UTC.

              'delta' return with the same measure of 
              vectorization (N) as 'epoch'.

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 leapsecond file.
      ;;
      cspice_furnsh, 'standard.tm

      ;;
      ;; Define times of interest and the array size
      ;; parameter.
      ;;
      SIZE     = 2004 - 1997 +1
      UTC_1997 = 'Jan 1 1997'
      UTC_2004 = 'Jan 1 2004'

      ;;
      ;; Convert the UTC time strings to ET.
      ;;
      cspice_str2et, UTC_1997, et_1997
      cspice_str2et, UTC_2004, et_2004

      ;;
      ;; Calculate the ET-UTC delta at Jan 1 1997
      ;; and Jan 1 2004.
      ;;
      cspice_deltet, et_1997, 'ET', delt_1997
      cspice_deltet, et_2004, 'ET', delt_2004
      
      print, 'Scalar:'
      print, 'Delta 1997: ', delt_1997
      print, 'Delta 2004: ', delt_2004

      ;;
      ;; Given an array of 'SIZE' ephemeris times
      ;; starting from value 'et_1997' with graduations
      ;; of the number of seconds per Julian year, return 
      ;; the ET-UTC delta value for each time.
      ;;
      et = dindgen(SIZE)*cspice_jyear() + et_1997
      cspice_deltet, et, 'ET', delt
      
      ;;
      ;; Convert 'et' to 'utc'.
      ;;
      cspice_et2utc, et, 'C', 3, utc
      
      print, 'Vector:'
      for i=0, (SIZE-1) do begin
         print, utc[i], ', delta ', delt[i]
      endfor

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

   IDL outputs:

      Scalar:
      Delta 1997:        62.183935
      Delta 2004:        64.183912
      
      Vector:
      1997 JAN 01 00:00:00.000, delta        62.183935
      1998 JAN 01 05:59:59.000, delta        63.183935
      1999 JAN 01 11:59:58.000, delta        64.183935
      2000 JAN 01 17:59:58.000, delta        64.183935
      2000 DEC 31 23:59:58.000, delta        64.183934
      2002 JAN 01 05:59:58.000, delta        64.183934
      2003 JAN 01 11:59:58.000, delta        64.183934
      2004 JAN 01 17:59:58.000, delta        64.183933

Particulars


   None.

Required Reading


   ICY.REQ
   TIME.REQ

Version


   -Icy Version 1.0.2, 29-SEP-2007, EDW (JPL)
      
      Replaced the comment fragment in the I/O section

         "return with the same order"
         
      with
      
         "return with the same measure of vectorization"

      Replaced cspice_unload call in example section with
      cspice_kclear.

   -Icy Version 1.0.1, 12-JUN-2006, EDW (JPL)

      Added the output corresponding to the example code.
      Corrected Version ID for the 20-SEP-2003 notation.

   -Icy Version 1.0.0, 20-SEP-2003, EDW (JPL)

Index_Entries

 
   difference between ephemeris time and utc 
 



Wed Apr  5 17:57:59 2017