ephemeris wrapper to just return position vector see also: ballistic_derivs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(jpl_ephemeris), | intent(inout) | :: | eph | |||
real(kind=wp), | intent(in) | :: | et |
ephemeris time (sec) |
||
type(celestial_body), | intent(in) | :: | b_target |
target body |
||
type(celestial_body), | intent(in) | :: | b_obs |
observer body |
||
real(kind=wp), | intent(out), | dimension(3) | :: | r |
j2000 state (km, km/s) |
|
logical, | intent(out) | :: | status_ok |
true if no problems |
subroutine get_pos(eph,et,b_target,b_obs,r,status_ok) !! ephemeris wrapper to just return position vector !! see also: [[ballistic_derivs]] class(jpl_ephemeris),intent(inout) :: eph real(wp),intent(in) :: et !! ephemeris time (sec) type(celestial_body),intent(in) :: b_target !! target body type(celestial_body),intent(in) :: b_obs !! observer body real(wp),dimension(3),intent(out) :: r !! j2000 state (km, km/s) logical,intent(out) :: status_ok !! true if no problems real(wp),dimension(6) :: rv !! r,v vector select type (eph) type is (jpl_ephemeris) call eph%get_rv(et,b_target,b_obs,rv,status_ok) r = rv(1:3) type is (jpl_ephemeris_splined) ! for this, we can just get position vector only call eph%get_r(et,b_target,b_obs,r,status_ok) class default error stop 'error in get_pos: invalid eph class' end select end subroutine get_pos