compute_bearing: Bearing computation

Description Usage Arguments Value Examples

View source: R/SMP-framework-sub-functions.R

Description

Computes the bearing or heading angle between a pair of decimal degree geospatial coordinates.

Usage

1
compute_bearing(lat_1, lon_1, lat_2, lon_2)

Arguments

lat_1

The decimal degree latitude value of coordinate one.

lon_1

The decimal degree longitude value of coordinate one.

lat_2

The decimal degree latitude value of coordinate two.

lon_2

The decimal degree longitude value of coordinate two.

Value

The absolute bearing or heading angle from coordinate one to coordinate two in degrees.

Examples

1
my_bearing <- compute_bearing(lat_1 = 8.46696, lon_1 = -17.03663, lat_2 = 32.918481, lon_2 = 11.96337)

Ryan-Colin-White/smp-framework-in-r documentation built on Dec. 18, 2021, 11:55 a.m.