Function TopocentricFrame.fromGeodeticOrigin

Prepare a frame from a geodetic origin.

static TopocentricFrame fromGeodeticOrigin(
  const Ellipsoid!T ellipsoid,
  const GeodeticCoordinate!T origin
) @safe;

Parameters

NameDescription
ellipsoid Valid ellipsoid defining the frame linear unit.
origin Finite geodetic origin using the same linear unit for height.

Returns

The prepared frame.

Throws

GeodesyValueException when the ellipsoid is invalid or a finite prepared frame cannot be produced.

Example

Example preparing an ENU frame from a geodetic origin.

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);
assert(frame.isValid);