Module geodesy.rhumb

Calculate routes that keep the same compass bearing.

Choose a rhumb line when the course must stay constant instead of following the shortest route. Given two positions, the inverse operation returns distance and bearing. Given a starting point, bearing and distance, the direct operation finds the destination. For the shortest surface route between points, choose Geodesic instead.

A rhumb line is also called a loxodrome. The calculation uses ellipsoidal latitude and meridian-distance mathematics.

Domain

Spherical and oblate ellipsoids with 0 <= f <= 0.01.

Units

Distances use the same linear unit as the ellipsoid semi-major axis. Angles are represented by the existing geodesy angle value types.

Numerics

Public float uses double working precision. Double and real retain their own precision. The hot paths are allocation-free, pure, nothrow, @safe, and @nogc.

Pole policy: Inverse operations admit poles with limiting meridional semantics. Nonzero direct/line operations starting at, reaching, or crossing a pole are rejected because longitude is indeterminate there.

See Also

Geodesic, GeographicCoordinate, Ellipsoid

Date

October 6, 2026

Structs

NameDescription
Rhumb Prepared ellipsoidal rhumb solver.
RhumbDirectResult Destination reached by following a constant compass bearing.
RhumbInverseResult Distance and constant bearing of a rhumb route between two positions.
RhumbLine Reuse a constant-bearing route to find positions at several distances.