1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Mag bias tracking seems to work

This commit is contained in:
James Cotton 2012-07-25 11:19:39 -05:00
parent 1a5af9dafb
commit 3b57b492d0

View File

@ -401,7 +401,7 @@ static void SensorsTask(void *parameters)
}
// Correct for mag bias and update
//magOffsetEstimation(&mag);
magOffsetEstimation(&mag);
MagnetometerSet(&mag);
mag_update_time = PIOS_DELAY_GetRaw();
}
@ -457,6 +457,7 @@ static void magOffsetEstimation(MagnetometerData *mag)
magBias.x += b_error[0];
magBias.y += b_error[1];
magBias.z += b_error[2];
MagBiasSet(&magBias);
}