Function lupnt::cheby_eval¶
Defined in File spice_cheby.cc
Function Documentation¶
-
void lupnt::cheby_eval(double x, double *scale, double *coeff, long num, double *f, double *df)¶
Evaluate the given Chebyshev polynomial at x, returning both the evaluated polynomial in *f, and the evaluated derivative of the polymonial in df. The number of coefficients is num (the degree of the polynomial is num - 1), and the coefficients are coeff[0..num-1]. The first coefficient coeff[0] is the constant term. The scaling of x is provided by the midpoint scale[0] and the radius scale[1]. x must fall in the range scale[0] - scale[1] to scale[0] + scale[1]. Outside of that range, the polynomial is not valid.
Evaluate a Chebyshev polynomial (and its derivative) at
x, double-precision implementation.Evaluates the degree-(num-1) Chebyshev series with coefficients
coeff[0..num-1](T_n basis, constant term first), after rescalingxto[-1, 1]via the segment’s midpoint/radiusscale = {scale[0], / scale[1]}(valid forxin[scale[0]-scale[1], scale[0]+scale[1]]). Used internally bycheby_posvelto evaluate one (x, y, or z) component of an SPK Chebyshev record.- Parameters:
x – Evaluation point (e.g. ephemeris time [s past J2000])
scale –
{midpoint, radius}of the valid interval forxcoeff – Chebyshev coefficients, constant term first, length
numnum – Number of coefficients (polynomial degree + 1)
f – Output: polynomial value at
xdf – Output: derivative of the polynomial at
xw.r.t.x