Compute surrogate track by randomizing the steps of an observed
track
Usage
randomize_track(lonlat, rotate = c(-pi, pi), reorder = FALSE)
Arguments
- lonlat
a 2-column matrix or dataframe with longitude and
latitude of each point
- rotate
a 2-element numeric vector giving the lower and
upper limits of the random rotation to apply to the randomized
track
- reorder
should the track steps be randomly reordered.
Value
A dataframe with columns
lon
the longitude of the randomized track
lat
the latitude of the randomized track
Details
Converts a track to a distance/bearing representation, and then
reconstructs a new track by randomly perturbing the bearings of
each increment, and otpionally, randomly reordering the
increments.