sim.uncond.3d {eRTG3D} | R Documentation |
This function creates unconditional walks with prescribed empirical properties (turning angle, lift angle and step length and the auto-differences of them. It can be used for uncon- ditional walks or to seed the conditional walks with comparably long simulations. The conditional walk connecting a given start with a certain end point by a given number of steps needs an attraction term (the Q probability, see qProb.3d) to ensure that the target is approached and hit. In order to calculate the Q probability for each step the distribution of turns and lifts to target and the distribution of distance to target has to be known. They can be derived from the empirical data (ideally), or estimated from an unconditional process with the same properties. Creates a unconditional empirical random walk, with a specific starting point, geometrically similar to the initial trajectory.
sim.uncond.3d(n.locs, start = c(0, 0, 0), a0, g0, densities, error = TRUE)
n.locs |
the number of locations for the simulated track |
start |
vector indicating the start point |
a0 |
initial heading in radian |
g0 |
initial gradient/polar angle in radian |
densities |
list object returned by the get.densities.3d function |
error |
logical: add random noise to the turn angle, lift angle and step length to account for errors measurements? |
A 3 dimensional trajectory in the form of a data.frame
Simulations connecting start and end points
with more steps than 1/10th or more of the number of steps
of the empirical data should rather rely on simulated
unconditional walks with the same properties than on
the empirical data (factor = 1500
).
For a random initial heading a0 use:
sample(atan2(diff(coordinates(track)[,2]), diff(coordinates(track)[,1])),1)
sim.uncond.3d(
10, start = c(0, 0, 0), a0 = pi / 2, g0 = pi / 2,
densities = get.track.densities.3d(niclas)
)