forked from Archive/PX4-Autopilot
ekf2: gravity fusion don't use any accel samples that are clipping
This commit is contained in:
parent
2c76109a94
commit
0f260fc26c
|
@ -82,7 +82,9 @@ void Ekf::controlGravityFusion(const imuSample &imu)
|
|||
|
||||
_aid_src_gravity.fusion_enabled = _control_status.flags.gravity_vector;
|
||||
|
||||
if (_aid_src_gravity.fusion_enabled && !_aid_src_gravity.innovation_rejected) {
|
||||
const bool accel_clipping = imu.delta_vel_clipping[0] || imu.delta_vel_clipping[1] || imu.delta_vel_clipping[2];
|
||||
|
||||
if (_aid_src_gravity.fusion_enabled && !_aid_src_gravity.innovation_rejected && !accel_clipping) {
|
||||
// perform fusion for each axis
|
||||
_aid_src_gravity.fused = measurementUpdate(Kx, innovation_variance(0), innovation(0))
|
||||
&& measurementUpdate(Ky, innovation_variance(1), innovation(1))
|
||||
|
|
Loading…
Reference in New Issue