TrajSinuosity: Sinuosity of a trajectory

View source: R/straightness.R

TrajSinuosityR Documentation

Sinuosity of a trajectory

Description

Calculates the sinuosity of a (constant step length) trajectory as defined by Bovet & Benhamou (1988), eqn 2, which is: S = 1.18\sigma / \sqrt q where \sigma is the standard deviation of the step turning angles and q is the mean step length. A corrected sinuosity index is available as the function TrajSinuosity2 which handles a wider range of variations in step angles.

Usage

TrajSinuosity(trj, compass.direction = NULL)

Arguments

trj

Trajectory to calculate sinuosity of.

compass.direction

if not NULL, turning angles are calculated for a directed walk, assuming the specified compass direction (in radians). Otherwise, a random walk is assumed.

Details

If your trajectory does not have a constant step length, it should be _rediscretized_ by calling TrajRediscretize before calling this function.

Value

The sinuosity of trj.

References

Bovet, P., & Benhamou, S. (1988). Spatial analysis of animals' movements using a correlated random walk model. Journal of Theoretical Biology, 131(4), 419-433. doi:10.1016/S0022-5193(88)80038-9

See Also

TrajSinuosity2 for a corrected version of sinuosity, TrajAngles for the turning angles in a trajectory, TrajStepLengths for the step lengths, and TrajRediscretize for resampling to a constant step length.


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