Index Page
cspice_ltime
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_LTIME computes the transmit (or receive) time of
   a signal at a specified target, given the receive (or transmit)
   time at a specified observer. The elapsed time between transmit
   and receive is also returned.

I/O


   Given:

      etobs   the epoch(s) in ephemeris seconds (TDB) of a signal at some
              observer.

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

      obs     the NAIF ID code of the observer.

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

      dir     a pictograph defining the direction the signal travels.

                 '->'  to target from observer
                 '<-'  from the target to the observer

              [1,2] = size(dir); char = class(dir)

                 or

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

      targ    the NAIF ID code of the target.

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

   the call:

      [ettarg, elapsd] = cspice_ltime(etobs, obs, dir, targ)

   returns:

      ettarg   the epoch(s) at which the electromagnetic signal is "at"
               the target body, expressed in ephemeris seconds (TDB).

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

                  Note 'ettarg' is computed using only Newtonian
                  assumptions about the propagation of light.

      elapsd   the measure of ephemeris seconds (TDB) between transmission
               and receipt of the signal

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

                  elapsd = abs( etobs - ettarg )

               'ettarg' and 'elapsd' return with the same
               vectorization measure, N, as 'etobs'.

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 an SPK, PCK, and leapseconds kernel
      %
      cspice_furnsh( 'standard.tm' )

      %
      % Suppose a signal originates from Earth towards the
      % the Jupiter system barycenter. Define the NAIF IDs
      % for the observer, Earth (399), the target, Jupiter
      % barycenter (5), and time of interest.
      %
      OBS      = 399;
      TARGET   = 5;
      TIME_STR = 'July 4, 2004';

      %
      %  Convert the transmission time to ET.
      %
      et = cspice_str2et( TIME_STR);

      %
      %  Determine the arrival time and the time for propagation.
      %
      [arrive, ltime] = cspice_ltime( et, OBS, '->', TARGET);

      %
      %  Convert the arrival time (ET) to UTC.
      %
      arrive_utc = cspice_et2utc( arrive, 'C', 3 );

      %
      %  Output the results.
      %
      txt = sprintf( 'Transmission at (UTC)       : %s', TIME_STR );
      disp(txt)

      txt = sprintf( 'The signal arrived at (UTC) : %s', arrive_utc );
      disp(txt)

      txt = sprintf( 'Time for propagation (secs) : %16.4f', ltime );
      disp(txt)
      disp( ' ' )

      %
      % Now assume the signal originated at Jupiter barycenter,
      % received by Earth at TIME_STR. Determine the transmission
      % time and the time for propagation.
      %
      [receive, ltime] = cspice_ltime( et, OBS, '<-', TARGET);

      %
      % Convert the reception time (ET) to UTC.
      %
      receive_utc = cspice_et2utc( receive, 'C', 3 );

      %
      %  Output the results.
      %
      txt = sprintf( 'Reception at (UTC)          : %s', TIME_STR );
      disp(txt)

      txt = sprintf( 'The signal sent at (UTC)    : %s', receive_utc );
      disp(txt)

      txt = sprintf( 'Time for propagation (secs) : %16.4f', ltime );
      disp(txt)

   MATLAB outputs:

      Transmission at (UTC)       : July 4, 2004
      The signal arrived at (UTC) : 2004 JUL 04 00:48:38.717
      Time for propagation (secs) :        2918.7170

      Reception at (UTC)          : July 4, 2004
      The signal sent at (UTC)    : 2004 JUL 03 23:11:21.248
      Time for propagation (secs) :        2918.7524

Particulars


     None.

Required Reading


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

   MICE.REQ
   TIME.REQ

Version


   -Mice Version 1.0.1, 10-MAR-2015, EDW (JPL)

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

   -Mice Version 1.0.0, 22-JAN-2006, EDW (JPL)

Index_Entries


   Compute uplink and downlink light time


Wed Apr  5 18:00:33 2017