Struct Helmert7
Seven source-to-target Helmert parameters with rotation convention encoded in the type.
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.
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
| Name | Type | Description |
|---|---|---|
rotationX[get]
|
Angle!T | X-axis rotation, canonically stored in radians. |
rotationY[get]
|
Angle!T | Y-axis rotation, canonically stored in radians. |
rotationZ[get]
|
Angle!T | Z-axis rotation, canonically stored in radians. |
scaleDifference[get]
|
T | Dimensionless scale difference dS. |
scaleFactor[get]
|
T | Multiplication factor M = 1 + dS. |
translationX[get]
|
T | X-axis translation. |
translationY[get]
|
T | Y-axis translation. |
translationZ[get]
|
T | Z-axis translation. |
Methods
| Name | Description |
|---|---|
fromArcSecondsAndPpm
(translationX, translationY, translationZ, rotationXArcSeconds, rotationYArcSeconds, rotationZArcSeconds, scaleDifferencePpm)
|
Construct from the common EPSG arc-second/ppm representation. |
fromCanonical
(translationX, translationY, translationZ, rotationX, rotationY, rotationZ, scaleDifference)
|
Construct Helmert parameters from canonical units. |
tryFromArcSecondsAndPpm
(translationX, translationY, translationZ, rotationXArcSeconds, rotationYArcSeconds, rotationZArcSeconds, scaleDifferencePpm, result)
|
Construct from the common EPSG arc-second/ppm representation without throwing. |
tryFromCanonical
(translationX, translationY, translationZ, rotationX, rotationY, rotationZ, scaleDifference, result)
|
Construct Helmert parameters from 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);