Function Geodesic.direct

Solve the direct geodesic problem with throwing failure semantics.

GeodesicDirectResult!T direct(
  const GeographicCoordinate!T start,
  const Angle!T initialAzimuth,
  const T distance
) const @safe;

Parameters

NameDescription
start Geographic start position.
initialAzimuth Initial forward azimuth.
distance Finite signed distance in the ellipsoid linear unit.

Returns

Endpoint and final forward azimuth using canonical public angles.

Throws

GeodesyValueException when the solver is invalid or no finite representable direct solution can be produced.

Example

Example solving the direct geodesic problem.

import geodesy;
const solver = Geodesic!double.fromEllipsoid(wgs84!double());
const start = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(48.20849),
    Longitude!double.fromDegrees(16.37208));
const result = solver.direct(
    start, Angle!double.fromDegrees(90.0), 1_000.0);
assert(result.position.longitude.degrees > start.longitude.degrees);