AHRS: limit wind speed estimate changes
sudden yaw changes can cause bad wind estimates
This commit is contained in:
parent
0495a0debc
commit
00bf548f87
@ -624,7 +624,9 @@ void AP_AHRS_DCM::estimate_wind(Vector3f &velocity)
|
||||
wind.z = velocitySum.z - V * fuselageDirectionSum.z;
|
||||
wind *= 0.5;
|
||||
|
||||
_wind = _wind * 0.95 + wind * 0.05;
|
||||
if (wind.length() < _wind.length() + 20) {
|
||||
_wind = _wind * 0.95 + wind * 0.05;
|
||||
}
|
||||
|
||||
_last_wind_time = now;
|
||||
} else if (now - _last_wind_time > 2000 && _airspeed && _airspeed->use()) {
|
||||
|
Loading…
Reference in New Issue
Block a user