mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 03:41:36 +08:00
ekf2: mag control reset mag_lpf on first sample
This commit is contained in:
@@ -51,7 +51,7 @@ void Ekf::controlMagFusion()
|
|||||||
if (mag_data_ready) {
|
if (mag_data_ready) {
|
||||||
|
|
||||||
// sensor or calibration has changed, clear any mag bias and reset low pass filter
|
// sensor or calibration has changed, clear any mag bias and reset low pass filter
|
||||||
if (mag_sample.reset) {
|
if (mag_sample.reset || (_mag_counter == 0)) {
|
||||||
// Zero the magnetometer bias states
|
// Zero the magnetometer bias states
|
||||||
_state.mag_B.zero();
|
_state.mag_B.zero();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user