From 5324f30cb6056d00e7a1b2679f7947fed1ef28b6 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Sat, 29 Jul 2017 07:18:58 +1000 Subject: [PATCH] ekf2: Let the EKF know if the vehicle is operating as a fixed wing type. (#7667) Setting this enables the EKF to use the GPS velocity to recover from bad compass yaw at launch. --- src/modules/ekf2/ekf2_main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index fcf2e92b57..d836f216ae 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -732,6 +732,9 @@ void Ekf2::run() bool fuse_beta = !vehicle_status.is_rotary_wing && _fuseBeta.get(); _ekf.set_fuse_beta_flag(fuse_beta); + // let the EKF know if the vehicle motion is that of a fixed wing (forward flight only relative to wind) + _ekf.set_is_fixed_wing(!vehicle_status.is_rotary_wing); + if (optical_flow_updated) { flow_message flow; flow.flowdata(0) = optical_flow.pixel_flow_x_integral;