spice_ephemeris Derived Type

type, public, extends(ephemeris_class) :: spice_ephemeris

Main class for accessing the SPICE ephemeris system.

Note: SPICE is not object-oriented or threadsafe. So, while this class provides an object-oriented like interface to SPICE, it should really be treated as a singleton.


Inherits

type~~spice_ephemeris~~InheritsGraph type~spice_ephemeris spice_ephemeris type~ephemeris_class ephemeris_class type~spice_ephemeris->type~ephemeris_class

Components

Type Visibility Attributes Name Initial
character(len=:), public, dimension(:), allocatable :: kernels

the list of kernels


Type-Bound Procedures

procedure, public :: get_rv => get_rv_from_spice_ephemeris

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

    Interface for the ephemeris_module.

    Read more…

    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

procedure, public :: initialize => initialize_spice_ephemeris

  • private subroutine initialize_spice_ephemeris(me, kernels)

    Initialize a SPICE ephemeris by loading the specified kernels.

    Arguments

    Type IntentOptional Attributes Name
    class(spice_ephemeris), intent(inout) :: me
    character(len=*), intent(in), dimension(:) :: kernels

    list of kernels to load

procedure, public :: close => close_spice_ephemeris

  • private subroutine close_spice_ephemeris(me)

    Close the SPICE ephemeris and unload all the kernels.

    Arguments

    Type IntentOptional Attributes Name
    class(spice_ephemeris), intent(inout) :: me

Source Code

    type,extends(ephemeris_class),public :: spice_ephemeris

        !! Main class for accessing the SPICE ephemeris system.
        !!
        !! Note: SPICE is not object-oriented or threadsafe. So,
        !! while this class provides an object-oriented like interface
        !! to SPICE, it should really be treated as a singleton.

        character(len=:),dimension(:),allocatable :: kernels  !! the list of kernels

    contains

        procedure,public :: get_rv     => get_rv_from_spice_ephemeris
        procedure,public :: initialize => initialize_spice_ephemeris
        procedure,public :: close      => close_spice_ephemeris

    end type spice_ephemeris