Coordinate transformations.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | center_at_primary_body | = | 1 | |
| integer, | public, | parameter | :: | center_at_secondary_body | = | 2 | |
| integer, | public, | parameter | :: | center_at_barycenter | = | 3 |
Constructor for a two_body_rotating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | primary_body |
the primary body of the frame |
||
| type(celestial_body), | intent(in) | :: | secondary_body |
the secondary body used to construct the frame |
||
| integer, | intent(in) | :: | center |
the frame center (can
be |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
||
| logical, | intent(in), | optional | :: | inertial |
if true, it's a quasi-inertial frame [default is false] |
Constructor for a two_body_rotating_pulsating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | primary_body |
the primary body of the frame |
||
| type(celestial_body), | intent(in) | :: | secondary_body |
the secondary body used to construct the frame |
||
| integer, | intent(in) | :: | center |
the frame center (can
be |
||
| real(kind=wp), | intent(in) | :: | scale |
scale factor |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
Constructor for a iau_earth_rotating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
Constructor for a iau_moon_rotating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
Constructor for a icrf_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
Constructor for a ecliptic_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
| Type | Intent | Optional | 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 |
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.
| 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] |
| procedure, public, pass(from) :: transform | coordinate transformation routine |
| procedure(c_cdot_func), private, deferred :: get_c_cdot | to get the rotating matrix for the frame orientation |
a non-rotating frame (a frame where the orientation axes are time invariant)
| procedure, public, pass(from) :: transform | coordinate transformation routine |
a rotating frame (a frame where the orientation axes vary with time)
| procedure, public, pass(from) :: transform | coordinate transformation routine |
frame defined by the orientation of a celestial body using the IAU models.
| procedure, public, pass(from) :: transform | coordinate transformation routine |
The two-body rotating frame is constructed from the states of two celestial bodies.
| 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 |
| logical, | public | :: | inertial | = | .false. |
to make it a quasi-inertial frame (cdot is zero) |
| private pure function two_body_rotating_frame_constructor (primary_body, secondary_body, center, et, inertial) | Constructor for a two_body_rotating_frame |
| procedure, public, pass(from) :: transform | coordinate transformation routine |
| procedure, public :: from_primary_to_center | |
| procedure, public :: get_c_cdot => get_c_cdot_two_body_rotating |
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.
| 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 |
| logical, | public | :: | inertial | = | .false. |
to make it a quasi-inertial frame (cdot is zero) |
|
| real(kind=wp), | public | :: | scale | = | zero |
scale factor |
| private pure function two_body_rotating_pulsating_frame_constructor (primary_body, secondary_body, center, scale, et) | Constructor for a two_body_rotating_pulsating_frame |
| procedure, public, pass(from) :: transform | coordinate transformation routine |
| procedure, public :: from_primary_to_center | |
| procedure, public :: get_c_cdot => get_c_cdot_two_body_rotating_pulsating |
IAU Earth frame
| private pure function iau_earth_rotating_frame_constructor (b, et) | Constructor for a iau_earth_rotating_frame |
| procedure, public, pass(from) :: transform | coordinate transformation routine |
| procedure, public :: get_c_cdot => get_c_cdot_iau_earth |
IAU Moon frame
| private pure function iau_moon_rotating_frame_constructor (b, et) | Constructor for a iau_moon_rotating_frame |
| procedure, public, pass(from) :: transform | coordinate transformation routine |
| procedure, public :: get_c_cdot => get_c_cdot_iau_moon |
the fundamental inertial frame for the ephemeris (i.e., J2000).
| private pure function icrf_frame_constructor (b) | Constructor for a icrf_frame |
| procedure, public, pass(from) :: transform | coordinate transformation routine |
| procedure, public :: get_c_cdot => get_c_cdot_icrf |
Mean ecliptic frame.
| private pure function ecliptic_frame_constructor (b) | Constructor for a ecliptic_frame |
| procedure, public, pass(from) :: transform | coordinate transformation routine |
| procedure, public :: get_c_cdot => get_c_cdot_ecliptic |
Constructor for a two_body_rotating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | primary_body |
the primary body of the frame |
||
| type(celestial_body), | intent(in) | :: | secondary_body |
the secondary body used to construct the frame |
||
| integer, | intent(in) | :: | center |
the frame center (can
be |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
||
| logical, | intent(in), | optional | :: | inertial |
if true, it's a quasi-inertial frame [default is false] |
Constructor for a two_body_rotating_pulsating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | primary_body |
the primary body of the frame |
||
| type(celestial_body), | intent(in) | :: | secondary_body |
the secondary body used to construct the frame |
||
| integer, | intent(in) | :: | center |
the frame center (can
be |
||
| real(kind=wp), | intent(in) | :: | scale |
scale factor |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
Constructor for a iau_earth_rotating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
Constructor for a iau_moon_rotating_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
||
| real(kind=wp), | intent(in) | :: | et |
epoch at which the frame is defined [sec] |
Constructor for a icrf_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
Constructor for a ecliptic_frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(celestial_body), | intent(in) | :: | b |
the central body |
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.
| Type | Intent | Optional | 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 |
Returns the state of the from frame center w.r.t. the to frame center,
at the specified ephemeris time et.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reference_frame), | intent(in) | :: | from | |||
| class(reference_frame), | intent(in) | :: | to | |||
| 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(3) | :: | rc21 |
position of |
|
| real(kind=wp), | intent(out), | dimension(3) | :: | vc21 |
velocity of |
|
| logical, | intent(out) | :: | status_ok |
true if there were no errors |
returns the state of the frame center w.r.t. the frame primary body.
| Type | Intent | Optional | 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. |
rotation matrix for ROTATING <-> ICRF
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(two_body_rotating_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 |
rotation matrix for ROTATING_PULSATING <-> ICRF
| Type | Intent | Optional | 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 |
rotation matrix for ICRF <-> ICRF
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(icrf_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 |
rotation matrix for ICRF <-> Mean Ecliptic
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ecliptic_frame), | intent(inout) | :: | me | |||
| class(ephemeris_class), | intent(inout) | :: | eph | |||
| 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 |
rotation matrix for IAU_EARTH <-> ICRF
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(iau_earth_rotating_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 |
rotation matrix for IAU_MOON <-> ICRF
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(iau_moon_rotating_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 |
Transformation units test