geoid_inverse#

pycraf.pathprof.geoid_inverse(lon1, lat1, lon2, lat2, eps=1e-12, maxiter=50)[source]#

Solve inverse Geodesics problem using Vincenty’s formulae.

Using an iterative approach, the distance and relative bearings between two points (P1, and P2) on the Geoid (Earth ellipsoid) are determined; see also Wikipedia.

Parameters:
lon1Quantity

Geographic longitude of P1 [rad]

lat1Quantity

Geographic latitude of P1 [rad]

lon2Quantity

Geographic longitude of P2 [rad]

lat2Quantity

Geographic latitude of P2 [rad]

epsfloat, optional

Accuracy of calculation (default: 1.e-12)

maxiterint, optional

Maximum number of iterations to perform (default: 50)

Returns:
distanceQuantity

Distance between P1 and P2 [m]

bearing1Quantity

Start bearing [rad]

bearing2Quantity

Back-bearing [rad]

Notes

The iteration will stop if either the desired accuracy (eps) is reached or the number of iterations exceeds maxiter.