The Moon-centered Earth-Moon rotating frame transformations at et (and their
time derivatives), consistent with the toolkit's two_body_rotating_frame
as used in set_segment_inputs and propagate_segment.
Requires the splined ephemeris (for the time derivatives).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | seg | |||
| real(kind=wp), | intent(in) | :: | et |
ephemeris time [sec] |
||
| real(kind=wp), | intent(out), | optional, | dimension(6,6) | :: | m |
inertial to rotating |
| real(kind=wp), | intent(out), | optional, | dimension(6,6) | :: | mdot |
dm/dt |
| real(kind=wp), | intent(out), | optional, | dimension(6,6) | :: | n |
rotating to inertial |
| real(kind=wp), | intent(out), | optional, | dimension(6,6) | :: | ndot |
dn/dt |
subroutine earth_moon_frame_matrices(seg, et, m, mdot, n, ndot) implicit none class(segment),intent(inout) :: seg real(wp),intent(in) :: et !! ephemeris time [sec] real(wp),dimension(6,6),intent(out),optional :: m !! inertial to rotating real(wp),dimension(6,6),intent(out),optional :: mdot !! dm/dt real(wp),dimension(6,6),intent(out),optional :: n !! rotating to inertial real(wp),dimension(6,6),intent(out),optional :: ndot !! dn/dt real(wp),dimension(6) :: rv, rvdot logical :: status_ok select type (eph => seg%eph) class is (jpl_ephemeris_splined) call eph%get_rv(et,body_moon,body_earth,rv,status_ok) ! (secondary w.r.t. primary) if (status_ok) call eph%get_rv_derivative(et,body_moon,body_earth,rvdot,status_ok) class default error stop 'error: earth_moon_frame_matrices requires the splined ephemeris' end select if (.not. status_ok) error stop 'ephemeris error in earth_moon_frame_matrices' call two_body_rotating_frame_matrices(rv, rvdot(1:3), rvdot(4:6), m, mdot, n, ndot) end subroutine earth_moon_frame_matrices