mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-21 23:50:36 +08:00
EKF: Increase measurement error allowance for accelerometer clipping
This commit is contained in:
+1
-1
@@ -172,7 +172,7 @@ struct extVisionSample {
|
|||||||
// bad accelerometer detection and mitigation
|
// bad accelerometer detection and mitigation
|
||||||
#define BADACC_PROBATION 10E6 // Number of usec that accel data declared bad must continuously pass checks to be declared good
|
#define BADACC_PROBATION 10E6 // Number of usec that accel data declared bad must continuously pass checks to be declared good
|
||||||
#define BADACC_HGT_RESET 1E6 // Number of usec that accel data must continuously fail checks to trigger a height reset
|
#define BADACC_HGT_RESET 1E6 // Number of usec that accel data must continuously fail checks to trigger a height reset
|
||||||
#define BADACC_BIAS_PNOISE_MULT 2.0f // The delta velocity process noise is multiplied by this value when accel data is declared bad
|
#define BADACC_BIAS_PNOISE 4.9f // The delta velocity process noise is set to this when accel data is declared bad (m/s**2)
|
||||||
|
|
||||||
struct parameters {
|
struct parameters {
|
||||||
// measurement source control
|
// measurement source control
|
||||||
|
|||||||
+3
-2
@@ -235,8 +235,9 @@ void Ekf::predictCovariance()
|
|||||||
daxVar = dayVar = dazVar = sq(dt * gyro_noise);
|
daxVar = dayVar = dazVar = sq(dt * gyro_noise);
|
||||||
float accel_noise = math::constrain(_params.accel_noise, 0.0f, 1.0f);
|
float accel_noise = math::constrain(_params.accel_noise, 0.0f, 1.0f);
|
||||||
if (_bad_vert_accel_detected) {
|
if (_bad_vert_accel_detected) {
|
||||||
// increase accelerometer process noise if bad accel data is detected
|
// Increase accelerometer process noise if bad accel data is detected. Measurement errors due to
|
||||||
accel_noise *= BADACC_BIAS_PNOISE_MULT;
|
// vibration induced clipping commonly reach an equivalent 0.5g offset.
|
||||||
|
accel_noise = BADACC_BIAS_PNOISE;
|
||||||
}
|
}
|
||||||
dvxVar = dvyVar = dvzVar = sq(dt * accel_noise);
|
dvxVar = dvyVar = dvzVar = sq(dt * accel_noise);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user