distAngle {momentuHMM} | R Documentation |
Calculate distance between points y and z and turning angle between points x, y, and z
Description
Calculate distance between points y and z and turning angle between points x, y, and z
Usage
distAngle(x, y, z, type = "UTM", angleCov = TRUE)
Arguments
x |
location 1 |
y |
location 2 |
z |
location 3 |
type |
|
angleCov |
logical indicating to not return NA when x=y or y=z. Default: TRUE (i.e. NA is not returned if x=y or y=z). |
Details
Used in prepData
and simData
to get distance and turning angle covariates
between locations (x1,x2), (y1,y2) and activity center (z1,z2).
If type='LL'
then distance is calculated as great circle distance using spDistsN1
, and turning angle is calculated based on initial bearings using bearing
.
Value
2-vector with first element the distance between y and z and second element the turning angle between (x,y) and (y,z).
[Package momentuHMM version 1.5.5 Index]