diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-03-01 18:05:22 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-03-01 18:32:08 +0100 |
commit | f3b0b41a0d3848c37b2533424b4501a84ef821ec (patch) | |
tree | d0cb8b495477b64f792a2933c27a1db40785d6af | |
parent | 8831e258b3f178fb3ceed10de5a788f725fe3f6f (diff) | |
download | px4-firmware-f3b0b41a0d3848c37b2533424b4501a84ef821ec.tar.gz px4-firmware-f3b0b41a0d3848c37b2533424b4501a84ef821ec.tar.bz2 px4-firmware-f3b0b41a0d3848c37b2533424b4501a84ef821ec.zip |
Make INAV configurable
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.mc_apps | 13 | ||||
-rw-r--r-- | src/modules/position_estimator_inav/position_estimator_inav_params.c | 14 |
2 files changed, 23 insertions, 4 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.mc_apps b/ROMFS/px4fmu_common/init.d/rc.mc_apps index e2fe67946..6517e026a 100644 --- a/ROMFS/px4fmu_common/init.d/rc.mc_apps +++ b/ROMFS/px4fmu_common/init.d/rc.mc_apps @@ -4,10 +4,15 @@ # att & pos estimator, att & pos control. # -# previously (2014) the system was relying on -#attitude_estimator_ekf start -#position_estimator_inav start -ekf_att_pos_estimator start +# previously (2014) the system was relying on +# INAV, which defaults to 0 now. +if param compare INAV_ENABLED 1 +then + attitude_estimator_ekf start + position_estimator_inav start +else + ekf_att_pos_estimator start +fi if mc_att_control start then diff --git a/src/modules/position_estimator_inav/position_estimator_inav_params.c b/src/modules/position_estimator_inav/position_estimator_inav_params.c index 5387b7e87..91915fb53 100644 --- a/src/modules/position_estimator_inav/position_estimator_inav_params.c +++ b/src/modules/position_estimator_inav/position_estimator_inav_params.c @@ -288,6 +288,20 @@ PARAM_DEFINE_FLOAT(INAV_DELAY_GPS, 0.2f); */ PARAM_DEFINE_INT32(CBRK_NO_VISION, 0); +/** + * INAV enabled + * + * If set to 1, use INAV for position estimation + * the system uses the compined attitude / position + * filter framework. + * + * @min 0.0 + * @max 1.0 + * @unit s + * @group Position Estimator INAV + */ +PARAM_DEFINE_INT32(INAV_ENABLED, 0); + int parameters_init(struct position_estimator_inav_param_handles *h) { h->w_z_baro = param_find("INAV_W_Z_BARO"); |