mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 17:23:33 +08:00
ekf2: Improve control of magnetometer bias learning
Adds parameters so that the motion checks used to switch between magnetic yaw and 3-axis fusion can be adjusted. Modifies the check used to determine if learned mag biases can be saved. A cumulated calibration time is used rather than continuous calibration time to allow for for switching in and out of 3-axis fusion mode that is required to do calibration.
This commit is contained in:
committed by
Lorenz Meier
parent
aa69ae0ee6
commit
889fb30029
@@ -447,7 +447,7 @@ PARAM_DEFINE_INT32(EKF2_DECL_TYPE, 7);
|
||||
* Type of magnetometer fusion
|
||||
*
|
||||
* Integer controlling the type of magnetometer fusion used - magnetic heading or 3-axis magnetometer.
|
||||
* If set to automatic: heading fusion on-ground and 3-axis fusion in-flight
|
||||
* If set to automatic: heading fusion on-ground and 3-axis fusion in-flight with fallback to heading fusion if there is insufficient motion to make yaw or mag biases observable.
|
||||
*
|
||||
* @group EKF2
|
||||
* @value 0 Automatic
|
||||
@@ -457,6 +457,30 @@ PARAM_DEFINE_INT32(EKF2_DECL_TYPE, 7);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(EKF2_MAG_TYPE, 0);
|
||||
|
||||
/**
|
||||
* Horizontal acceleration threshold used by automatic selection of magnetometer fusion method.
|
||||
* This parameter is used when the magnetometer fusion method is set automatically (EKF2_MAG_TYPE = 0). If the filtered horizontal acceleration is greater than this parameter value, then the EKF will use 3-axis magnetomer fusion.
|
||||
*
|
||||
* @group EKF2
|
||||
* @min 0.0
|
||||
* @max 5.0
|
||||
* @unit m/s**2
|
||||
* @decimal 2
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(EKF2_MAG_ACCLIM, 0.5f);
|
||||
|
||||
/**
|
||||
* Yaw rate threshold used by automatic selection of magnetometer fusion method.
|
||||
* This parameter is used when the magnetometer fusion method is set automatically (EKF2_MAG_TYPE = 0). If the filtered yaw rate is greater than this parameter value, then the EKF will use 3-axis magnetomer fusion.
|
||||
*
|
||||
* @group EKF2
|
||||
* @min 0.0
|
||||
* @max 0.5
|
||||
* @unit rad/s
|
||||
* @decimal 2
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(EKF2_MAG_YAWLIM, 0.25f);
|
||||
|
||||
/**
|
||||
* Gate size for barometric height fusion
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user