Skip to content
Snippets Groups Projects
Commit 27a3b5fb authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

AP_AHRS: fixed wind reporting with EKF and no airspeed sensor

the EKF does not estimate wind without an airspeed sensor
parent b78e59ea
No related branches found
No related tags found
No related merge requests found
...@@ -122,7 +122,9 @@ float AP_AHRS_NavEKF::get_error_yaw(void) ...@@ -122,7 +122,9 @@ float AP_AHRS_NavEKF::get_error_yaw(void)
// return a wind estimation vector, in m/s // return a wind estimation vector, in m/s
Vector3f AP_AHRS_NavEKF::wind_estimate(void) Vector3f AP_AHRS_NavEKF::wind_estimate(void)
{ {
if (!using_EKF()) { if (!using_EKF() || !_airspeed || !_airspeed->use()) {
// EKF does not estimate wind speed when there is no airspeed
// sensor active
return AP_AHRS_DCM::wind_estimate(); return AP_AHRS_DCM::wind_estimate();
} }
Vector3f wind; Vector3f wind;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment