From e3eea6288744bded3f31aac9bbcd38d75b3aeb50 Mon Sep 17 00:00:00 2001 From: sander Date: Sun, 10 Apr 2016 12:31:41 +0200 Subject: [PATCH] Add estimator selection logic to VTOL apps --- ROMFS/px4fmu_common/init.d/rc.vtol_apps | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.vtol_apps b/ROMFS/px4fmu_common/init.d/rc.vtol_apps index 6462f6954d..95a6092d75 100644 --- a/ROMFS/px4fmu_common/init.d/rc.vtol_apps +++ b/ROMFS/px4fmu_common/init.d/rc.vtol_apps @@ -4,9 +4,22 @@ # att & pos estimator, att & pos control. # -attitude_estimator_q start -#ekf_att_pos_estimator start -position_estimator_inav start +# The system is defaulting to INAV_ENABLED = 1 +# but users can alternatively try the EKF-based +# filter by setting INAV_ENABLED = 0 +if param compare INAV_ENABLED 1 +then + attitude_estimator_q start + position_estimator_inav start +else + if param compare LPE_ENABLED 1 + then + attitude_estimator_q start + local_position_estimator start + else + ekf2 start + fi +fi vtol_att_control start mc_att_control start