R/misc.R
bearing_to_lonlat.Rd
Calculate destination lat/lon given an origin, a great circle distance of travel, and a bearing.
bearing_to_lonlat(origin_lon, origin_lat, bearing, gc_dist)
origin_lon | The origin longitude |
---|---|
origin_lat | The origin latitude |
bearing | The angle in degrees relative to due north |
gc_dist | The great circle distance in (km) |
# one degree longitude is approximately 111km at the equator. Therefore if we # travel 111km due east from the coordinate {0,0} we can verify that we have # moved approximately 1 degree longitude and zero degrees latitude bearing_to_lonlat(0, 0, 90, 111)#> $longitude #> [1] 0.998247 #> #> $latitude #> [1] 6.112191e-17 #>