Function lupnt::GetBodyPos(Real, BodyId, BodyId, Frame)

Function Documentation

Vec3 lupnt::GetBodyPos(Real t_tdb, BodyId center, BodyId target, Frame frame)

Get the position of target relative to center from the DE ephemeris, expressed in frame.

Used wherever only a third-body position (not velocity) is needed — e.g. Sun/body direction vectors for eclipse and attitude-pointing computations (dynamics/ attitude_dynamics.cc), and third-body gravity gradients in NumericalOrbitDynamics (dynamics/numerical_orbit_dynamics.cc). Equivalent to GetBodyPosVel(t_tdb, center, target, frame).head(3).

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

  • centerBody at the origin of the returned relative position.

  • targetBody whose position is returned.

  • frame – Reference frame in which the position is expressed.

Returns:

Position of target relative to center [m], expressed in frame. Zero if center == target.