Copter: add EKFCHECK_COMPASS parameter

This commit is contained in:
Randy Mackay 2014-07-21 19:07:15 +09:00
parent 65bc498d4e
commit a4a4334b13
3 changed files with 16 additions and 1 deletions

View File

@ -115,8 +115,9 @@ public:
k_param_serial0_baud,
k_param_serial1_baud,
k_param_serial2_baud,
k_param_land_repositioning, // 52
k_param_land_repositioning,
k_param_sonar, // sonar object
k_param_ekfcheck_compass_thresh,// 54
// 65: AP_Limits Library
k_param_limits = 65, // deprecated - remove
@ -383,6 +384,7 @@ public:
AP_Int8 arming_check;
AP_Int8 land_repositioning;
AP_Float ekfcheck_compass_thresh;
#if FRAME_CONFIG == HELI_FRAME
// Heli

View File

@ -435,6 +435,13 @@ const AP_Param::Info var_info[] PROGMEM = {
// @User: Advanced
GSCALAR(land_repositioning, "LAND_REPOSITION", LAND_REPOSITION_DEFAULT),
// @Param: EKFCHECK_COMPASS
// @DisplayName: EKF checker compass variance threshold
// @Description: Allows setting the maximum acceptable compass/magnetometer variance (0 to disable check)
// @Values: 0:Disabled, 0.6:Default, 1.0:Relaxed
// @User: Advanced
GSCALAR(ekfcheck_compass_thresh, "EKFCHECK_COMPASS", EKFCHECK_COMPASS_THRESHOLD_DEFAULT),
#if FRAME_CONFIG == HELI_FRAME
// @Group: HS1_
// @Path: ../libraries/RC_Channel/RC_Channel.cpp

View File

@ -337,6 +337,12 @@
# define PREARM_MAX_VELOCITY_CMS 50.0f // vehicle must be travelling under 50cm/s before arming
#endif
//////////////////////////////////////////////////////////////////////////////
// EKF Checker
#ifndef EKFCHECK_COMPASS_THRESHOLD_DEFAULT
# define EKFCHECK_COMPASS_THRESHOLD_DEFAULT 0.6f // EKF checker's default compass variance above which the EKF's horizontal position will be considered bad
#endif
//////////////////////////////////////////////////////////////////////////////
// MAGNETOMETER
#ifndef MAGNETOMETER