Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
cspice_ltime

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_LTIME computes the transmission (or reception) time of a signal at
   a specified target, given the reception (or transmission) time at a
   specified observer. This routine also returns the elapsed time between
   transmission and reception.

I/O


   Given:

      etobs    an epoch expressed as ephemeris seconds past J2000 TDB.

               help, etobs
                  DOUBLE = Scalar

               This is the time at which an electromagnetic signal is "at"
               the observer.

      obs      the NAIF ID of some observer.

               help, obs
                  LONG = Scalar

      dir      the direction the signal travels.

               help, dir
                  STRING = Scalar

               The acceptable values are '->' and '<-'. When you read the
               calling sequence from left to right, the "arrow" given by
               `dir' indicates which way the electromagnetic signal is
               traveling.

               If the argument list reads as below,

                  ..., `obs', '->', `targ', ...

               the signal is traveling from the observer to the
               target.

               If the argument reads as

                  ..., `obs', '<-', `targ'

               the signal is traveling from the target to
               the observer.

      targ     the NAIF ID of the target.

               help, targ
                  LONG = Scalar

   the call:

      cspice_ltime, etobs, obs, dir, targ, ettarg, elapsd

   returns:

      ettarg   the epoch expressed as ephemeris seconds past J2000 TDB
               at which the electromagnetic signal is "at" the target body.

               help, ettarg
                  DOUBLE = Scalar

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

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

               help, elapsd
                  DOUBLE = Scalar

               `elapsd' is computed as:

                  elapsd = abs( etobs - ettarg )

Parameters


   None.

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.

   1) Suppose a signal is transmitted from Earth towards the Jupiter
      system barycenter on July 4, 2004.

         signal traveling to Jupiter system barycenter
         *  -._.-._.-._.-._.-._.-._.-._.-._.->  *

         Earth (399)            Jupiter system barycenter (5)

      Compute the time at which the signal arrives at Jupiter
      and the time it took the signal to arrive there (propagation
      time).

      Suppose also that another signal is received at the Earth from
      Jupiter system barycenter at the same time.

         signal sent from Jupiter system barycenter
         *  <-._.-._.-._.-._.-._.-._.-._.-._.-  *

         Earth (399)            Jupiter system barycenter (5)

      Compute the time at which the signal was transmitted from Jupiter,
      and its propagation time.

      Use the meta-kernel shown below to load the required SPICE
      kernels.


         KPL/MK

         File name: ltime_ex1.tm

         This meta-kernel is intended to support operation of SPICE
         example programs. The kernels shown here should not be
         assumed to contain adequate or correct versions of data
         required by SPICE-based user applications.

         In order for an application to use this meta-kernel, the
         kernels referenced here must be present in the user's
         current working directory.

         The names and contents of the kernels referenced
         by this meta-kernel are as follows:

            File name                     Contents
            ---------                     --------
            de421.bsp                     Planetary ephemeris
            naif0012.tls                  Leapseconds

         \begindata

            KERNELS_TO_LOAD = ( 'de421.bsp',
                                'naif0012.tls'  )

         \begintext

         End of meta-kernel


      Example code begins here.


      PRO ltime_ex1

         ;;
         ;; Load an SPK and leapseconds kernels
         ;;
         cspice_furnsh, 'ltime_ex1.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.
         ;;
         cspice_str2et, TIME_STR, et

         ;;
         ;; Determine the arrival time and the time for propagation.
         ;;
         cspice_ltime, et, OBS, "->", TARGET, arrive, ltime

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

         ;;
         ;; Output the results.
         ;;
         print, 'Transmission at (UTC)       : ', TIME_STR
         print, 'The signal arrived at (UTC) : ', arrive_utc
         print, 'Time for propagation (secs) : ', ltime
         print

         ;;
         ;; Now assume the signal originated at Jupiter barycenter,
         ;; received by Earth at TIME_STR. Determine the transmission
         ;; time and the time for propagation.
         ;;
         cspice_ltime, et, OBS, "<-", TARGET, receive, ltime

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

         ;;
         ;; Output the results.
         ;;
         print, 'Reception at (UTC)          : ', TIME_STR
         print, 'The signal sent at (UTC)    : ', receive_utc
         print, 'Time for propagation (secs) : ', ltime

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

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


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

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


Particulars


   Suppose a radio signal travels between two solar system objects. Given an
   ephemeris for the two objects, which way the signal is traveling, and the
   time when the signal is "at" at one of the objects (the observer `obs'),
   this routine determines when the signal is "at" the other object (the
   target `targ'). It also returns the elapsed time between transmission and
   receipt of the signal.

Exceptions


   1)  If `dir' is not one of '->' or '<-', the error
       SPICE(BADDIRECTION) is signaled by a routine in the call tree
       of this routine. In this case `ettarg' and `elapsd' will not be
       altered from their input values.

   2)  If insufficient ephemeris information is available to
       compute the outputs `ettarg' and `elapsd', or if observer
       or target is not recognized, an error is signaled
       by a routine in the call tree of this routine.

       In this case, the value of `ettarg' will be set to `etobs'
       and `elapsd' will be set to zero.

   3)  If any of the input arguments, `etobs', `obs', `dir' or
       `targ', is undefined, an error is signaled by the IDL error
       handling system.

   4)  If any of the input arguments, `etobs', `obs', `dir' or
       `targ', is not of the expected type, or it does not have the
       expected dimensions and size, an error is signaled by the Icy
       interface.

   5)  If any of the output arguments, `ettarg' or `elapsd', is not a
       named variable, an error is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.1, 01-NOV-2021 (JDR)

       Edited the header to comply with NAIF standard. Added example's
       problem statement and meta-kernel. Added cspice_kclear to example.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections, and
       completed -Particulars section.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

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

Index_Entries


   Compute uplink and downlink light time



Fri Dec 31 18:43:06 2021