Function lupnt::ConvertFrame(Real, const State&, Frame, bool)

Function Documentation

State lupnt::ConvertFrame(Real t_tdb, const State &x_in, Frame frame_out, bool rotate_only = false)

Converts a typed LuPNT State (e.g. Cart6, ClassicalOE, …) to the frame frame_out at epoch t_tdb, preserving its element-type representation.

Internally converts x_in to Cartesian (Cart6) via ConvertState, applies the Vec6 ConvertFrame overload to change frames, then converts back to x_in’s original StateType. Used by agent/dynamics code that stores a state in a non-Cartesian representation (e.g. classical orbital elements) but needs it in a different reference frame.

Parameters:
  • t_tdb – Epoch [s, TDB since J2000]

  • x_in – Input state (any StateType), tagged with its current Frame

  • frame_out – Output reference frame

  • rotate_only – If true, apply only the rotation and skip frame-origin translation

Returns:

x_in re-expressed in frame_out, in its original StateType