Struct ChebyshevFitModel¶
Defined in File cheby_fit.h
Struct Documentation¶
-
struct ChebyshevFitModel¶
A piecewise-Chebyshev fit of an
num_dims-dimensional function of time over [t_start, t_end] (epochs in seconds relative to J2000).Built by
FitChebyshevModel(or, for Euler angles, the analogousFitEulerAngleModelin frame_conversions.cc) and consulted viaEvalwhenever a SPICE-fitted quantity is requested — e.g. byInitFrameConversionFromSpicefor Earth orientation parameters and lunar libration angles, and byGnssConstellation::GetSatelliteStateChebyshevEcifor fitted ECI ephemeris.Public Functions
-
inline const ChebyshevFitSegment *FindSegment(double t) const¶
Locate the segment of this model whose validity interval covers epoch
t.Used internally by
Evalto pick the correct set of Chebyshev coefficients before callingcheby_eval_ad.- Parameters:
t – Epoch to look up [s, seconds relative to J2000]
- Returns:
Pointer to the covering segment, or
nullptriftlies outside [t_start, t_end] or no segments are present (caller must not deref in that case)
-
inline bool Eval(Real t, VecX *f, VecX *df) const¶
Evaluate the fitted
num_dims-dimensional function (and optionally its exact analytic time derivative) at epocht.Called by the frame-conversion routines (e.g.
RotPolarMotion,RotSideralMotion/RotSideralMotionDot,MoonCiToPa/MoonPaToCi) once a SPICE-fitted model is active for the requested epoch, in place of the analytic/IERS-table-based computation.- Parameters:
t – Epoch to evaluate at [s, seconds relative to J2000]
f – Output: fitted function value, resized to
num_dims[units of the fitted quantity, e.g. rad for EOP/Euler angles, s for UT1-UTC]df – Optional output: exact analytic time derivative of
fw.r.t.t, same units per second; passnullptrto skip
- Returns:
True if
tis within [t_start, t_end] andf(anddf, if requested) were populated; false otherwise (outputs left unmodified)
-
inline const ChebyshevFitSegment *FindSegment(double t) const¶