powered by
Bearing calculations
bearing(lat_orig, lon_orig, lat_dest, lon_dest)compass2bearing(compass)easterly_component(compass)northerly_component(compass)
compass2bearing(compass)
easterly_component(compass)
northerly_component(compass)
Latitude and longitude of origin and destination.
A character vector of compass rose points, such as c("NW", "E", "SSW").
c("NW", "E", "SSW")
bearing
An approximate bearing from _orig and _dest.
_orig
_dest
compass2bearing
The bearing encoded by the compass input.
easterly_component
The easterly component of a unit vector pointing in the direction provided.
# NOT RUN { bearing(0, 0, 90, 0) bearing(-35, 151, 51, 0) compass2bearing("NW") easterly_component("E") easterly_component("NW") # }
Run the code above in your browser using DataLab