Copter: add DCM_CHECK_THRESH parameter

This commit is contained in:
Randy Mackay 2014-10-16 16:18:06 +09:00
parent ed30c0938e
commit 470fcc2077
3 changed files with 16 additions and 3 deletions

View File

@ -120,7 +120,9 @@ public:
k_param_ekfcheck_thresh,
k_param_terrain,
k_param_acro_expo,
k_param_throttle_deadzone, // 57
k_param_throttle_deadzone,
k_param_optflow,
k_param_dcmcheck_thresh, // 59
// 65: AP_Limits Library
k_param_limits = 65, // deprecated - remove
@ -392,6 +394,7 @@ public:
AP_Int8 land_repositioning;
AP_Float ekfcheck_thresh;
AP_Float dcmcheck_thresh;
#if FRAME_CONFIG == HELI_FRAME
// Heli

View File

@ -456,12 +456,19 @@ const AP_Param::Info var_info[] PROGMEM = {
GSCALAR(land_repositioning, "LAND_REPOSITION", LAND_REPOSITION_DEFAULT),
// @Param: EKF_CHECK_THRESH
// @DisplayName: EKF and InertialNav check compass and velocity variance threshold
// @DisplayName: EKF check compass and velocity variance threshold
// @Description: Allows setting the maximum acceptable compass and velocity variance (0 to disable check)
// @Values: 0:Disabled, 0.6:Default, 1.0:Relaxed
// @User: Advanced
GSCALAR(ekfcheck_thresh, "EKF_CHECK_THRESH", EKFCHECK_THRESHOLD_DEFAULT),
// @Param: DCM_CHECK_THRESH
// @DisplayName: DCM yaw error threshold
// @Description: Allows setting the maximum acceptable yaw error as a sin of the yaw error (0 to disable check)
// @Values: 0:Disabled, 0.8:Default, 0.98:Relaxed
// @User: Advanced
GSCALAR(dcmcheck_thresh, "DCM_CHECK_THRESH", DCMCHECK_THRESHOLD_DEFAULT),
#if FRAME_CONFIG == HELI_FRAME
// @Group: HS1_
// @Path: ../libraries/RC_Channel/RC_Channel.cpp

View File

@ -327,10 +327,13 @@
#endif
//////////////////////////////////////////////////////////////////////////////
// EKF Checker
// EKF & DCM Checker
#ifndef EKFCHECK_THRESHOLD_DEFAULT
# define EKFCHECK_THRESHOLD_DEFAULT 0.8f // EKF checker's default compass and velocity variance above which the EKF's horizontal position will be considered bad
#endif
#ifndef DCMCHECK_THRESHOLD_DEFAULT
# define DCMCHECK_THRESHOLD_DEFAULT 0.8f // DCM checker's default yaw error threshold above which we will abandon horizontal position hold. The units are sin(angle) so 0.8 = about 60degrees of error
#endif
//////////////////////////////////////////////////////////////////////////////
// MAGNETOMETER