R: Calculate Bearing Between Two Positions

bearing {swfscMisc} | R Documentation

## Calculate Bearing Between Two Positions

### Description

Calculates the bearing between two points, given each point's latitude and longitude coordinates

### Usage

    bearing(lat1, lon1, lat2, lon2)

### Arguments

`lat1, lon1` | numeric. The latitude and longitude of the starting coordinate in decimal degrees.
`lat2, lon2` | numeric. The latitude and longitude of the ending coordinate in decimal degrees.

### Value

vector with initial and final bearings.

### Author(s)

Eric Archer eric.archer@noaa.gov

### Examples

    # What is the bearing from San Diego, CA to Honolulu, HI?
    bearing(32.87, -117.25, 21.35, -157.98)

[Package swfscMisc version 1.2 Index]