mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-21 18:23:19 +08:00
WindEstimator: added support for pre-set airspeed scale factor
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -330,15 +330,15 @@ WindEstimator::run_sanity_checks()
|
||||
return;
|
||||
}
|
||||
|
||||
// constrain airspeed scale factor, negative values physically do not make sense
|
||||
if (_scale_estimation_on) {
|
||||
// check if we should inhibit learning of airspeed scale factor and rather use a pre-set value.
|
||||
// airspeed scale factor errors arise from sensor installation which does not change and only needs
|
||||
// to be computed once for a perticular installation.
|
||||
if (_enforced_airspeed_scale < 0) {
|
||||
_state(tas) = math::max(0.0f, _state(tas));
|
||||
} else {
|
||||
_state(tas) = 1.0f;
|
||||
_state(tas) = _enforced_airspeed_scale;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// attain symmetry
|
||||
for (unsigned row = 0; row < 3; row++) {
|
||||
for (unsigned column = 0; column < row; column++) {
|
||||
|
||||
Reference in New Issue
Block a user