Function lupnt::GetBodyPosVel(Real, BodyId, BodyId, Frame)¶
Defined in File kernels.cc
Function Documentation¶
-
Vec6 lupnt::GetBodyPosVel(Real t_tdb, BodyId center, BodyId target, Frame frame)¶
Get the position and velocity of
targetrelative tocenterfrom the DE ephemeris, expressed inframe.Used throughout the simulator wherever a third-body state is needed: third-body gravitational perturbations in NumericalOrbitDynamics::CalcContrib (dynamics/numerical_orbit_dynamics.cc), Sun/body direction vectors for attitude pointing (dynamics/attitude_dynamics.cc), light-time/Shapiro-delay corrections in conversions/time_conversions.cc and the measurement models, and joint orbit/clock dynamics (dynamics/joint_orbit_clock_dynamics.cc). Lazily loads the DE440 ephemeris on first call. Internally evaluates the relevant DE Chebyshev blocks (combining Earth, Earth-Moon barycenter, and Moon data as needed for Earth/Moon/EMB queries) and, unless
frameis GCRF, rotates both states intoframevia ConvertFrame before differencing.- Parameters:
- Returns:
6-vector [rx, ry, rz, vx, vy, vz]: position [m] and velocity [m/s] of
targetrelative tocenter, expressed inframe. Zero ifcenter == target.