airspeed_selector: update wind estimator (w/o airspeed fusion) always if in FW mode

This fixes a bug where by accident the vtol_status was considered instead of the
vehicle_status, preventing it from running on planes.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2022-10-07 11:36:10 +02:00 committed by Mathieu Bresciani
parent 7e49147bcf
commit 0c4b2cd0c5
1 changed files with 2 additions and 2 deletions

View File

@ -521,8 +521,8 @@ void AirspeedModule::update_wind_estimator_sideslip()
_wind_estimator_sideslip.update(_time_now_usec);
if (_vehicle_local_position_valid
&& _vtol_vehicle_status.vehicle_vtol_state == vtol_vehicle_status_s::VEHICLE_VTOL_STATE_FW &&
_vehicle_status.arming_state == vehicle_status_s::ARMING_STATE_ARMED) {
&& _vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING
&& _vehicle_status.arming_state == vehicle_status_s::ARMING_STATE_ARMED) {
Vector3f vI(_vehicle_local_position.vx, _vehicle_local_position.vy, _vehicle_local_position.vz);
Quatf q(_vehicle_attitude.q);