The right-hand side, the start state, the interval and the step.
The trajectory.
When interval, step, tolerance, partition, failure scope or defect-mode combination is invalid, a fixed step's count over the interval is not a safe integer, the state is empty, required rate shape is missing, a defect is negative/NaN, adaptive refinement reaches time resolution, or adaptive stepping needs more than DOPRI5's default maximum of 100000 step attempts. Errors from the pure physical model propagate unchanged.
A trajectory planned once and read by time: the solution of
dx/dt = f(t, x)fromt0tot1by classical fourth-order Runge-Kutta at a fixed step, its knots kept with their derivatives and read between them by cubic Hermite interpolation.The step count is
ceil((t1 - t0) / h), the last step shortened to land ont1exactly. A state may carry an orientation block, a unit quaternion advanced on the exponential map by the body-frame angular velocityfreturns, by the fourth-order Runge-Kutta-Munthe-Kaas method: each stage turns the step's start orientation by a rotation vector built from the earlier stages, each stage's body rate is carried to that vector's derivative by the inverse differential of the exponential, and the step turns the start by the stages' weighted vector, renormalised at each knot. Between knots the vector is the cubic Hermite of the two knots' values and derivatives, exact at knots and C1 between; the orientation is the start knot turned by the cubic Hermite of the rotation vector to the end knot, matching both knots' body rates, so a rate read between knots is the motion's and not the step's mean. Reads outside[t0, t1]hold the nearer end.Given a
tolerance, Dormand-Prince 5(4) controls its existing endpoint RMS estimate. Its default continuous extension is quartic; orientation slopes at both ends use the exact right exponential Jacobian. An explicitrotationDefectadditionally builds the paired quintic continuous extensions of Enright and Hayes and checks their actual body angular velocities in the caller's physical units. The maximum of the existing RMS and physical estimate controls the same step controller. These sampled estimates are not continuous or global-error certificates for an arbitrary pure callback.The output depends on the numeric inputs, pure
fand optional pure defect callback, never on playback times or order. The default fixed step is a sixtieth of a second; a stiff RHS needs a smaller fixed step or adaptive control. Optional orientation-only playback reads the same solved quaternion without vector interpolation or vector copying, and still returns a fresh quaternion. The caller supplies finite numeric state and rate components. This wrapper checks vector lengths and the presence of an angular rate for an oriented state; it does not validate the components of x0, dx or w for finiteness.