View source: R/orthodrom.dist.r
orthodrom.dist | R Documentation |
calculates the orthodromic (great circle, shortest distance) distance between two points on the earth
orthodrom.dist(x1, y1, x2, y2)
x1 |
x-coordinate/longitude of the first point (in decimal coordinates), can be a scalar or a vector |
y1 |
y-coordinate/latitude of the first point (in decimal coordinates), can be a scalar or a vector |
x2 |
x-coordinate/longitude of the second point (in decimal coordinates), can be a scalar or a vector |
y2 |
y-coordinate/latitude of the second point (in decimal coordinates), can be a scalar or a vector |
The function is a wrapper of the distMeeus function of the geosphere package.
gives back a number or a vector with the distances in km between the two points on earth.
see details
Fraenzi Korner-Nievergelt
Imboden, C., Imboden D. (1972) Orthodromic and loxodromic formula for the calculation of distance and direction between ringing and finding place. Vogelwarte 26: 336-346.
decimal.coord
ringingx<-7.30
ringingy<-47.41
findingx<-5.1
findingy<-32.01
rxdec<-decimal.coord(ringingx)
rydec<-decimal.coord(ringingy)
fxdec<-decimal.coord(findingx)
fydec<-decimal.coord(findingy)
orthodrom.dist(rxdec, rydec, fxdec, fydec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.