distAngle: Calculate distance between points y and z and turning angle...

View source: R/distAngle.R

distAngleR 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

'UTM' if easting/northing provided (the default), 'LL' if longitude/latitude

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


momentuHMM documentation built on Oct. 19, 2022, 1:07 a.m.