Fix imu_health metric

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1728 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
deweibel@gmail.com 2011-02-25 20:09:00 +00:00
parent 85672b5ab2
commit 0642e1144d
2 changed files with 3 additions and 2 deletions

View File

@ -228,7 +228,7 @@ AP_DCM::drift_correction(void)
accel_weight = constrain(1 - 2 * fabs(1 - accel_magnitude), 0, 1); // accel_weight = constrain(1 - 2 * fabs(1 - accel_magnitude), 0, 1); //
// We monitor the amount that the accelerometer based drift correction is deweighted for performance reporting // We monitor the amount that the accelerometer based drift correction is deweighted for performance reporting
_health += constrain((0.02 * (accel_weight - .5)), 0, 1); _health = constrain(_health+(0.02 * (accel_weight - .5)), 0, 1);
// adjust the ground of reference // adjust the ground of reference
_error_roll_pitch = _dcm_matrix.c % _accel_vector; // Equation 27 *** sign changed from prev implementation??? _error_roll_pitch = _dcm_matrix.c % _accel_vector; // Equation 27 *** sign changed from prev implementation???

View File

@ -29,7 +29,8 @@ public:
0, 1, 0, 0, 1, 0,
0, 0, 1), 0, 0, 1),
_course_over_ground_x(0), _course_over_ground_x(0),
_course_over_ground_y(1) _course_over_ground_y(1),
_health(1.)
{} {}
// Accessors // Accessors