private void gyroAlignmentCommitButton_Click(object sender, EventArgs e)
{
float[,] floatCalMat = new float[3, 3];
floatCalMat[0, 0] = (float)calMat[0, 0];
floatCalMat[0, 1] = (float)calMat[0, 1];
floatCalMat[0, 2] = (float)calMat[0, 2];
floatCalMat[1, 0] = (float)calMat[1, 0];
floatCalMat[1, 1] = (float)calMat[1, 1];
floatCalMat[1, 2] = (float)calMat[1, 2];
floatCalMat[2, 0] = (float)calMat[2, 0];
floatCalMat[2, 1] = (float)calMat[2, 1];
floatCalMat[2, 2] = (float)calMat[2, 2];
sensor.gyro_alignment = floatCalMat;
sensor.x_gyro_bias = (float)bias[0];
sensor.y_gyro_bias = (float)bias[1];
sensor.z_gyro_bias = (float)bias[2];
sensor.synch();
}