Function TopocentricFrame.tryTopocentricToGeodetic
Convert local East/North/Up directly to a geodetic coordinate.
bool tryTopocentricToGeodetic(
const TopocentricCoordinate!T source,
out GeodeticCoordinate!T result
) const pure nothrow @nogc @safe;
Implements the reverse direction of EPSG method 9837 as EPSG 9836 reverse followed by EPSG 9602 reverse.
Working ECEF coordinates remain in the prepared working scalar until the geodetic inverse is complete. Public scalar T is applied only to the final latitude, longitude, and height.
Parameters
| Name | Description |
|---|---|
| source | Local East/North/Up in the frame linear unit. |
| result | Receives the canonical geodetic coordinate on success. |
Returns
true when composed reverse EPSG 9837 succeeds with a finite
representable result; otherwise false. On failure result
is initialized to on entry and has no guaranteed value on failure.
Example
Example converting ENU to a geodetic position without throwing.
import geodesy;
const origin = GeodeticCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208),
171.0);
const frame = TopocentricFrame!double .fromGeodeticOrigin(
wgs84!double(), origin);
GeodeticCoordinate!double result;
assert(frame .tryTopocentricToGeodetic(
TopocentricCoordinate!double .init, result));
assert(result .latitude .degrees > 48.0);