This routine 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.

VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
ETOBS I Epoch of a signal at some observer
OBS I NAIF-id of some observer
DIR I Direction the signal travels ( '->' or '<-' )
TARG I NAIF-id of the target object
ETTARG O Epoch of the signal at the target
ELAPSD O Time between transmit and receipt of the signal

ETOBS is an epoch expressed in ephemeris second (TDB)
past the epoch of the J2000 reference system.
This is the time at which an electromagnetic
signal is "at" the observer.
OBS is the NAIF-id of some observer.
DIR is the direction the signal travels. 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 travelling.
If the argument list reads as below,
..., OBS, '->', TARG, ...
the signal is travelling from the observer to the
target.
If the argument reads as
..., OBS, '<-', TARG
the signal is travelling from the target to
the observer.
TARG is the NAIF-id of the target.

ETTARG is the epoch expressed in ephemeris seconds (TDB)
past the epoch of the J2000 reference system
at which the electromagnetic signal is "at" the
target body.
Note ETTARG is computed using only Newtonian
assumptions about the propagation of light.
ELAPSD is the number of ephemeris seconds (TDB) between
transmission and receipt of the signal.
ELAPSD = DABS( ETOBS - ETTARG )

1) If DIR is not one of '->' or '<-' the error
'SPICE(BADDIRECTION)' will be signalled. 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, the problems is diagnosed
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.

Suppose a radio signal travels between two solar system
objects. Given an ephemeris for the two objects, which way
the signal is travelling, 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.

Example 1.
----------
Suppose a signal is transmitted at time ET from the Goldstone
tracking site (id-code 399001) to a spacecraft whose id-code
is -77.
signal travelling to spacecraft
* -._.-._.-._.-._.-._.-._.-._.-._.-> *
Goldstone (OBS=399001) Spacecraft (TARG = -77)
at epoch ETOBS(given) at epoch ETTARG(unknown)
Assuming that all of the required SPICE kernels have been
loaded, the code fragment below shows how to compute the
time (ARRIVE) at which the signal arrives at the spacecraft
and how long (HOWLNG) it took the signal to reach the spacecraft.
(Note that we display the arrival time as the number of seconds
past J2000.)
OBS = 399001
TARG = -77
ETOBS = ET
CALL LTIME ( ETOBS, OBS, '->', TARG, ARRIVE, HOWLNG )
CALL ETCAL
WRITE (*,*) 'The signal arrived at time: ', ARRIVE
WRITE (*,*) 'It took ', HOWLNG, ' seconds to get there.'
Example 2.
----------
Suppose a signal is received at the Goldstone tracking sight
at epoch ET from the spacecraft of the previous example.
signal sent from spacecraft
* <-._.-._.-._.-._.-._.-._.-._.-._.- *
Goldstone (OBS=399001) Spacecraft (TARG = -77)
at epoch ETOBS(given) at epoch ETTARG(unknown)
Again assuming that all the required kernels have been loaded
the code fragment below computes the epoch at which the
signal was transmitted from the spacecraft.
OBS = 399001
TARG = -77
ETOBS = ET
CALL LTIME ( ETOBS, OBS, '<-', TARG, SENT, HOWLNG )
CALL ETCAL
WRITE (*,*) 'The signal was transmitted at: ', SENT
WRITE (*,*) 'It took ', HOWLNG, ' seconds to get here.'
EXAMPLE 3
---------
Suppose there is a transponder on board the spacecraft of
the previous examples that transmits a signal back to the
sender exactly 1 microsecond after a signal arrives at
the spacecraft. If we send a signal from Goldstone
to the spacecraft and wait to receive it at Canberra.
What will be the epoch at which the return signal arrives
in Canberra? ( The id-code for Canberra is 399002 ).
Again, assuming we've loaded all the necessary kernels,
the fragment below will give us the answer.
GSTONE = 399001
SC = -77
CANBER = 399002
ETGOLD = ET
CALL LTIME ( ETGOLD, GSTONE, '->', SC, SCGET, LT1 )
Account for the microsecond delay between receipt and transmit
SCSEND = SCGET + 0.000001
CALL LTIME ( SCSEND, SC, '->', CANBER, ETCANB, LT2 )
RNDTRP = ETCANB - ETGOLD
WRITE (*,*) 'The signal arrives in Canberra at: ', ETCANB
WRITE (*,*) 'Round trip time for the signal was: ', RNDTRP