Function RhumbLine.tryPosition

Find a point a given distance along this constant-bearing route.

bool tryPosition(
  const T distance,
  out RhumbDirectResult!T result
) const pure nothrow @nogc @safe;

Pass distance in the ellipsoid's linear unit (metres for WGS 84). A negative value travels backward. On success, the result contains the destination; failure returns false without throwing.

Example

Example evaluating a prepared RhumbLine.

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.line(
    start,
    Angle!double.fromDegrees(73.0)).tryPosition(
        1_000.0,
        result));