pykinematics.imu.utility.calc_derivative¶
-
pykinematics.imu.utility.
calc_derivative
(x, dt, order=2)¶ Calculate the 2nd or 4th order derivative of a sequence.
Parameters: - x : numpy.ndarray
1 or 2D array to take the derivative of.
- dt : float
Time difference for all points. This cannot handle varying time differences.
- order : {4, 2}, optional
Order of the derivative to calculate. Default is 2nd order.
Returns: - dx : numpy.ndarray
Derivative of x.