44.2 Routines for Geodetic computations (WGS84)

The SEISAN software libaray include two subroutines for geodetic
computations using the WGS84 ellipsoid:

vincenty_forward(lon,lat,azi,dist)
and vincenty_inverse(lo,la,lo2,la2)

vincenty_forward(lon,lat,azi,dist) computes the lat and lon
for a point at an azimuth and distance (meter) from
the point given by input lon and lat. Output lon and lat are
returned at the position of input lon and lat.

vincenty_inverse(lo,la,lo2,la2) computes the azimuth, back-azumith and
distance between the two points lo,la,lo2,la2. Outout azimuth,
back-azumith and distance (meters) are returned at the position
of lo,la,lo2.

The code is based on the code at
http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/
see also http://www.movable-type.co.uk/scripts/latlong-vincenty.html