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

Function Documentation

Vec6 lupnt::ConvertFrame(Real t_tdb, const Vec6 &rv_in, Frame frame_in, Frame frame_out, bool rotate_only = false)

Converts a Cartesian position+velocity state at epoch t_tdb from frame_in to frame_out.

This is the primary entry point used throughout the simulator (dynamics propagators, measurement models, agent state access, environment models) whenever a Cartesian state must be re-expressed in a different reference frame. It dispatches through ConvertFrameBase, which recursively walks the frame graph (ITRF/TOD/MOD/CIRS/EME/SER/GSE/EMR <-> GCRF <-> ICRF, and GCRF <-> MoonCi <-> MoonPa/MoonMe/MoonOp for the Moon) applying the individual *To* conversion functions declared in frame_conversions.h until frame_out is reached.

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

  • rv_in – Position+velocity state in frame_in [m, m/s]

  • frame_in – Input reference frame

  • frame_out – Output reference frame

  • rotate_only – If true, apply only the rotation (and skip the frame-origin translation/velocity offset) &#8212; e.g. to transform a relative state rather than an absolute one

Returns:

Position+velocity state in frame_out [m, m/s]