dtBearing: dt bearing

Description Usage Arguments Value Note Examples

Description

Calculates the initial bearing between two pairs of latitude / longitude coordinates

Usage

1
dtBearing(latFrom, lonFrom, latTo, lonTo, compassBearing = FALSE)

Arguments

latFrom

latitude from

lonFrom

longitude from

latTo

latitude to

lonTo

longitude to

compassBearing

logical indicating whether to return the value in the range 0 - 360

Value

bearing in degrees

Note

The initial bearing is sometimes called the 'forward azimuth', which if followed in a straight line along a great-circle arc will take you from teh start point to the end point

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
dtBearing(0,0,0,52)

dtBearing(25, 0, 35, 0)

dtBearing(25, 0, -25, 0)

dtBearing(0, 0, 0, -1)
dtBearing(0, 0, 0, -1, compassBearing = TRUE)

dtBearing(0, 0, 1, -1)

dtBearing(0, 0, 0, 1)

dtBearing(0, 0, 1, -0.001)
dtBearing(0, 0, 1, -0.001, compassBearing = TRUE)

dtBearing(-37,144,-38,145)

SymbolixAU/spatialdatatable documentation built on May 6, 2019, 11:20 a.m.