Function Geodesic.inverse
Solve the shortest inverse geodesic problem with throwing semantics.
GeodesicInverseResult!T inverse(
const GeographicCoordinate!T start,
const GeographicCoordinate!T end
) const @safe;
Parameters
| Name | Description |
|---|---|
| start | Geographic start position. |
| end | Geographic endpoint. |
Returns
Distance plus initial and final forward azimuths.
Throws
GeodesyValueException when the solver is invalid or no finite
representable inverse solution can be produced.
Example
Example solving the inverse geodesic problem.
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 > 100_000.0);
}