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 at a given ephemeris epoch,
   for an object on the surface of a body at a specified longitude.

I/O


   Given:

      et     the ephemeris time(s) expressed as ephemeris seconds past
             J2000 at which a local time is desired.

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

      body   the SPICE ID-code of the body on which to measure local time.

             [1,1] = size(body); int32 = class(body)

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

             [1,1] = size(lon); double = class(lon)

      type   the name for the form of longitude supplied by the
             variable 'lon'.

             [1,c1] = size(type); char = class(type)

                or

             [1,1] = size(type); cell = class(type)

             Allowed values are "PLANETOCENTRIC" and
             "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:

      [ hr, min, sec, time, ampm] = cspice_et2lst( et, body, lon, type)

   returns:

      hr     the value(s) describing the integral number of the local
             "hour" of the site specified at epoch 'et'.

             [1,n] = size(et); double = class(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 value(s) describing the integral number of "minutes" past
             the hour of the local time of the site at the epoch 'et'.

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

             Again note that a "local minute" is not the same as a minute you
             would measure with conventional clocks.

      sc     the value(s) describing the integral number of "seconds" past
             the minute of the local time of the site at the epoch 'et'.

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

             Again note that a "local second" is not the same as a second
             you would measure with conventional clocks.

      time   the array of local time(s) on a "24 hour" local clock.

             [n,c1] = size(segid); char = class(segid)

      ampm   array of local time(s) on a "12 hour" local clock together
             with the traditional AM/PM label to indicate whether the sun has
             crossed the local zenith meridian.

             [n,c2] = size(segid); char = class(segid)

             All output arguments return 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 a leapseconds kernel.
      %
      cspice_furnsh( 'standard.tm' )

      %
      % Define two UTC time strings to 'utc'
      %
      utc                        = strvcat( '2002 SEP 02 00:00:00', ...
                                            '2002 SEP 30 00:00:00' );

      %
      % Convert 'utc' the ephemeris time, 'et'
      %
      et                      zz   = cspice_str2et(utc);

      %
      % Define a planetographic longitude in degrees, convert the
      % value to radians
      %
      dlon                       =  326.17;
      rlon                       =  dlon * cspice_rpd;

      %
      % Convert inputs to Local Solar Time.
      %
      [hr, min, sec, time, ampm] = cspice_et2lst( et,   ...
                                                  499,  ...
                                                  rlon, ...
                                                  'PLANETOGRAPHIC');

      fprintf( ['The local time at Mars %6.2f degrees E ' ...
               'planetographic longitude:\n'],            ...
               dlon )
      fprintf( '   at UTC %s, LST = %s\n', utc(1,:), ampm(1,:) )
      fprintf( '   at UTC %s, LST = %s\n', utc(2,:), ampm(2,:) )

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

   MATLAB outputs:

      The local time at Mars 326.17 degrees E planetographic longitude:
         at UTC 2002 SEP 02 00:00:00, LST = 03:25:35 A.M.
         at UTC 2002 SEP 30 00:00:00, LST = 09:33:00 A.M.

Particulars


   None.

Required Reading


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

   MICE.REQ

Version


   -Mice Version 1.0.2, 05-NOV-2014, EDW (JPL)

       Edited I/O section to conform to NAIF standard for Mice documentation.

   -Mice Version 1.0.1, 06-MAY-2009, EDW (JPL)

      Added MICE.REQ reference to the Required Reading section.

   -Mice Version 1.0.0, 07-MAR-2007, EDW (JPL)

Index_Entries


   Compute the local time for a point on a body.


Wed Apr  5 18:00:31 2017