calcVinEll {MGDrivE} | R Documentation |
Calculate Geodesic Distance - Vincenty Ellipsoid Method
Description
This function calculates geodesic distance using the original Vincenty Ellipsoid method.
Usage
calcVinEll(
latLongs,
a = 6378137,
b = 6356752.3142,
f = 1/298.257223563,
eps = 1e-12,
iter = 100
)
Arguments
latLongs |
Two column matrix of latitudes/longitudes |
a |
Equatorial radius of the earth, default is WGS-84 radius |
b |
Polar radius of the earth, default is WGS-84 radius |
f |
Flattening or inverse eccentricity, default eccentricity is WGS-84 |
eps |
Convergence criteria |
iter |
Maximum number of iterations to attempt convergence |
Examples
# two-column matrix with latitude/longitude, in degrees
latLong = cbind(runif(n = 5, min = 0, max = 90),
runif(n = 5, min = 0, max = 180))
# Vincenty Ellipsoid distance formula
distMat = calcVinEll(latLongs = latLong)
[Package MGDrivE version 1.6.0 Index]