GPS Data Collection

With the SonixGPS add-on, and a GPS-enabled transducer, users of the SonixTOUCH can collect positional information.

The file header of data collected from Ulterius is the same as other imaging files, and the structure for each GPS sample is as follows:

typedef struct tagDOUBLE_POSITION_MATRIX_TIME_Q_RECORD {   double x;    double y;    double z;    double s[3][3]; double time; unsigned short quality; } DOUBLE_POSITION_MATRIX_TIME_Q_RECORD;

There are 896 bits per sample, however, this structure is padded with an extra 6 bytes (48 bits) at the end, and should read 0xCCCCCC. Each double is 8 bytes, and the unsigned short is 2 bytes.

The matrix information based on the A, E, R, X, Y, and Z:

s[0][0] = cosE * cosA; s[0][1] = -1.0*cosR * sinA + sinR*sinE*cosA; s[0][2] = sinR*sinA + cosR*sinE*cosA; s[1][0] = cosE*sinA; s[1][1] = cosR*cosA + sinR*sinE*sinA; s[1][2] = -1*sinR*cosA + cosR*sinE*sinA; s[2][0] = -1*sinE; s[2][1] = sinR*cosE; s[2][2] = cosR*cosE;

All the parameters in GPS coordinate transformation is in mm. The matrix above is a rotation matrix between the receiver coordinate system to the transmit coordinate system. This matrix is constructed by the A, E, R values provided by the sensor. The x, y, z values for the translation are also saved in the same file. To reconstruct the whole 3D volume from 2D frames acquired with different rotations/translations, one needs to convert all 2D ultrasound image pixels to the global transmit coordinate system. This requires:
 * 1) Transfer from the ultrasound coordinate system to the probe receive coordinate system through a probe calibration matrix (see below)
 * 2) Transfer from the probe receive coordinate system to the global transmit coordinate system through the rotation matrix and translation vector.

One can assume the transmitter's coordinate system is the world reference coordinate system and that the receiver's coordinate system is the intermediary "local" coordinate system. The rotation matrix goes from transmit to receive, so the equation used is just x_world = T + R * x.

The calibration matrix is:

Translation vector is:
 * 2.2
 * 5.0
 * -12.2

and the ultrasound image should be put into a vector format like:
 * 1
 * y
 * x