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)

## Arguments

n.locs

the number of locations for the simulated track

start

vector indicating the start point c(x,y,z)

a0

g0

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?

## Value

A 3 dimensional trajectory in the form of a data.frame

## Note

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)

## Examples

sim.uncond.3d(
10, start = c(0, 0, 0), a0 = pi / 2, g0 = pi / 2,
densities = get.track.densities.3d(niclas)
)
#>   |Simulate UERW with 10 steps
#>
|
|                                                                      |   0%
#>   |TLD cube dimensions: 9 x 14 x 3
#>
|
|==============                                                        |  20%
|
|=====================                                                 |  30%
|
|============================                                          |  40%
|
|===================================                                   |  50%
|
|==========================================                            |  60%
|
|=================================================                     |  70%
|
|========================================================              |  80%
|
|===============================================================       |  90%
|
|======================================================================| 100%
#>   |Elapsed time: 0s
#>              x         y          z        a        g            t            l
#> 1       0.0000     0.000    0.00000 1.570796 1.570796 -0.004486534  0.030553292
#> 2    -431.5487  1327.617   62.78560 1.885078 1.525851  0.314281651 -0.044945233
#> 3   -3481.7227  4299.955   69.39179 2.369118 1.569245  0.484039958  0.043394091
#> 4   -4319.7346  4913.369   74.41840 2.509720 1.565956  0.140602079 -0.003288947
#> 5   -5080.6516  5486.818   86.65744 2.495773 1.557952 -0.013946636 -0.008004474
#> 6   -6249.7496  6859.086   91.64365 2.276419 1.568030 -0.219354560  0.010078681
#> 7  -11091.7562 10591.643  -15.52447 2.484868 1.588324  0.208449315  0.020293337
#> 8  -15523.6168 14156.670  -60.93239 2.464169 1.578780 -0.020698877 -0.009544205
#> 9  -20928.6519 17329.908 -254.68296 2.610720 1.601699  0.146551215  0.022919542
#> 10 -25448.7349 19040.111 -471.60070 2.779882 1.615651  0.169162006  0.013951597
#>           d            p
#> 1  5549.338           NA
#> 2  1397.406 2.751322e-05
#> 3  4258.920 1.388643e-04
#> 4  1038.540 1.033153e-04
#> 5   952.884 1.518023e-04
#> 6  1802.758 1.734284e-04
#> 7  6114.613 8.233621e-05
#> 8  5687.958 3.146555e-04
#> 9  6270.676 1.334396e-04
#> 10 4837.665 1.003630e-04