Struct GeodesicInverseResult

Result of an inverse geodesic operation.

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

distance is the shortest geodesic distance and uses the same linear unit as the solver ellipsoid semi-major axis. initialAzimuth is the forward azimuth at the start; finalAzimuth is the forward azimuth of the same oriented geodesic at the endpoint, not the back azimuth.

Both azimuths are canonicalized from -pi inclusive to +pi exclusive. Coincident endpoints have the unique canonical result distance +0, initial azimuth +0, final azimuth +0.

Properties

NameTypeDescription
distance[get] TShortest geodesic distance in the same linear unit as the ellipsoid semi-major axis.
finalAzimuth[get] Angle!TForward azimuth at the endpoint, canonicalized from -pi inclusive to +pi exclusive.
initialAzimuth[get] Angle!TForward azimuth at the start point, canonicalized from -pi inclusive to +pi exclusive.

Example

Example using an inverse geodesic result.

import geodesy;
const solver = Geodesic!double.fromEllipsoid(wgs84!double());
const vienna = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(48.20849),
    Longitude!double.fromDegrees(16.37208));
const graz = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(47.07071),
    Longitude!double.fromDegrees(15.43950));
const result = solver.inverse(vienna, graz);
assert(result.distance > 0.0);