Function TopocentricFrame.fromGeocentricOrigin
Prepare a frame from a geocentric origin.
static TopocentricFrame fromGeocentricOrigin(
const Ellipsoid!T ellipsoid,
const GeocentricCoordinate!T origin
) @safe;
Parameters
| Name | Description |
|---|---|
| ellipsoid | Valid ellipsoid defining the frame linear unit. |
| origin | Geocentric origin in the same linear unit. |
Returns
The prepared frame.
Throws
GeodesyValueException when the ellipsoid is invalid, the origin
is the exact geocentre, or no finite prepared frame can be produced.
Example
Example preparing an ENU frame from an ECEF origin.
import geodesy;
const origin = GeodeticCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208),
171.0);
const xyz = geodeticToGeocentric(origin, wgs84!double());
const frame = TopocentricFrame!double .fromGeocentricOrigin(
wgs84!double(), xyz);
assert(frame .isValid);