DOI: 10.5281/zenodo.12510795
title: Test set of geodesics on a triaxial ellipsoid

description: This is a set of 500000 shortest geodesics on a triaxial ellipsoid.  The ellipsoid is defined by

$$\frac{X^2}{a^2} + \frac{Y^2}{b^2} + \frac{Z^2}{c^2} - 1 = 0,$$

with \(a = \sqrt2\), \(b = 1\), \(c = 1/\sqrt2\) (measured in arbitrary units).  (This ellipsoid was studied by A. Cayley, On the geodesic lines on an ellipsoid, Mem. Roy. Astron. Soc. 39, 31-53, 1872.)  Each line of the test set consists of 10 space-delimited numbers



the latitude at point 1, \(\beta_1\) (\(^\circ\), exact)

the longitude at point 1, \(\omega_1\) (\(^\circ\), exact)

the azimuth at point 1, \(\alpha_1\) (\(^\circ\), accurate to \(10^{-18}{}^\circ\))

the latitude at point 2, \(\beta_2\) (\(^\circ\), exact)

the longitude at point 2, \(\omega_2\) (\(^\circ\), exact)

the azimuth at point 2, \(\alpha_2\) (\(^\circ\), accurate to \(10^{-18}{}^\circ\))

the geodesic distance from 1 to 2, \(s_{12}\) (units, accurate to \(10^{-20}\))

the reduced length of the geodesic, \(m_{12}\) (units, accurate to \(10^{-20}\))

the geodesic scale, \(M_{12}\) (accurate to \(10^{-20}\))

the geodesic scale, \(M_{21}\) (accurate to \(10^{-20}\))


Here \(\beta\), \(\omega\), and \(\alpha\), are the ellipsoidal latitude, longitude, and azimuth.  For a given \((\beta, \omega)\), the Cartesian coordinates of a point are

$$\begin{align}  X &= a \cos\omega      \frac{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}           {\sqrt{a^2 - c^2}}, \\  Y &= b \cos\beta \sin\omega, \\  Z &= c \sin\beta      \frac{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}}           {\sqrt{a^2 - c^2}}.\end{align}$$

Lines of constant \(\beta\) and \(\omega\) are orthogonal.  The azimuth \(\alpha\) of a geodesic is the direction measured clockwise from North (defined as \(\beta\) increasing at constant \(\omega\)).  The coordinates are singular at the four umbilical points \(\cos\beta = \sin\omega = 0\).  The azimuth of a geodesic jumps by \(\pm\frac12\pi\) on passage through such points and the value for such points is the azimuth on leaving the umbilical point.

The geodesics are computed using high-precision inverse calculations with the exact integer values for \((\beta_1, \omega_1)\) and \((\beta_2, \omega_1)\).  Any of the other entries reported as an integer is also exact.

For most pairs of points, there is a unique shortest geodesic.  However



for opposite umbilical points, \(\alpha_1\) and \(\alpha_2\) can take on arbitrary values provided that the ratio \(\tan\alpha_1/\tan\alpha_2\) is maintained;

if \(\beta_1 + \beta_2 = 0\) and if \(\cos\alpha_1\) and \(\cos\alpha_2\) have opposite signs, then there is another shortest geodesic with azimuths \(\pi - \alpha_1\) and \(\pi - \alpha_2\).


For a particular \((\beta_1, \omega_1)\) and \((\beta_2, \omega_2)\), additional geodesics of the same length can be trivially generated by swapping the points or by reflecting them in any of the coordinate planes.  A non-trivial symmetry is given by swapping just the longitude coordinates; this also results in a geodesic of the same length.  The data set has had any such redundant geodesics removed.

The data set is sorted according to whether either point



is an umbilical point

lies on the middle principal ellipse, with \(\sin\omega = 0\)

lies on the middle principal ellipse, with \(\cos\beta = 0\)

lies on the major principal ellipse, \(Z = 0\)

lies on the minor principal ellipse, \(X = 0\)

is near an umbilical point

is general (all other points)


Approximately 85% of the entries are with two general points.  If only a small set of random test cases is needed, select a random subset with, e.g.,

  shuf Geod3Test.txt | head -1000 > Geod3Test-samp.txt