obspy.core.util.geodetics.calcVincentyInverse

calcVincentyInverse(lat1, lon1, lat2, lon2)

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:
  • lat1 Latitude of point A in degrees (positive for northern, negative for southern hemisphere)
  • lon1 Longitude of point A in degrees (positive for eastern, negative for western hemisphere)
  • lat2 Latitude of point B in degrees (positive for northern, negative for southern hemisphere)
  • lon2 Longitude of point B in degrees (positive for eastern, negative for western hemisphere)
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.