Struct TopocentricCoordinate

A local topocentric Cartesian coordinate (east, north, up).

struct TopocentricCoordinate(T)
  
if (isGeodesyScalar!T);

The type represents linear components only. It does not carry an origin, ellipsoid, CRS, datum, or linear-unit tag. Interpretation requires a separately prepared TopocentricFrame!T.

(0,0,0) is valid and is the .init value. Checked construction rejects non-finite components; the throwing factory reports the same failure with GeodesyValueException.

Properties

NameTypeDescription
east[get] TEast component in the frame linear unit.
north[get] TNorth component in the frame linear unit.
up[get] TUp component in the frame linear unit.

Methods

NameDescription
fromComponents (east, north, up) Construct finite East/North/Up components.
tryFromComponents (east, north, up, result) Construct finite East/North/Up components without throwing.

Example

Example using struct TopocentricCoordinate(T) if (isGeodesyScalar!T).

import geodesy;

const local = TopocentricCoordinate!double.fromComponents(
    12.5, -3.0, 1.25);

assert(local.east == 12.5);
assert(local.north == -3.0);
assert(local.up == 1.25);