Function TopocentricFrame.topocentricToGeocentric

Convert local East/North/Up to geocentric Cartesian coordinates.

GeocentricCoordinate!T topocentricToGeocentric(
  const TopocentricCoordinate!T source
) const @safe;

Throws GeodesyValueException when the frame is invalid or no finite public result can be represented.

Parameters

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

Returns

Geocentric coordinate in the same linear unit.

Throws

GeodesyValueException for an invalid frame or unrepresentable result.

Example

Example converting the local origin to ECEF.

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 xyz = frame.topocentricToGeocentric(
    TopocentricCoordinate!double.init);
assert(xyz.x == xyz.x);