AP_Airspeed : Expanded range of ARSPD_RATIO adjustment

This commit is contained in:
Paul Riseborough 2013-07-21 11:17:50 +10:00 committed by Andrew Tridgell
parent 8bb35f5dad
commit 1c7bdc40ec
1 changed files with 3 additions and 2 deletions

View File

@ -127,8 +127,9 @@ void AP_Airspeed::update_calibration(const Vector3f &vground)
if (isnan(ratio) || isinf(ratio)) {
return;
}
// this constrains the resulting ratio to between 1.5 and 3
ratio = constrain_float(ratio, 0.577f, 0.816f);
// this constrains the resulting ratio to between 1.0 and 4.0
ratio = constrain_float(ratio, 0.5f, 1.0f);
_ratio.set(1/sq(ratio));
if (_counter > 60) {
if (_last_saved_ratio < 1.05f*_ratio ||