Function TopocentricFrame.topocentricToGeodetic

Convert local East/North/Up directly to a geodetic coordinate.

GeodeticCoordinate!T topocentricToGeodetic(
  const TopocentricCoordinate!T source
) const @safe;

Throws GeodesyValueException when the frame is invalid or the composed reverse EPSG 9837 operation cannot produce a defined finite representable result.

Parameters

NameDescription
source Local East/North/Up in the frame linear unit.

Returns

Canonical geodetic coordinate with height in the frame linear unit.

Throws

GeodesyValueException for an invalid frame or failed composed conversion.

Example

Example converting the local origin back to geodetic coordinates.

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);
const result = frame.topocentricToGeodetic(
    TopocentricCoordinate!double.init);
assert(result.longitude.degrees > 16.0);
}