destination
estimates the destination latitude and
longitude given a starting latitude and longitude, a
bearing and distance. For general information on
Vincenty's formula, see e.g.,
http://en.wikipedia.org/wiki/Vincenty's_formulae. It
states: Vincenty's formulae are two related
iterative methods used in geodesy to calculate the distance
between two points on the surface of an spheroid, developed
by Thaddeus Vincenty in 1975. They are based on the
assumption that the figure of the Earth is an oblate
spheroid, and hence are more accurate than methods such as
great-circle distance which assume a spherical Earth.
Note: this method assumes a locations are lat &
lon given in WGS 84.
destination(lat, lon, bearing, distance)
See examples for all possible usages.
###single lat lons
lats = -85; lons = 165
#single bearing & single distance
destination(lats,lons,bearing=180,distance=500000)
#multiple bearings
destination(lats,lons,bearing=seq(0,360,length.out=9),distance=500000)
#multiple bearings
destination(lats,lons,bearing=45,distance=seq(0,5000000,length.out=11))
#multiple bearings, multiple distances
destination(lats,lons,bearing=seq(0,360,length.out=9),
distance=seq(0,5000000,length.out=11))
###multiple lat lons
lats = seq(-90,90,length.out=9); lons = seq(-180,180,length.out=9)
#multiple lat lons but single bearings / distances
destination(lats,lons,bearing=45,distance=500000)
#different bearings for each lat lon
destination(lats,lons,bearing=seq(0,360,length.out=9),distance=500000)
#different distances for each lat lon
destination(lats,lons,bearing=45,distance=seq(0,5000000,length.out=9))
#different bearings & distances for each lat lon
destination(lats,lons,bearing=seq(0,360,length.out=9),
distance=seq(0,5000000,length.out=9))
Run the code above in your browser using DataLab