Table of contents
CSPICE_STELAB returns apparent position of an object corrected for
stellar aberration.
Given:
pobj a double precision 3-vector representing position in kilometers
of an object with respect to the observer, possibly corrected
for light time.
help, pobj
DOUBLE = Array[3]
vobs a double precision 3-vector representing velocity in km/sec of
the observer with respect to the Solar System barycenter.
help, vobs
DOUBLE = Array[3]
the call:
cspice_stelab, pobj, vobs, appobj
returns:
appobj a double precision 3-vector representing apparent position of
the object relative to the observer, corrected for stellar
aberration.
help, appobj
DOUBLE = Array[3]
`appobj' may overwrite `pobj'.
None.
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) Compute the apparent position of the Moon relative to the
Earth, corrected for one light-time and stellar aberration,
given the geometric state of the Earth relative to the Solar
System Barycenter, and the difference between the stellar
aberration corrected and uncorrected position vectors, taking
several steps.
First, compute the light-time corrected state of the Moon body as
seen by the Earth, using its geometric state. Then apply the
the correction for stellar aberration to the light-time
corrected state of the target body.
The code in this example could be replaced by a single call
to cspice_spkezr:
cspice_spkpos, 'MOON', et, 'J2000', 'LT+S', 'EARTH', pos, ltime
Use the meta-kernel shown below to load the required SPICE
kernels.
KPL/MK
File name: stelab_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
--------- --------
de418.bsp Planetary ephemeris
naif0009.tls Leapseconds
\begindata
KERNELS_TO_LOAD = ( 'de418.bsp',
'naif0009.tls' )
\begintext
End of meta-kernel
Example code begins here.
PRO stelab_ex1
;;
;; Assign an observer, Earth, target, Moon, time of interest and
;; reference frame for returned vectors.
;;
IDOBS = 399
IDTARG = 301
UTC = 'July 4 2004'
FRAME = 'J2000'
;;
;; Load the needed kernels.
;;
cspice_furnsh, 'stelab_ex1.tm'
;;
;; Convert the time string to ephemeris time, J2000.
;;
cspice_str2et, UTC, et
;;
;; Get the state of the observer with respect to the solar
;; system barycenter.
;;
cspice_spkssb, IDOBS, et, FRAME, sobs
;;
;; Get the light-time corrected state of the target body as
;; seen by the observer.
;;
cspice_spkapo, IDTARG, et, FRAME, sobs, 'LT', pos, ltime
;;
;; Output the uncorrected vector.
;;
print, 'Uncorrected position vector'
print, ' ', pos[0:2]
;;
;; Apply the correction for stellar aberration to the
;; light-time corrected state of the target body.
;;
cspice_stelab, pos, sobs[3:5], cortarg
;;
;; Output the corrected position vector and the apparent
;; difference from the uncorrected vector.
;;
print
print, 'Corrected position vector'
print, ' ', cortarg
print
print, 'Apparent difference'
print, ' ', pos - cortarg
;;
;; 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:
Uncorrected position vector
201738.73 -260893.14 -147722.59
Corrected position vector
201765.93 -260876.82 -147714.26
Apparent difference
-27.204429 -16.323525 -8.3266147
Let `r' be the vector from the observer to the object, and `v' be
the velocity vector of the observer with respect to the Solar System
barycenter. Let `w' be the angle between them. The aberration
angle `phi' is given by
sin(phi) = v * sin(w) / c
Let `h' be the vector given by the cross product
h = r x v
Rotate `r' by `phi' radians about `h' to obtain the apparent position
of the object.
1) If the velocity of the observer is greater than or equal
to the speed of light, the error SPICE(VALUEOUTOFRANGE)
is signaled by a routine in the call tree of this routine.
2) If any of the input arguments, `pobj' or `vobs', is undefined,
an error is signaled by the IDL error handling system.
3) If any of the input arguments, `pobj' or `vobs', is not of the
expected type, or it does not have the expected dimensions and
size, an error is signaled by the Icy interface.
4) If the output argument `appobj' is not a named variable, an
error is signaled by the Icy interface.
None.
None.
ICY.REQ
[1] W. Owen, "The Treatment of Aberration in Optical Navigation",
JPL IOM #314.8-524, 8 February 1985.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.1, 10-AUG-2021 (JDR)
Edited the -Examples section to comply with NAIF standard. Added
example's problem statement and meta-kernel. Example updated
to use "cspice_kclear" and remove references to "cspice_spkapp".
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)
stellar aberration
|