
Per-observation angular (turning-rate) velocity for a Tracks
Source:R/track_metrics.R
angular_velocity.RdThe signed rate of change of travel direction at each point – how fast, and which way, the trajectory is turning. Positive is counter-clockwise (a left turn). Each interior point's turn (the angle between its incoming and outgoing step) is divided by the centred time step; the first and last point of every trajectory are `NA`.
Usage
angular_velocity(
ts,
units = c("radians", "degrees"),
x_col = ts@cols$x,
y_col = ts@cols$y
)Value
A numeric vector, one value per observation in `ts@data` order, `NA` at each trajectory's first and last point.
Details
Numeric (frame) time requires a frame rate ([set_frame_rate()]); POSIXct time is used directly. The result is scale-free (an angle), so no distance calibration is applied.
Examples
summary(angular_velocity(cpunctatus, units = "degrees"))
#> Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
#> -36.000 0.000 0.000 1.131 0.636 36.000 470