Prototype and description of the function gettransresidualmax()

(Function of the unlock requiring group "Transformation Parameter")


Calculation of the "Maximum Spatial Residual" from a group of residuals.

Prototype of the DLL function in C++ syntax (attend lower case!):
extern "C" __declspec(dllimport) unsigned long __stdcall gettransresidualmax(
     double aResid[][3],
     unsigned long nCount,
     double *fResidMax);

Prototype of the DLL function in Visual Objects syntax:
_DLL FUNCTION gettransresidualmax(;
     aResid AS REAL8 PTR,;                     // 4 Byte
     nCount AS DWORD,;                         // 4 Byte
     fResidMax REF REAL8);                     // 4 Byte
AS LOGIC PASCAL:geodll32.gettransresidualmax   // 4 Byte

The function calculates the "Maximum Spatial Residual" from an array with
previously determined residuals. This value is a quality criterion for the
accuracy of the Helmert or Molodenski parameter set, which has been used
previously to calculate the residuals (see function gettransresiduals()).

Since the function due to the extensive calculations is time-consuming,
the event handling during the calculation by interrupting the processing loop
can be are allowed bei calling the function seteventloop().

The parameters are passed and/or returned as follows:
aResid[][3] Previously calculated residuals with their X, Y and Z components in
(ref)       meter, stored in a two dimensional array of type double. The
            structure of the array is described further below.

nCount      Count of the available residuals in the array aResid.

fResidMax   From the residuals array calculated value for the "Maximum Spatial
(ref)       Residual".

returnVal   In case of an error the function returns FALSE, otherwise TRUE.

The two dimensional array aResid[][3] is filled with values of type double and
is structured as follows:
| R1-X | R1-Y | R1-Z | R2-X | R2-Y | R2-Z | ... | Rn-X | Rn-Y | Rn-Z |
with R1 -› Rn: Residuals 1 to n
X:             X component
Y:             Y component
Z:             Z component

This function is a component of the unlock requiring function group
"Transformation parameter". It is unlocked for unrestricted use together
with other functions of the group by passing the unlock parameters, acquired
from the software distribution company, trough the function setunlockcode().
Without unlocking at most 25 residuals can be processed.