Function Rhumb.tryDirect

Find a destination from a start point, constant bearing and distance.

bool tryDirect(
  const GeographicCoordinate!T start,
  const Angle!T bearing,
  const T distance,
  out RhumbDirectResult!T result
) const pure nothrow @nogc @safe;

Use this checked form when the route may be invalid or may reach a pole. A successful result contains the destination position. Distance uses the ellipsoid's linear unit and may be signed.

Example

Example solving a direct rhumb without throwing.

import geodesy;
const solver = Rhumb!double.fromEllipsoid(wgs84!double());
const start = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(48.20849),
    Longitude!double.fromDegrees(16.37208));
RhumbDirectResult!double result;
assert(solver.tryDirect(
    start,
    Angle!double.fromDegrees(90.0),
    1_000.0,
    result));