Function lupnt::cheby_eval_ad

Function Documentation

Vec2 lupnt::cheby_eval_ad(Real x, double *scale, double *coeff, long num)

Autodiff (Real) counterpart of cheby_eval.

Used by ChebyshevFitModel::Eval (lupnt/numerics/cheby_fit.h) to evaluate fitted Chebyshev models — e.g. SPICE-fitted Earth-orientation parameters / lunar libration angles (InitFrameConversionFromSpice) and GnssConstellation’s fitted ECI ephemeris — while preserving exact analytic time derivatives through x’s autodiff seed.

Parameters:
  • x – Evaluation point (e.g. epoch [s past J2000])

  • scale{midpoint, radius} of the valid interval for x

  • coeff – Chebyshev coefficients, constant term first, length num

  • num – Number of coefficients (polynomial degree + 1)

Returns:

(value, derivative) of the polynomial at x