Calculate the great-circle distance between geographic (LL) coordinates. Also calculate the initial bearing of the great-circle arc (at its starting point).
calcGCdist(lon1, lat1, lon2, lat2, R=6371.2)
Arguments
lon1: numeric -- Longitude coordinate (degrees) of the start point.
lat1: numeric -- Latitude coordinate(degrees) of the start point.
lon2: numeric -- Longitude coordinate(degrees) of the end point.
lat2: numeric -- Latitude coordinate(degrees) of the end point.
R: numeric -- Mean radius (km) of the Earth.
Details
The great-circle distance is calculated between two points along a spherical surface using the shortest distance and disregarding topography.