Function tryApplyCoordinateFrameHelmert

Convert source geocentric XYZ into target-frame XYZ using Coordinate Frame rotations.

bool tryApplyCoordinateFrameHelmert(T)(
  const GeocentricCoordinate!T source,
  const Helmert7!(T,HelmertConvention.coordinateFrame) transform,
  out GeocentricCoordinate!T result
) pure nothrow @nogc @safe
if (isGeodesyScalar!T);

Use parameters published under the Coordinate Frame convention, not Position Vector rotations with unchanged signs. This checked operation preserves the source-to-target direction.

Parameters

NameDescription
source Source geocentric coordinate.
transform Coordinate Frame parameters using the same linear unit for translations as source.
result Receives the target coordinate on success.

Returns

true when scale-factor and transformation arithmetic produce a finite target in scalar type T; otherwise false. On failure result is initialized to .init on entry and has no guaranteed value on failure.

Example

Example applying a Coordinate Frame transform without throwing.

import geodesy;
const source = GeocentricCoordinate!double.fromComponents(1.0, 2.0, 3.0);
GeocentricCoordinate!double target;
assert(tryApplyCoordinateFrameHelmert(
    source, CoordinateFrameHelmert!double.init, target));
assert(target == source);