Function lupnt::spice::GetBodyPosSpice

Function Documentation

Vec3d lupnt::spice::GetBodyPosSpice(Real t_tdb, BodyId obs, BodyId target, const std::string &refFrame = "J2000", const std::string &abCorrection = "NONE")

Get the position of target relative to obs at t_tdb directly from SPICE (spkpos_c), without LuPNT’s Chebyshev cache.

A lower-level, double-precision alternative to GetBodyPosVel, allowing arbitrary SPICE reference frames and aberration corrections (e.g. light-time/stellar-aberration corrections for measurement modeling) not expressible via the J2000-only GetBodyPosVel.

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

  • obs – Observer body (SPICE obs)

  • target – Target body (SPICE targ)

  • refFrame – SPICE reference frame for the returned vector (default "J2000")

  • abCorrection – SPICE aberration correction (e.g. "NONE", "LT")

Returns:

Position of target relative to obs [km], in refFrame