Learn R Programming

geosphere (version 1.0.0)

destPoint: Destination given bearing and distance, when following a great circle

Description

Calculate the destination point travelling along a (shortest distance) great circle arc, given a start point, initial bearing, and distance.

Usage

destPoint(p, brng, d, r = 6378137)

Arguments

p
longitude/latitude of point(s), in degrees; can be a vector of two numbers, a matrix of 2 columns (first one is longitude, second is latitude) or a spatialPoints* object
brng
bearing
d
distance
r
radius of the earth; default = 6378137 m

Value

  • A pair of coordinates (longitude/latitude)

References

http://www.movable-type.co.uk/scripts/latlong.html http://williams.best.vwh.net/ftp/avsig/avform.txt

Examples

Run this code
p <- c(5,52)
d <- destPoint(p,30,10000)

#final bearing, when arriving at endpoint: 
finalBearing(d, p)

Run the code above in your browser using DataLab