Function lupnt::spice::GetBodyPosVel(const Real, BodyId, BodyId)¶
Defined in File spice.cc
Function Documentation¶
-
Vec6 lupnt::spice::GetBodyPosVel(const Real t_tdb, BodyId center, BodyId target)¶
Get the Body Position and Velocity using Chebyshev polynomials.
Get the inertial (J2000) position and velocity of
targetrelative tocenteratt_tdb, via the cached Chebyshev SPK segments extracted byLoadSpiceKernel.This is
lupnt’s primary high-accuracy ephemeris source: it is the function backingspice::ConvertFrameSpice’s body-relative frame shifts (GCRF<->ICRF, GCRF<->MOON_CI, GCRF<->EMR, …) and is the reference sampled byInitFrameConversionFromSpice/ComputeEopFromSpice. Handles barycenter-vs-body indirection internally (e.g. Earth/Moon/Mercury/Venus positions are obtained via their system barycenters plus a body-relative-to-barycenter Chebyshev segment) by delegating to the internalGetBodyPosVelBasehelper. Note: returned in the SPK’s native km / km/s units (unlike most otherlupntstate vectors, which are in meters);ConvertFrameSpiceoperates consistently in these units internally.- Parameters:
t_tdb – TDB seconds from J2000.
center – center body id
target – target body id
t_tdb – Epoch [s, TDB seconds since J2000]
center – Origin body of the returned state
target – Body whose state is returned
- Returns:
Vec6 in intertial axes
- Returns:
[r; v]position [km] and velocity [km/s] oftargetrelative tocenter, in the J2000 inertial frame