Function lupnt::spice::ConvertFrameSpice(Real, const Vec6&, Frame, Frame)

Function Documentation

Vec6 lupnt::spice::ConvertFrameSpice(Real t_tdb, const Vec6 &rv_in, Frame frame_in, Frame frame_out)

Convert the state vector from one coordinate system to another (with integer ID input)

Converts a Cartesian position+velocity state at epoch t_tdb from frame_in to frame_out using SPICE-derived rotations/ephemerides directly (GetFrameConversionMat, GetBodyPosVel), rather than LuPNT’s native analytic frame-conversion chain (lupnt::ConvertFrame / frame_conversions.h).

This is the SPICE-based reference/ground-truth path used to validate and calibrate LuPNT’s analytic conversions — e.g. ComputeEopFromSpice and InitFrameConversionFromSpice (frame_conversions.h) fit LuPNT’s native GcrfToItrf/MoonCiToPa models to reproduce this function’s results over a simulation window, and tests compare the two paths directly.

Parameters:
  • t_tdb – Epoch of the state vector

  • rv_inState vector in the original coordinate system

  • frame_in – Coordinate system of the original state vector

  • frame_out – Coordinate system of the converted state vector

  • 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

Returns:

Vec6 State vector in the converted coordinate system

Returns:

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