calcVinEll function

Calculate Geodesic Distance - Vincenty Ellipsoid Method

Calculate Geodesic Distance - Vincenty Ellipsoid Method

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 )

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)
  • Maintainer: Héctor Manuel Sánchez Castellanos
  • License: GPL-3
  • Last published: 2020-10-05