Function lupnt::GetFrameCenter

Function Documentation

BodyId lupnt::GetFrameCenter(Frame frame)

Returns the natural central body (NAIF body ID) of a reference frame, e.g. Frame::GCRF/Frame::ITRF -> BodyId::EARTH, Frame::MOON_CI -> BodyId::MOON, Frame::ICRF -> BodyId::SOLAR_SYSTEM_BARYCENTER.

Used wherever code needs to know which body a frame is centered on without hard-coding the mapping — e.g. NumericalOrbitDynamics checks that a state’s frame and its body-fixed frame share the same center, JointOrbitClockDynamics uses it to determine the gravitational parameter for the propagated body, and Clock/StateConverter use it to pick the relativity-correction or gravitational-parameter reference body for a state’s frame.

Parameters:

frame – Reference frame

Returns:

NAIF body identifier for the frame’s origin