Function Helmert7.tryFromCanonical
Prepare seven frame-conversion parameters in canonical units without throwing.
Use this factory when the source rotations are already Angle values
in radians and the scale difference is dimensionless. Choose the
correct rotation convention in the Helmert7 type.
Parameters
| Name | Description |
|---|---|
| translationX | Finite X translation in the geocentric linear unit. |
| translationY | Finite Y translation in the same linear unit. |
| translationZ | Finite Z translation in the same linear unit. |
| rotationX | Finite canonical X rotation in radians. |
| rotationY | Finite canonical Y rotation in radians. |
| rotationZ | Finite canonical Z rotation in radians. |
| scaleDifference | Finite dimensionless dS, with M = 1 + dS. |
| result | Receives the parameter set on success. |
Returns
true when translations and scale difference are finite; otherwise
false. Strong Angle!T arguments are already finite by
construction. On failure result is initialized to on entry and has no guaranteed value on failure.
Example
Example checking canonical Helmert parameters without throwing.
import geodesy;
Helmert7!(double, HelmertConvention .positionVector) transform;
assert(Helmert7!(double, HelmertConvention .positionVector)
.tryFromCanonical(
1.0, 2.0, 3.0,
Angle!double .init,
Angle!double .init,
Angle!double .init,
0.0,
transform));
assert(transform .translationZ == 3.0);