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.
This commit is contained in:
Paul Riseborough 2017-07-29 07:18:58 +10:00 committed by GitHub
parent a240eeb86a
commit 5324f30cb6
1 changed files with 3 additions and 0 deletions

View File

@ -732,6 +732,9 @@ void Ekf2::run()
bool fuse_beta = !vehicle_status.is_rotary_wing && _fuseBeta.get(); bool fuse_beta = !vehicle_status.is_rotary_wing && _fuseBeta.get();
_ekf.set_fuse_beta_flag(fuse_beta); _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) { if (optical_flow_updated) {
flow_message flow; flow_message flow;
flow.flowdata(0) = optical_flow.pixel_flow_x_integral; flow.flowdata(0) = optical_flow.pixel_flow_x_integral;