Function tryApplyPositionVectorHelmert

Convert source geocentric XYZ into target-frame XYZ using Position Vector rotations.

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

Use the parameter set published for this transformation direction. This checked operation does not reverse the frame conversion automatically.

Parameters

NameDescription
source Source geocentric coordinate.
transform Position Vector 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 Position Vector transform without throwing.

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