turnAngle: Turning angle

Description Usage Arguments Value Examples

View source: R/turnAngle.R

Description

Used in prepData and simData.

Usage

1
turnAngle(x, y, z, type = "UTM", angleCov = FALSE)

Arguments

x

First point

y

Second point

z

Third point

type

'UTM' if easting/northing provided (the default), 'LL' if longitude/latitude. If type='LL' then the geosphere package must be installed.

angleCov

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).

Value

The angle between vectors (x,y) and (y,z).

If type='LL' then turning angle is calculated based on initial bearings using bearing.

Examples

1
2
3
4
5
6
7
## Not run: 
x <- c(0,0)
y <- c(4,6)
z <- c(10,7)
momentuHMM:::turnAngle(x,y,z)

## End(Not run)

momentuHMM documentation built on Sept. 5, 2021, 5:17 p.m.