Function lupnt::GetFrameRotationTranslationRv

Function Documentation

std::pair<Mat6, Vec6> lupnt::GetFrameRotationTranslationRv(Real t_tdb, Frame from_frame, Frame to_frame)

r_to = R * r_from + r

Returns the affine Cartesian-state transform (R6, t6) such that x_to = R6 * x_from + t6 converts a 6-element position+velocity state from from_frame to to_frame at epoch t_tdb.

t6 is obtained by transforming the zero state, and R6 (6x6) by transforming each of the 6 basis states and subtracting t6; this lets callers apply a single linear(-affine) map to many states/derivatives without repeatedly calling ConvertFrame. Used wherever a Jacobian or batch of relative states needs to be mapped between frames at a fixed epoch.

Note

Returns a pair of rotation matrix and translation vector The rotation matrix is the rotation from from_frame to to_frame The translation vector is the translation from from_frame to to_frame Returns (R6, t6) such that x_to = R6 * x_from + t6 R6 is 6x6; t6 is 6x1.

Parameters:
  • t_tdb

  • from_frame

  • to_frame

  • t_tdb – Epoch [s, TDB since J2000]

  • from_frame – Input reference frame

  • to_frame – Output reference frame

Returns:

Returns:

Pair (R6, t6): 6x6 rotation/state matrix R6 (dimensionless for the rotation block) and 6-vector translation t6 [m, m/s]