jpl_ephemeris_splined Derived Type

type, public, extends(jpl_ephemeris) :: jpl_ephemeris_splined

make this an extension of the jpl_ephemeris, since it is also needed in tranformations. also, has the extra feature of a get_r method, since we don't need velocity for the gravity calculation.


Inherits

type~~jpl_ephemeris_splined~~InheritsGraph type~jpl_ephemeris_splined jpl_ephemeris_splined jpl_ephemeris jpl_ephemeris type~jpl_ephemeris_splined->jpl_ephemeris type~body_eph_interface body_eph_interface type~jpl_ephemeris_splined->type~body_eph_interface earth_eph_interface, sun_eph_interface, ssb_eph_interface type~body_eph body_eph type~body_eph_interface->type~body_eph eph

Components

Type Visibility Attributes Name Initial
type(body_eph_interface), public :: earth_eph_interface

splined version of earth ephemeris

type(body_eph_interface), public :: sun_eph_interface

splined version of sun ephemeris

type(body_eph_interface), public :: ssb_eph_interface

splined version of ssb ephemeris


Type-Bound Procedures

procedure, public :: initialize_splinded_ephemeris

  • private subroutine initialize_splinded_ephemeris(me, filename, ksize, km, bary, status_ok, et0, dt, etf)

    the ephemeris must be initialized before this is called

    Arguments

    Type IntentOptional Attributes Name
    class(jpl_ephemeris_splined), intent(inout) :: me
    character(len=*), intent(in) :: filename

    ephemeris file name

    integer, intent(in), optional :: ksize

    corresponding ksize

    logical, intent(in), optional :: km

    defining physical units of the output states. km = .true. : km and km/sec [default], km = .false. : au and au/day.

    logical, intent(in), optional :: bary

    logical flag defining output center. only the 9 planets are affected. bary = .true. : center is solar-system barycenter, bary = .false. : center is sun [default].

    logical, intent(out) :: status_ok

    true if there were no problems.

    real(kind=wp), intent(in) :: et0

    initial ephemeris time [sec]

    real(kind=wp), intent(in) :: dt

    ephemeris time step [sec]

    real(kind=wp), intent(in) :: etf

    final ephemeris time [sec]

procedure, public :: initialize_globals

this is done once to initialize the global ephemeris vars

  • private subroutine initialize_globals(me, et0, dt, etf)

    initialize the earth and sun ephemeris.

    Arguments

    Type IntentOptional Attributes Name
    class(jpl_ephemeris_splined), intent(inout) :: me
    real(kind=wp), intent(in) :: et0

    initial ephemeris time [sec]

    real(kind=wp), intent(in) :: dt

    ephemeris time step [sec]

    real(kind=wp), intent(in) :: etf

    final ephemeris time [sec]

procedure, public :: get_r => get_r_splined

  • private subroutine get_r_splined(me, et, targ, obs, r, status_ok)

    Arguments

    Type IntentOptional 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(3) :: r

    r of targ w.r.t. obs [km] in ICRF frame

    logical, intent(out) :: status_ok

    true if there were no problems

procedure, public :: get_rv => get_rv_splined

  • private subroutine get_rv_splined(me, et, targ, obs, rv, status_ok)

    Arguments

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

Source Code

        type,extends(jpl_ephemeris),public :: jpl_ephemeris_splined
            !! make this an extension of the [[jpl_ephemeris]],
            !! since it is also needed in tranformations.
            !! also, has the extra feature of a `get_r` method,
            !! since we don't need velocity for the gravity calculation.

            type(body_eph_interface) :: earth_eph_interface !! splined version of earth ephemeris
            type(body_eph_interface) :: sun_eph_interface !! splined version of sun ephemeris
            type(body_eph_interface) :: ssb_eph_interface !! splined version of ssb ephemeris
        contains
            procedure,public :: initialize_splinded_ephemeris
            procedure :: initialize_globals !! this is done once to initialize the global ephemeris vars
            procedure,public :: get_r  => get_r_splined
            procedure,public :: get_rv => get_rv_splined
        end type jpl_ephemeris_splined