Function lupnt::RotMoonCiToPa¶
Defined in File frame_conversions.cc
Function Documentation¶
-
Mat3 lupnt::RotMoonCiToPa(Real t_tdb, Mat3 *R_mi2pa_dot = nullptr)¶
Returns the MoonCi-to-MoonPa rotation matrix R_mi2pa at epoch
t_tdb, which rotates a vector from MoonCi (Moon-centered inertial, ICRF-aligned axes) into MoonPa (Moon-fixed principal-axis frame) via the ZXZ Euler-angle libration sequenceR_mi2pa = Rz(psi) * Rx(theta) * Rz(phi), i.e.v_PA = R_mi2pa * v_CI.If InitFrameConversionFromSpice has fitted a lunar-orientation model covering
t_tdb, the SPICE-fitted MOON_CI->MOON_PA rotation (and its exact analytic derivative) is used directly in place of the DE-Chebyshev “lunar mantle libration” angle reconstruction (see GetLunarMantleData), so that this matches lupnt::spice::ConvertFrameSpice closely.Used internally by MoonCiToPa/MoonPaToCi to rotate (and, via
R_mi2pa_dot, differentiate) position/velocity between the inertial and body-fixed lunar frames. The libration angles (phi, theta, psi) and their rates normally come from the DE Chebyshev “lunar mantle libration” data (GetLunarMantleData), but if InitFrameConversionFromSpice has fitted a SPICE-derived lunar-orientation model coveringt_tdb, that fitted rotation (and derivative) is used instead so that this matcheslupnt::spice::ConvertFrameSpiceclosely. Results are cached per epoch to avoid recomputation across repeated calls at the samet_tdb.Note
Astrodynamics Convention & Modeling Reference, Version 1.1, Page 42
- Parameters:
t_tdb – Epoch [s, TDB since J2000]
R_mi2pa_dot – [out, optional] If non-null, receives the exact time derivative dR_mi2pa/dt [1/s]
- Returns:
3x3 MoonCi-to-MoonPa rotation matrix R_mi2pa (dimensionless)