Struct GeodesicDirectResult

Destination and arrival heading after following a geodesic.

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

Read position for the destination's latitude and longitude. Read finalAzimuth for the direction of travel at that destination if you continue along the same path. It does not point back to the start.

Azimuths use the public canonical angle interval from -pi inclusive to +pi exclusive.

Example

Example reading a direct-result endpoint and final azimuth.

import geodesy;
const solver = Geodesic!double.fromEllipsoid(
    Ellipsoid!double.sphere(6_371_000.0));
const start = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(0.0),
    Longitude!double.fromDegrees(0.0));
const result = solver.direct(
    start, Angle!double.fromDegrees(90.0), 1_000.0);
assert(result.position.longitude.degrees > 0.0);
assert(result.finalAzimuth.degrees == 90.0);