Vincenty Inverse Solution of Geodesics on the Ellipsoid.
Computes the distance between two geographic points on the WGS84 ellipsoid and the forward and backward azimuths between these points.
Parameters: |
|
---|---|
Returns: | (Great circle distance in m, azimuth A->B in degrees, azimuth B->A in degrees) |
Raises : | This method may have no solution between two nearly antipodal points; an iteration limit traps this case and a StopIteration exception will be raised. |
Note
This code is based on an implementation incorporated in Matplotlib Basemap Toolkit 0.9.5 http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/basemap-0.9.5/ (matplotlib/toolkits/basemap/greatcircle.py)
Algorithm from Geocentric Datum of Australia Technical Manual.
It states:
Computations on the Ellipsoid
There are a number of formulae that are available to calculate
accurate geodetic positions, azimuths and distances on the
ellipsoid.
Vincenty's formulae (Vincenty, 1975) may be used for lines ranging
from a few cm to nearly 20,000 km, with millimetre accuracy. The
formulae have been extensively tested for the Australian region, by
comparison with results from other formulae (Rainsford, 1955 &
Sodano, 1965).
* Inverse problem: azimuth and distance from known latitudes and
longitudes
* Direct problem: Latitude and longitude from known position,
azimuth and distance.