SLERP¶
-
ahrs.common.quaternion.
slerp
(q0: numpy.ndarray, q1: numpy.ndarray, t_array: numpy.ndarray, threshold: float = 0.9995) → numpy.ndarray¶ Spherical Linear Interpolation between two quaternions.
Return a valid quaternion rotation at a specified distance along the minor arc of a great circle passing through any two existing quaternion endpoints lying on the unit radius hypersphere.
Based on the method detailed in [Wiki_SLERP]
Parameters: - q0 (numpy.ndarray) – First endpoint quaternion.
- q1 (numpy.ndarray) – Second endpoint quaternion.
- t_array (numpy.ndarray) – Array of times to interpolate to.
- threshold (float, default: 0.9995) – Threshold to closeness of interpolation.
Returns: q – New quaternion representing the interpolated rotation.
Return type: numpy.ndarray