reference_frame Derived Type

type, public :: reference_frame

a reference frame defines an orientation at a specified frame center at a specified epoch. Usually, the center is the primary_body of the frame, but can be otherwise for a two_body_rotating_frame.


Inherits

type~~reference_frame~~InheritsGraph type~reference_frame reference_frame type~celestial_body celestial_body type~reference_frame->type~celestial_body primary_body type~base_class base_class type~celestial_body->type~base_class

Inherited by

type~~reference_frame~~InheritedByGraph type~reference_frame reference_frame type~inertial_frame_class inertial_frame_class type~inertial_frame_class->type~reference_frame type~rotating_frame_class rotating_frame_class type~rotating_frame_class->type~reference_frame type~ecliptic_frame ecliptic_frame type~ecliptic_frame->type~inertial_frame_class type~iau_rotating_frame_class iau_rotating_frame_class type~iau_rotating_frame_class->type~rotating_frame_class type~icrf_frame icrf_frame type~icrf_frame->type~inertial_frame_class type~two_body_rotating_frame two_body_rotating_frame type~two_body_rotating_frame->type~rotating_frame_class type~iau_earth_rotating_frame iau_earth_rotating_frame type~iau_earth_rotating_frame->type~iau_rotating_frame_class type~iau_moon_rotating_frame iau_moon_rotating_frame type~iau_moon_rotating_frame->type~iau_rotating_frame_class type~two_body_rotating_pulsating_frame two_body_rotating_pulsating_frame type~two_body_rotating_pulsating_frame->type~two_body_rotating_frame

Components

Type Visibility Attributes Name Initial
type(celestial_body), private :: primary_body = body_earth

the primary body of the frame

real(kind=wp), private :: et = zero

epoch at which the frame is defined [sec]


Type-Bound Procedures

procedure, public, pass(from) :: transform

coordinate transformation routine

  • private subroutine transform(from, rv, to, et, eph, rv_out, status_ok)

    Transform a Cartesian state from one reference frame to another at a specified epoch. The from and to reference_frames may each be defined at a different epoch. The et ephemeris time is the time the transformation is to be done, and accounts for the motion of the two frame centers from from%et and to%et to et.

    Arguments

    Type IntentOptional Attributes Name
    class(reference_frame), intent(inout) :: from
    real(kind=wp), intent(in), dimension(6) :: rv
    class(reference_frame), intent(inout) :: to
    real(kind=wp), intent(in) :: et

    the time of the transformation [sec]

    class(ephemeris_class), intent(inout) :: eph

    for ephemeris computations (assumed to have already been initialized)

    real(kind=wp), intent(out), dimension(6) :: rv_out
    logical, intent(out) :: status_ok

procedure(c_cdot_func), private, deferred :: get_c_cdot

to get the rotating matrix for the frame orientation

  • subroutine c_cdot_func(me, eph, to_icrf, c, cdot, status_ok) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(reference_frame), intent(inout) :: me
    class(ephemeris_class), intent(inout) :: eph

    for ephemeris computations (assumed to have already been initialized)

    logical, intent(in) :: to_icrf
    real(kind=wp), intent(out), dimension(3,3) :: c
    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot
    logical, intent(out) :: status_ok

Source Code

    type,abstract,public :: reference_frame
        !! a reference frame defines an orientation at
        !! a specified frame center at a specified epoch.
        !! Usually, the center is the `primary_body` of the
        !! frame, but can be otherwise for a
        !! [[two_body_rotating_frame]].
        private
        type(celestial_body) :: primary_body = body_earth  !! the primary body of the frame
        real(wp) :: et = zero  !! epoch at which the frame is defined [sec]
    contains
        private
        procedure,pass(from),public :: transform        !! coordinate transformation routine
        procedure(c_cdot_func),deferred :: get_c_cdot   !! to get the rotating matrix for the frame orientation
    end type reference_frame