Struct GeodesicQuantities

Differential and area quantities for one oriented geodesic segment.

struct GeodesicQuantities(T)
  
if (isGeodesyScalar!T);

reducedLength is Karney's reduced length m12 and uses the same linear unit as the solver ellipsoid semi-major axis. scale12 and scale21 are dimensionless geodesic scales M12 and M21. signedArea is S12, the oriented area contribution between the geodesic and the equator, in the square of the ellipsoid linear unit.

signedArea is orientation-sensitive; reversing the segment reverses its sign. The two geodesic scale directions exchange roles under endpoint reversal. Coincident endpoints use the canonical values m12 = 0, M12 = M21 = 1, and S12 = 0.

Properties

NameTypeDescription
reducedLength[get] TReduced length m12 in the ellipsoid linear unit.
scale12[get] TGeodesic scale M12 from point 1 to point 2.
scale21[get] TGeodesic scale M21 from point 2 to point 1.
signedArea[get] TSigned area contribution S12 in the square of the ellipsoid unit.

Example

Example reading advanced inverse geodesic quantities.

import geodesy;

const solver =
    Geodesic!double.fromEllipsoid(
        Ellipsoid!double.fromFlattening(
            6_378_137.0,
            1.0 / 298.257223563));

const start =
    GeographicCoordinate!double.fromComponents(
        Latitude!double.fromDegrees(48.20849),
        Longitude!double.fromDegrees(16.37208));

const end =
    GeographicCoordinate!double.fromComponents(
        Latitude!double.fromDegrees(47.07071),
        Longitude!double.fromDegrees(15.43950));

GeodesicInverseResult!double inverse;
GeodesicQuantities!double quantities;

assert(
    solver.tryInverse(
        start,
        end,
        inverse,
        quantities));

assert(inverse.distance > 0.0);
assert(quantities.reducedLength != 0.0);
assert(quantities.scale12 == quantities.scale12);
assert(quantities.scale21 == quantities.scale21);
assert(quantities.signedArea != 0.0);