pub unsafe extern "C" fn jpl_state(
ephem: *mut c_void,
et: f64,
list: *const c_int,
pv: *mut [f64; 6],
nut: *mut f64,
bary: c_int
) -> c_int
This subroutine reads and interpolates the jpl planetary ephemeris file
Calling sequence parameters:
Input:
et2[] double, 2-element JED epoch at which interpolation
is wanted. Any combination of et2[0]+et2[1] which falls
within the time span on the file is a permissible epoch.
a. for ease in programming, the user may put the
entire epoch in et2[0] and set et2[1]=0.0
b. for maximum interpolation accuracy, set et2[0] =
the most recent midnight at or before interpolation
epoch and set et2[1] = fractional part of a day
elapsed between et2[0] and epoch.
c. as an alternative, it may prove convenient to set
et2[0] = some fixed epoch, such as start of integration,
and et2[1] = elapsed interval between then and epoch.
list 13-element integer array specifying what interpolation
is wanted for each of the "bodies" on the file.
list[i]=0, no interpolation for body i
=1, position only
=2, position and velocity
the designation of the astronomical bodies by i is:
i = 0: mercury
= 1: venus
= 2: earth-moon barycenter
= 3: mars
= 4: jupiter
= 5: saturn
= 6: uranus
= 7: neptune
= 8: pluto
= 9: geocentric moon
=10: nutations in lon & obliq (if on file)
=11: lunar librations (if on file)
=12: lunar mantle omegas
=13: TT-TDB (if on file)
Note that I've not actually seen case 12 yet. It probably doesn't work.
output:
pv[][6] double array that will contain requested interpolated
quantities. The body specified by list[i] will have its
state in the array starting at pv[i][0] (on any given
call, only those words in 'pv' which are affected by the
first 10 'list' entries (and by list(11) if librations are
on the file) are set. The rest of the 'pv' array
is untouched.) The order of components in pv[][] is:
pv[][0]=x,....pv[][5]=dz.
All output vectors are referenced to the earth mean
equator and equinox of epoch. The moon state is always
geocentric; the other nine states are either heliocentric
or solar-system barycentric, depending on the setting of
global variables (see below).
Lunar librations, if on file, are put into pv[10][k] if
list[11] is 1 or 2.
nut dp 4-word array that will contain nutations and rates,
depending on the setting of list[10]. the order of
quantities in nut is:
d psi (nutation in longitude)
d epsilon (nutation in obliquity)
d psi dot
d epsilon dot