Traj3DRediscretize: Resample a 3D trajectory to a constant step length

View source: R/3D.R

Traj3DRediscretizeR Documentation

Resample a 3D trajectory to a constant step length

Description

Constructs a new 3-dimensional trajectory by resampling the input 3-dimensional trajectory to a fixed step (or segment) length. By default, timing of frames is lost, so speed and acceleration cannot be calculated on a rediscretized trajectory. However, a constant speed may be applied to the rediscretized trajectory (simConstantSpeed = TRUE), in which case the returned trajectory will have (almost) constant speed, with average speed approximately equal to the average speed of trj3d.

Usage

Traj3DRediscretize(trj3d, R, simConstantSpeed = FALSE)

Arguments

trj3d

The 3-dimensional trajectory to be resampled.

R

rediscretization step length, in the spatial units of trj.

simConstantSpeed

If TRUE, speeds are interpolated along the new trajectory so that average speed is approximately the same as that of trj3d.

Details

Unfortunately this operation is slow for large trajectories.

Based on the appendix in Bovet and Benhamou, (1988), extended to 3 dimensions.

Value

A new 3-dimensional trajectory with a constant segment length which follows trj3d.

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

Traj3DFromCoords, TrajRediscretize


trajr documentation built on July 9, 2023, 6:03 p.m.