Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(jpl_ephemeris_splined), | 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_splined(me,et,targ,obs,rv,status_ok) class(jpl_ephemeris_splined),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 status_ok = .true. if (targ==body_earth .and. obs==body_moon) then rv = me%earth_eph_interface%get_rv(et) elseif (targ==body_sun .and. obs==body_moon) then rv = me%sun_eph_interface%get_rv(et) elseif (targ==body_ssb .and. obs==body_moon) then rv = me%ssb_eph_interface%get_rv(et) elseif (targ==body_moon .and. obs==body_earth) then ! inverse are negative rv = -me%earth_eph_interface%get_rv(et) elseif (targ==body_moon .and. obs==body_sun) then rv = -me%sun_eph_interface%get_rv(et) elseif (targ==body_moon .and. obs==body_ssb) then rv = -me%ssb_eph_interface%get_rv(et) elseif (targ==body_earth .and. obs==body_sun) then ! for this one we subtract these rv = me%earth_eph_interface%get_rv(et) - me%sun_eph_interface%get_rv(et) else write(*,*) 'targ = ', targ write(*,*) 'obs = ', obs error stop 'error in get_rv_splined: this combo has not been splined' ! or could call me%jpl_ephemeris%get_rv(et,targ,obs,rv,status_ok) end if end subroutine get_rv_splined