get_rv_from_spice_ephemeris Subroutine

private subroutine get_rv_from_spice_ephemeris(me, et, targ, obs, rv, status_ok)

Uses

  • proc~~get_rv_from_spice_ephemeris~~UsesGraph proc~get_rv_from_spice_ephemeris spice_ephemeris_module::spice_ephemeris%get_rv_from_spice_ephemeris module~celestial_body_module celestial_body_module proc~get_rv_from_spice_ephemeris->module~celestial_body_module module~numbers_module numbers_module proc~get_rv_from_spice_ephemeris->module~numbers_module module~celestial_body_module->module~numbers_module module~base_class_module base_class_module module~celestial_body_module->module~base_class_module module~kind_module kind_module module~celestial_body_module->module~kind_module module~numbers_module->module~kind_module iso_fortran_env iso_fortran_env module~kind_module->iso_fortran_env

Interface for the ephemeris_module.

Return the Cartesian state of targ relative to obs in the J2000 frame.

Type Bound

spice_ephemeris

Arguments

Type IntentOptional 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


Calls

proc~~get_rv_from_spice_ephemeris~~CallsGraph proc~get_rv_from_spice_ephemeris spice_ephemeris_module::spice_ephemeris%get_rv_from_spice_ephemeris interface~failed spice_ephemeris_module::failed proc~get_rv_from_spice_ephemeris->interface~failed interface~spkgeo spice_ephemeris_module::spkgeo proc~get_rv_from_spice_ephemeris->interface~spkgeo

Source Code

    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