
This function calculates geodesic distance using the original Vincenty Ellipsoid method.
calcVinEll(
latLongs,
a = 6378137,
b = 6356752.3142,
f = 1/298.257223563,
eps = 1e-12,
iter = 100
)
Two column matrix of latitudes/longitudes
Equatorial radius of the earth, default is WGS-84 radius
Polar radius of the earth, default is WGS-84 radius
Flattening or inverse eccentricity, default eccentricity is WGS-84
Convergence criteria
Maximum number of iterations to attempt convergence
# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab