rotation matrix from J2000 to the frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(moon_frame_interpolater), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in) | :: | et |
function j2000_to_frame(me, et) result(rot) !! rotation matrix from J2000 to the frame class(moon_frame_interpolater), intent(inout) :: me real(wp), intent(in) :: et real(wp) :: rot(3, 3) real(wp) :: roll, pitch, yaw_x, yaw_y, yaw integer :: iflag call me%roll_spline%evaluate (et, 0, roll, iflag); if (iflag/=0) error stop 'error computing roll spline.' call me%pitch_spline%evaluate(et, 0, pitch, iflag); if (iflag/=0) error stop 'error computing pitch spline.' call me%yaw_x_spline%evaluate(et, 0, yaw_x, iflag); if (iflag/=0) error stop 'error computing yaw_x spline.' call me%yaw_y_spline%evaluate(et, 0, yaw_y, iflag); if (iflag/=0) error stop 'error computing yaw_y spline.' yaw = atan2(yaw_y, yaw_x) ! convert to rotation matrix: call rpy_to_rot(roll, pitch, yaw, rot) end function j2000_to_frame