obspy.geodetics.base.calc_vincenty_inverse

calc_vincenty_inverse(lat1, lon1, lat2, lon2, a=6378137.0, f=0.0033528106647474805)[source]

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)
  • a Radius of Earth in m. Uses the value for WGS84 by default.
  • f Flattening of Earth. Uses the value for WGS84 by default.
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.