meepmeep.numba3d.vel_c#
- meepmeep.numba3d.vel_c(time: float | ndarray[tuple[Any, ...], dtype[_ScalarT]], c: ndarray[tuple[Any, ...], dtype[_ScalarT]]) tuple[float | ndarray[tuple[Any, ...], dtype[_ScalarT]], float | ndarray[tuple[Any, ...], dtype[_ScalarT]], float | ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]#
Evaluate the planet’s (vx, vy, vz) velocity at an expansion-point-centered time.
Centered velocity companion to position.pos_c. Each velocity component is obtained by analytically differentiating the corresponding 5th-order position polynomial; the resulting polynomial is 4th-order in time and is evaluated using Horner’s scheme.
Accepts a scalar time or a 1-D array of times and dispatches to the appropriate kernel at compile time (inside
@njit) or at call time (pure Python).- Parameters:
- time
floatorNDArray Time relative to the Taylor series expansion point, i.e. time = tc - (te + epoch*p). Must lie within the expansion point’s region of validity for the truncation error to remain small.
- c
NDArray A (3, 5) coefficient matrix produced by solve3d. Row 0 holds the x-direction coefficients, row 1 the y-direction, and row 2 the z-direction, ordered as [position, velocity, acceleration/2, jerk/6, snap/24] (i.e. pre-scaled by the factorial of the Taylor order).
- time
- Returns:
Notes
The pre-factors 1, 2, 3, 4 in front of c[d, 1..4] are the chain-rule factors from differentiating c[d, n] * time^n with respect to time. Because the polynomial loses one order under differentiation, the velocity is a 4th-order Taylor approximation even though the underlying position expansion is 5th order.