Code covered by the BSD License  

Highlights from
Geodesics on an ellipsoid of revolution


5.0 | 2 ratings Rate this file 50 Downloads (last 30 days) File Size: 26.5 KB File ID: #39108
image thumbnail

Geodesics on an ellipsoid of revolution



20 Nov 2012 (Updated )

Solutions of the direct and inverse geodesic problems

| Watch this File

File Information

This package includes three routines GEODDISTANCE, GEODRECKON, and
GEODAREA which solve various problems involving geodesics on the surface
of an ellipsoid of revolution. These are based on the paper

  C. F. F. Karney, Algorithms for geodesics,
  J. Geodesy 87, 43-55 (2013);

which, in turn, is based on the classic solution of the geodesic
problems pioneered by Legendre (1806), Bessel (1825), and Helmert

GEODRECKON solves the direct geodesic problem (determining an end point
given a starting point, range, and bearing). GEODDISTANCE solves the
inverse geodesic problem (determining the shortest distance between two
points). GEODAREA determines the area of a polygon whose edges are

  * The routines are accurate to round off for abs(f) < 1/50. For
    example, for the WGS84 ellipsoid, the error in the distance returned
    by GEODDISTANCE is less then 15 nanometers.
  * The routines work for prolate (as well as oblate) ellipsoids.
  * GEODDISTANCE converges for all inputs.
  * Differential and integral properties of the geodesics are computed.
  * GEODAREA is accurate regardless of the length of the edges of the

Also provided are 3 auxiliary routines, DEFAULTELLIPSOID, ECC2FLAT, and

This package is used by the MATLAB File Exchange package "Geodesic
projections for an ellipsoid",

Use GEODDOC to obtain a more detailed desciption.


This file inspired Geodesic Projections For An Ellipsoid.

MATLAB release MATLAB 7.11.1 (R2010bSP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
21 Dec 2013 Ryan

This... is absolutely wonderful. I spent ages looking for a toolbox that would calculate geodesic areas. I figured that my only two options would be to purchase the MATLAB mapping toolbox or write a routine myself. I'm so glad I finally found this. Thank you kindly, sir.

03 Feb 2013 littyer


03 Dec 2012

Synchronize files with GeographicLib 1.27.

11 Dec 2012

Update to GeographicLib 1.28. Fixes 2 bugs: (1) incorrect area returned in certain obscure cases; (2) m12 incorrect for meridional geodesics.

16 Jan 2013

Update journal reference.

02 Jul 2013

Minor improvements to the calculation of short geodesics and the computation of areas.

Contact us