TrajDerivatives: Calculates trajectory speed and change of speed

View source: R/speed.R

TrajDerivativesR Documentation

Calculates trajectory speed and change of speed

Description

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.

Usage

TrajDerivatives(trj)

Arguments

trj

Trajectory whose speed and change in speed is to be calculated.

Details

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.

Value

A list with components:

speed

numeric vector, speed between each pair of trajectory points, i.e. the speed of each step.

speedTimes

numeric vector, times corresponding to values in speed, i.e. the time from the start of the trajectory to the end of each step.

acceleration

numeric vector, change in speed between steps. Despite the name, this is not acceleration as defined by mechanics.

accelerationTimes

numeric vector, time from the start of the trajectory to the end of the second step in each pair.

See Also

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.


JimMcL/trajr documentation built on July 23, 2024, 2:06 a.m.