mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
AHRS: limit wind speed estimate changes
sudden yaw changes can cause bad wind estimates
This commit is contained in:
parent
d1f0b382ce
commit
c56f3a9f8c
@ -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