Function TopocentricFrame.topocentricToGeocentric
Convert local East/North/Up to geocentric Cartesian coordinates.
Throws GeodesyValueException when the frame is invalid or no finite
public result can be represented.
Parameters
| Name | Description |
|---|---|
| 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);