Function lupnt::cheby_posvel_ad

Function Documentation

Vec6 lupnt::cheby_posvel_ad(Real t, double *seg, long len)

Autodiff (Real) counterpart of cheby_posvel.

Called by spice::GetBodyPosVelBase (spice.cc) — the core of spice::GetBodyPosVel — to evaluate cached de440.bsp Chebyshev segments (extracted once by spk_extract during LoadSpiceKernel) at an arbitrary epoch t, preserving t’s autodiff derivative in the returned velocity.

Parameters:
  • t – Ephemeris time [s past J2000]

  • seg – Raw SPK Chebyshev segment data

  • len – Length of seg in doubles

Returns:

[r; v] position [km] / velocity [km/s], or Vec6::Zero() if t is outside the segment’s covered time range