Index Page
cspice_et2lst
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_ET2LST computes the local solar time for an object on the surface of 
   a body at a specified longitude and ephemeris epoch.

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

I/O

   
   Given:

      et         the double precision scalar or N-vector ephemeris epoch 
                 expressed in TDB seconds past the J2000 epoch at which 
                 a local time is desired. 

      body       the scalar integer NAIF ID-code of a body on which local 
                 time is to be measured. 

      lon        the scalar double precision longitude (either 
                 planetocentric or planetographic) in radians of the
                 site on the surface of body for which local time should be 
                 computed. 

      type       the scalar string describing the form of longitude supplied 
                 by the variable 'lon'. Allowed values:
                   
                    "PLANETOCENTRIC"
                    "PLANETOGRAPHIC"
                    
                 Note the case of the letters in type is insignificant.
                 Both "PLANETOCENTRIC" and "planetocentric" are recognized.
                 Leading and trailing blanks in type are not significant.

   the call:

      cspice_et2lst, et, body, lon, type, hr, mn, sc, time, ampm
   
   returns:

      hr         the scalar integer or N-vector local "hour" of the site
                 specified at the epoch 'et'. Note that an "hour" of local 
                 time does not have the same duration as an hour measured by
                 conventional clocks. It is simply a representation of 
                 an angle.

      mn         the scalar integer or N-vector number of "minutes" 
                 past the hour of the local time of the site at the epoch
                 'et'. Again note that a "local minute" is not the same 
                 as a minute you would measure with conventional clocks.

      sc         the scalar integer or N-vector number of "seconds" past 
                 the minute of the local time of the site at the epoch 'et'.
                 Again note that a "local second" is not the same as a 
                 second you would measure with conventional clocks.

      time       the scalar or N-vector of strings expressing the local time 
                 on a "24 hour" local clock.

      ampm       the scalar or N-vector of strings expressing the local time
                 on a "12 hour" local clock together with the traditional 
                 AM/PM label to indicate whether the sun has crossed the 
                 local zenith meridian.

                 'hr', 'mn', 'sc', 'time', and 'ampm' "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.
   
      ;;
      ;; Define an arbitrary ephemeris time,
      ;; (July 4 2004 18:00:00) target body, 
      ;; longitude (rads) and, the type of longitude.
      ;;
      et   = 142236064.18399799d
      body = 499
      lon  = 326.17d * cspice_rpd()
      type = 'PLANETOCENTRIC'
      SIZE = 5

      ;;
      ;; Load an SPK, PCK and leapsecond file.
      ;;
      cspice_furnsh, 'standard.tm'

      ;;
      ;; Calculate the local solar time defined by the inputs.
      ;;
      cspice_et2lst, et, body, lon, type, $
                                hr,  mn, sc , time, ampm

      print, 'Scalar:'
      print, 'ET       : ', et
      print, 'Body     : ', body
      print, 'Longitude: ', lon
      print, 'Type     : ', type
      print, 'LST Hour : ', hr
      print, 'LST Min  : ', mn
      print, 'LST Sec  : ', sc
      print, 'LST Time : ', time
      print, 'LST AMPM : ', ampm
      print

      ;;
      ;; Convert the array of ephemeris times 'et' to
      ;; arrays of local solar time values. 'et' ranges
      ;; from value 142236064.18399799 in steps of
      ;; 10000 ephemeris seconds.
      ;;
      et = dindgen(SIZE)*10000.d + 142236064.18399799d

      cspice_et2lst, et, body, lon, type, $
                                hr,  mn, sc , time, ampm

      print, 'Vector:'
      for i=0, (SIZE-1) do begin
         print, 'ET       : ', et[i]
         print, 'LST Hour : ', hr[i]
         print, 'LST Min  : ', mn[i]
         print, 'LST Sec  : ', sc[i]
         print, 'LST Time : ', time[i]
         print, 'LST AMPM : ', ampm[i]
         print
      endfor

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

   IDL outputs:

      Scalar:
      ET       :    1.4223606e+08
      Body     :      499
      Longitude:        5.6927404
      Type     : PLANETOCENTRIC
      LST Hour :           17
      LST Min  :           30
      LST Sec  :           38
      LST Time : 17:30:38
      LST AMPM : 05:30:38 P.M.

      Vector:
      ET       :    1.4223606e+08
      LST Hour :           17
      LST Min  :           30
      LST Sec  :           38
      LST Time : 17:30:38
      LST AMPM : 05:30:38 P.M.

      ET       :    1.4224606e+08
      LST Hour :           20
      LST Min  :           12
      LST Sec  :           52
      LST Time : 20:12:52
      LST AMPM : 08:12:52 P.M.

      ET       :    1.4225606e+08
      LST Hour :           22
      LST Min  :           55
      LST Sec  :            7
      LST Time : 22:55:07
      LST AMPM : 10:55:07 P.M.

      ET       :    1.4226606e+08
      LST Hour :            1
      LST Min  :           37
      LST Sec  :           21
      LST Time : 01:37:21
      LST AMPM : 01:37:21 A.M.

      ET       :    1.4227606e+08
      LST Hour :            4
      LST Min  :           19
      LST Sec  :           36
      LST Time : 04:19:36
      LST AMPM : 04:19:36 A.M.

Particulars


   Regarding planetographic longitude
   ----------------------------------

   In the planetographic coordinate system, longitude is defined using
   the spin sense of the body.  Longitude is positive to the west if
   the spin is prograde and positive to the east if the spin is
   retrograde.  The spin sense is given by the sign of the first degree
   term of the time-dependent polynomial for the body's prime meridian
   Euler angle "W":  the spin is retrograde if this term is negative
   and prograde otherwise.  For the sun, planets, most natural
   satellites, and selected asteroids, the polynomial expression for W
   may be found in a SPICE PCK kernel.

   The earth, moon, and sun are exceptions: planetographic longitude
   is measured positive east for these bodies.

   If you wish to override the default sense of positive planetographic
   longitude for a particular body, you can do so by defining the
   kernel variable

      BODY<body ID>_PGR_POSITIVE_LON

   where <body ID> represents the NAIF ID code of the body. This
   variable may be assigned either of the values

      'WEST'
      'EAST'

   For example, you can have this routine treat the longitude of the
   earth as increasing to the west using the kernel variable assignment

      BODY399_PGR_POSITIVE_LON = 'WEST'

   Normally such assignments are made by placing them in a text kernel
   and loading that kernel via cspice_furnsh.
    

Required Reading


   ICY.REQ
   TIME.REQ

Version


   -Icy Version 1.0.3, 05-JAN-2011, EDW (JPL)

      Corrected header typo, furnsh_c replaced with cspice_furnsh.

   -Icy Version 1.0.2, 29-JAN-2009, EDW (JPL)

      Minor edits to header text.
      
      Replace argument description comment

         "returns with the same order"
      
      with
      
         "returns with the same measure of vectorization"
      
   -Icy Version 1.0.1, 07-NOV-2005, EDW (JPL)

      The treatment of planetographic longitude has been
      updated in et2lst_c.c to be consistent with the 
      SPICE planetographic/rectangular coordinate conversion
      routines. The effect of this change is that  the 
      default sense of positive longitude for the moon is 
      now east; also, the default sense of positive 
      planetographic longitude now may be overridden for
      any body.
   
   -Icy Version 1.0.0, 20-SEP-2004, EDW (JPL)

Index_Entries

 
   Compute the local time for a point on a body. 
 



Wed Apr  5 17:58:01 2017