calcVinEll: Calculate Geodesic Distance - Vincenty Ellipsoid Method

Description Usage Arguments Examples

View source: R/RcppExports.R

Description

This function calculates geodesic distance using the original Vincenty Ellipsoid method.

Usage

1
2
3
4
5
6
7
8
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

1
2
3
4
5
6
# 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)

MGDrivE documentation built on Oct. 23, 2020, 7:28 p.m.