Struct Helmert7

Seven source-to-target Helmert parameters with rotation convention encoded in the type.

struct Helmert7(T, HelmertConvention convention)
  
if (isGeodesyScalar!T);

Canonical storage uses the geocentric coordinate linear unit for translations, radians through Angle!T for rotations, and a dimensionless scale difference dS, with multiplication factor M = 1 + dS. .init is the identity transformation.

fromArcSecondsAndPpm accepts the common EPSG interchange representation: rotations in arc-seconds and scale difference in parts per million. EPSG 1033 Position Vector and EPSG 1032 Coordinate Frame use opposite signs for equivalent rotations; use toCoordinateFrame or toPositionVector to convert the parameter representation without changing the represented source-to-target transformation.

Properties

NameTypeDescription
rotationX[get] Angle!TX-axis rotation, canonically stored in radians.
rotationY[get] Angle!TY-axis rotation, canonically stored in radians.
rotationZ[get] Angle!TZ-axis rotation, canonically stored in radians.
scaleDifference[get] TDimensionless scale difference dS.
scaleFactor[get] TMultiplication factor M = 1 + dS.
translationX[get] TX-axis translation.
translationY[get] TY-axis translation.
translationZ[get] TZ-axis translation.

Methods

NameDescription
fromArcSecondsAndPpm (translationX, translationY, translationZ, rotationXArcSeconds, rotationYArcSeconds, rotationZArcSeconds, scaleDifferencePpm) Create a Helmert transform from published arc-seconds and ppm.
fromCanonical (translationX, translationY, translationZ, rotationX, rotationY, rotationZ, scaleDifference) Prepare seven frame-conversion parameters from canonical units.
tryFromArcSecondsAndPpm (translationX, translationY, translationZ, rotationXArcSeconds, rotationYArcSeconds, rotationZArcSeconds, scaleDifferencePpm, result) Read published seven-parameter frame conversions without throwing.
tryFromCanonical (translationX, translationY, translationZ, rotationX, rotationY, rotationZ, scaleDifference, result) Prepare seven frame-conversion parameters in canonical units without throwing.

Example

Example using struct Helmert7(T, HelmertConvention convention) if (isGeodesyScalar!T).

import geodesy;

const source = GeocentricCoordinate!double.fromComponents(
    3_657_660.66, 255_768.55, 5_201_382.11);

const positionVector = PositionVectorHelmert!double
    .fromArcSecondsAndPpm(
        0.0, 0.0, 4.5,
        0.0, 0.0, 0.554,
        0.219);

const target = source.applyPositionVectorHelmert(positionVector);
const coordinateFrame = positionVector.toCoordinateFrame;
const sameTarget = source.applyCoordinateFrameHelmert(coordinateFrame);

assert(target == sameTarget);