turnAngle: Turning angle

View source: R/turnAngle.R

turnAngleR Documentation

Turning angle

Description

Used in prepData and simData.

Usage

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

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

## End(Not run)

bmcclintock/momentuHMM documentation built on Oct. 26, 2022, 1 a.m.