two_body_rotating_pulsating_frame Derived Type

type, public, extends(two_body_rotating_frame) :: two_body_rotating_pulsating_frame

This frame is an extension of the two-body rotating frame, where a scale factor is used to scale the position and velocity of the state based on the distance between the primary and secondary bodies.


Inherits

type~~two_body_rotating_pulsating_frame~~InheritsGraph type~two_body_rotating_pulsating_frame two_body_rotating_pulsating_frame type~two_body_rotating_frame two_body_rotating_frame type~two_body_rotating_pulsating_frame->type~two_body_rotating_frame type~celestial_body celestial_body type~two_body_rotating_frame->type~celestial_body secondary_body type~rotating_frame_class rotating_frame_class type~two_body_rotating_frame->type~rotating_frame_class type~base_class base_class type~celestial_body->type~base_class type~reference_frame reference_frame type~rotating_frame_class->type~reference_frame type~reference_frame->type~celestial_body primary_body

Components

Type Visibility Attributes Name Initial
type(celestial_body), public :: secondary_body = body_moon

the secondary body used to construct the frame

integer, public :: center = center_at_barycenter

the frame center (can be primary_body,secondary_body, or barycenter)

real(kind=wp), public, dimension(6) :: rv12 = zero

[r,v] of secondary body w.r.t. primary body

real(kind=wp), public :: scale = zero

scale factor


Constructor


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, public :: from_primary_to_center

  • private subroutine from_primary_to_center(me, eph, et, rc, status_ok)

    returns the state of the frame center w.r.t. the frame primary body.

    Arguments

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

    for ephemeris computations (assumed to have already been initialized)

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

    ephemeris time [sec]

    real(kind=wp), intent(out), dimension(6) :: rc

    state of frame center w.r.t. primary body [inertial]

    logical, intent(out) :: status_ok

    true if no errors.

procedure, public :: get_c_cdot => get_c_cdot_two_body_rotating_pulsating

  • private subroutine get_c_cdot_two_body_rotating_pulsating(me, eph, to_icrf, c, cdot, status_ok)

    rotation matrix for ROTATING_PULSATING <-> ICRF

    Arguments

    Type IntentOptional Attributes Name
    class(two_body_rotating_pulsating_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,extends(two_body_rotating_frame),public :: two_body_rotating_pulsating_frame
        !! This frame is an extension of the two-body rotating frame, where
        !! a scale factor is used to scale the position and velocity of the state
        !! based on the distance between the primary and secondary bodies.
        real(wp) :: scale = zero !! scale factor
    contains
        procedure :: get_c_cdot => get_c_cdot_two_body_rotating_pulsating
    end type two_body_rotating_pulsating_frame