Calculates speed and change of speed along a trajectory over time. These are the first and second order derivatives of distance travelled over time. Noisy trajectories should be smoothed before being passed to this function, as noise is effectively amplified when taking derivatives.
TrajDerivatives(trj)
A list with components:
numeric vector, speed between each pair of trajectory points, i.e. the speed of each step.
numeric vector, times corresponding to values in
speed
, i.e. the time from the start of the trajectory to the end of
each step.
numeric vector, change in speed between steps. Despite the name, this is not acceleration as defined by mechanics.
numeric vector, time from the start of the trajectory to the end of the second step in each pair.
Trajectory whose speed and change in speed is to be calculated.
The value returned as acceleration
is not technically
acceleration. In mechanics, acceleration is a vector. The returned value is a
scalar quantity: change of speed, which is sometimes known informally as
acceleration. This value corresponds to the acceleration in a 1-dimensional
trajectory, with the sign indicating the direction of acceleration relative
to the current direction of velocity. See TrajAcceleration
for
an approximation of (vector) acceleration, and TrajVelocity
for
an approximation of velocity.
TrajSpeedIntervals
for analysing intervals of low or
high speed within the trajectory. TrajSmoothSG
for smoothing
a trajectory. TrajAcceleration
for calculating acceleration,
and TrajVelocity
for calculating velocity.