Prototype and description of the function gettranshelmert()

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

 

gettranshelmert()
Calculation of Seven Helmert Parameters and a rotation matrix from
identical points in different Reference Systems.

Prototype of the DLL function in C++ syntax (attend lower case!):
extern "C" __declspec(dllimport) unsigned long __stdcall gettranshelmert(
     double aCartQ[][3],
     double aCartZ[][3],
     unsigned long nCount,
     unsigned short nTyp,
     double aHelmert[7],
     double aRotMat[][3]);

Prototype of the DLL function in Visual Objects syntax:
_DLL FUNCTION gettranshelmert(;
     aCartQ AS REAL8 PTR,;                   // 4 Byte
     aCartZ AS REAL8 PTR,;                   // 4 Byte
     nCount AS DWORD,;                       // 4 Byte
     nTyp AS WORD,;                          // 2 Byte
     aHelmert AS REAL8 PTR,;                 // 4 Byte
     aRotMat AS REAL8 PTR);                  // 4 Byte
AS LOGIC PASCAL:geodll32.gettranshelmert     // 4 Byte


The function calculates Seven Helmert Transformation Parameters and a
Rotation Matrix from identical points in different source and target
Coordinate Reference Systems. The identical points are stored in arrays as
cartesian coordinates.

The Helmert transformation is a transformation for three-dimensional
Cartesian coordinates. It contains as parameters three translation vectors,
three rotation angles and a scale factor. The rotations are also avilable
as a spatial rotation matrix.

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:
aCartQ[][3] Cartesian coordinates X, Y, Z of the source Coordinate Reference
(ref)       System in a two dimensional array of type double. The first
            dimension counts the available cartesian source coordinates of
            the identical points given in nCount. The second dimension is
            3 for the X, Y and Z component of a cartesian source coordinate.
            The length of the arrays aCartQ and aCartZ must be identical. The
            structure of the array is described further below.

aCartZ[][3] Cartesian coordinates X, Y, Z of the target Coordinate Reference
(ref)       System in a two dimensional array of type double. The first
            dimension counts the available cartesian target coordinates of
            the identical points given in nCount. The second dimension is
            3 for the X, Y and Z component of a cartesian target coordinate.
            The length of the arrays aCartQ and aCartZ must be identical. The
            structure of the array is described further below.

nCount      Count of the available identical points stored as cartesian
            coordinates in the arrays aCartQ and aCartZ.

nTyp        Geographic Transformation Method of the Helmert Parameters.
            1: Coordinate Frame Rotation
            2: Position Vector Transformation
            3: European Standard ISO 19111

aHelmert[7] Seven Helmert parameters in an array of 7 doubles.
(ref out)   1. array element: Translation vector for X-axis [meter]
            2. array element: Translation vector for Y-axis [meter]
            3. array element: Translation vector for Z-axis [meter]
            4. array element: Rotation angle around the X-axis [seconds]
            5. array element: Rotation angle around the Y-axis [seconds]
            6. array element: Rotation angle around the Z-axis [seconds]
            7. array element: Scale correction factor [ppm]
            ------------------------------------
            | T1 | T2 | T3 | R1 | R2 | R3 | SF |
            ------------------------------------
            For the array the calling function must provide memory of the
            size 7*sizeof(double) bytes.

aRotMat[3][3]  Rotation Matrix of the spatial Helmert Transformation in an
(ref out)   array of 3 times 3 doubles.
            -------------------
            |   1 |  w3 | -w2 |
            | -w3 |   1 |  w1 |
            |  w2 | -w1 |   1 |
            -------------------
            The signs of w can change in dependence of the Transformation
            Method. For the array the calling function must provide memory
            of the size 3*3*sizeof(double) bytes.

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


The two dimensional arrays aCartQ[][3] und aCartZ[][3] are filled with values
of type double and are structured as follows:
----------------------------------------------------------------------
| C1-X | C1-Y | C1-Z | C2-X | C2-Y | C2-Z | ... | Cn-X | Cn-Y | Cn-Z |
----------------------------------------------------------------------
with C1 -› Cn: Coordinates 1 to n
X:             Kartesian X component
Y:             Kartesian Y component
Z:             Kartesian Z component


Unlocking
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 identical points can be processed.