added option to fix airspeed scaling to 1

This commit is contained in:
Silvan Fuhrer
2019-08-08 09:15:25 +02:00
committed by Beat Küng
parent d38164fc8e
commit 09f29dbb07
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -326,7 +326,13 @@ WindEstimator::run_sanity_checks()
}
// constrain airspeed scale factor, negative values physically do not make sense
_state(tas) = math::max(0.0f, _state(tas));
if (_scale_estimation_on) {
_state(tas) = math::max(0.0f, _state(tas));
} else {
_state(tas) = 1.0f;
}
// attain symmetry
for (unsigned row = 0; row < 3; row++) {