sinuosity: Sinuosity

View source: R/shape.R

sinuosityR Documentation

Sinuosity

Description

Given a set of successive step lengths and turning angles, this function computes he sinuosity of a trajectory as defined by Benhamou (2004), equation 8. This is a corrected version of the sinuosity index defined in Bovet & Benhamou (1988), which is suitable for a wider range of turning angle distributions, and does not require a constant step length.

Usage

sinuosity(step_lengths, turning_angles)

Arguments

step_lengths

A vector of step lengths as calculated by linear_dist.

turning_angles

A vector of turning angles as calculated by ang_speed.

Value

A single numeric value corresponding to the sinuosity of the trajectory.

Author(s)

Simon Garnier, garnier@njit.edu

References

Benhamou, S. (2004). How to reliably estimate the tortuosity of an animal’s path: straightness, sinuosity, or fractal dimension? Journal of Theoretical Biology, 229(2), 209–220. https://doi.org/10.1016/j.jtbi.2004.03.016

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

See Also

linear_dist, ang_speed

Examples

x <- rnorm(25)
y <- rnorm(25, sd = 3)
t <- as.POSIXct(1:25, origin = Sys.time())
step_lengths <- linear_dist(x, y)
turning_angles <- ang_speed(x, y, t)
sinuosity(step_lengths, turning_angles)


swarm-lab/swaRm documentation built on Dec. 3, 2023, 9:30 p.m.