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 |
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] |
coordinate transformation routine
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 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 |
type,extends(rotating_frame_class),public :: two_body_rotating_frame !! The two-body rotating frame is constructed from the states !! of two celestial bodies. type(celestial_body) :: secondary_body = body_moon !! the secondary body used to construct the frame integer :: center = center_at_barycenter !! the frame center (can be primary_body,secondary_body, or barycenter) real(wp),dimension(6) :: rv12 = zero !! [r,v] of secondary body w.r.t. primary body contains procedure :: from_primary_to_center procedure :: get_c_cdot => get_c_cdot_two_body_rotating end type two_body_rotating_frame