File Exchange

image thumbnail

Geodesics on an ellipsoid of revolution (DEPRECATED)

version (26.2 KB) by Charles Karney
Solutions of the direct and inverse geodesic problems

1 Download

Updated 27 Jul 2015

View License

This package is now DEPRECATED. Its functionality has been incorporated
GeographicLib toolbox

Comments and Ratings (3)

There's a bad bug in the area calculation in the Matlab routine
geodreckon. Probably, most people calculate areas as part of the
solution of inverse problem using geoddistance; this might explain why
this bug has gone unnoticed for so long. Here is the fix which will be
included in the next release of GeographicLib.

--- old/geographiclib-matlab/geodreckon.m 2014-10-02 08:08:46.000000000 -0400
+++ new/geographiclib-matlab/geodreckon.m 2014-10-28 18:02:05.000000000 -0400
@@ -225,7 +225,7 @@

if areap
C4x = C4coeff(n);
- C4a = C4f(eps, C4x);
+ C4a = C4f(epsi, C4x);
A4 = (a^2 * e2) * calp0 .* salp0;
B41 = SinCosSeries(false, ssig1, csig1, C4a);
B42 = SinCosSeries(false, ssig2, csig2, C4a);


Ryan (view profile)

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.




Reinforce deprecation by shortening the description, removing
the tags, and replacing the image.

Synchronize with GeographicLib 1.43.
Fix bug in the long_unroll feature of geodreckon.

Deprecation notice. Use the GeographicLib toolbox instead.

Update to GeographicLib 1.41.1. Point fix for geodarea.m to handle
polygons which encircle the pole multiple times. E.g.,
geodarea(89+zeros(6,1), [-360:120:240]')
used to return -2.5500e+14 (incorrect);
it now returns 3.2415e+10 (correct).

Offer as toolbox.

Uncheck toolbox

Synchronize with GeographicLib 1.39. Fix the bug in geodreckon
noted on 2014-10-29. Provide the option to prevent the longitude
returned in geodreckon from being reduced to [-180,180).

Synchronize with GeographicLib 1.38.
Minor documentation changes only.

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

Update journal reference.

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

Synchronize files with GeographicLib 1.27.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: geographiclib

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor