powered by
Used in prepData and simData.
prepData
simData
turnAngle(x, y, z, type = "UTM", angleCov = FALSE)
The angle between vectors (x,y) and (y,z).
If type='LL' then turning angle is calculated based on initial bearings using bearing.
type='LL'
bearing
First point
Second point
Third point
'UTM' if easting/northing provided (the default), 'LL' if longitude/latitude. If type='LL' then the geosphere package must be installed.
'UTM'
'LL'
geosphere
logical indicating to not return NA when x=y or y=z. Default: FALSE (i.e. NA is returned if x=y or y=z).
if (FALSE) { x <- c(0,0) y <- c(4,6) z <- c(10,7) momentuHMM:::turnAngle(x,y,z) }
Run the code above in your browser using DataLab