Interface for the ephemeris_module.
Return the Cartesian state of targ
relative to obs
in the J2000
frame.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(spice_ephemeris), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | et |
ephemeris time [sec] |
||
type(celestial_body), | intent(in) | :: | targ |
target body |
||
type(celestial_body), | intent(in) | :: | obs |
observer body |
||
real(kind=wp), | intent(out), | dimension(6) | :: | rv |
state of targ w.r.t. obs [km,km/s] in ICRF frame |
|
logical, | intent(out) | :: | status_ok |
true if there were no problems |
subroutine get_rv_from_spice_ephemeris(me,et,targ,obs,rv,status_ok) use celestial_body_module, only: celestial_body use numbers_module, only: zero implicit none class(spice_ephemeris),intent(inout) :: me real(wp),intent(in) :: et !! ephemeris time [sec] type(celestial_body),intent(in) :: targ !! target body type(celestial_body),intent(in) :: obs !! observer body real(wp),dimension(6),intent(out) :: rv !! state of targ w.r.t. obs [km,km/s] in ICRF frame logical,intent(out) :: status_ok !! true if there were no problems real(wp) :: lt !! light time output from spkgeo call spkgeo ( targ%id, et, 'J2000', obs%id, rv, lt ) status_ok = .not. failed() end subroutine get_rv_from_spice_ephemeris