1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Removed first occurance of accel_err scaling. We don't want to do this

twice.
This commit is contained in:
Werner Backes 2013-06-20 12:42:22 +02:00
parent 8a6ef3c6d6
commit 0f5e354f99

View File

@ -472,12 +472,6 @@ static int32_t updateAttitudeComplementary(bool first_run)
accel_mag = accels_filtered[0] * accels_filtered[0] + accels_filtered[1] * accels_filtered[1] + accels_filtered[2] * accels_filtered[2];
accel_mag = sqrtf(accel_mag);
// TODO! check accel vector magnitude value for correctness
accel_err[0] /= accel_mag;
accel_err[1] /= accel_mag;
accel_err[2] /= accel_mag;
float grot_mag;
if (accel_filter_enabled) {
grot_mag = sqrtf(grot_filtered[0] * grot_filtered[0] + grot_filtered[1] * grot_filtered[1] + grot_filtered[2] * grot_filtered[2]);