  The algorithms given in Karney, J. Geodesy 87, 43-55 (2013), to compute
geodesics on terrestrial ellipsoids are extended to apply to ellipsoids of
revolution with arbitrary eccentricity. For the direct and inverse geodesic
problems, this entails implementing the formulation in terms of elliptic
integrals given by Legendre and Cayley. The integral for the area of geodesic
polygons is computed in terms of the discrete sine transform of the integrand.
In all cases, accuracy close to full machine precision is achieved. An
open-source implementation of these algorithms is available.

Geophysics;Computational Physics