mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 15:23:35 +08:00
save significant IMU bias changes learned by the EKF
* ekf2: make publishing of learned accel biases more robust * ekf2: reset accel bias if calibration updated * msg: add separate accel and gyro calibration counters * ekf2: use separate accel and gyro calibration counters * ekf2: rework logic to reset biases when calibration counters increment * sensors: add saving of learned accel biases * ekf2: generalized saving accel/gyro/mag in flight sensor calibration * boards: holybro kakutef7 disable systemcmds/perf and systemcmds/top to save flash Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
This commit is contained in:
co-authored by
Paul Riseborough
parent
5969508fa7
commit
68026eadeb
@@ -160,8 +160,10 @@ void VehicleMagnetometer::MagCalibrationUpdate()
|
||||
const Vector3f bias_variance{estimator_sensor_bias.mag_bias_variance};
|
||||
|
||||
const bool valid = (hrt_elapsed_time(&estimator_sensor_bias.timestamp) < 1_s)
|
||||
&& (estimator_sensor_bias.mag_device_id != 0) && estimator_sensor_bias.mag_bias_valid
|
||||
&& (bias_variance.min() > min_var_allowed) && (bias_variance.max() < max_var_allowed);
|
||||
&& (estimator_sensor_bias.mag_device_id != 0) &&
|
||||
estimator_sensor_bias.mag_bias_valid &&
|
||||
estimator_sensor_bias.mag_bias_stable &&
|
||||
(bias_variance.min() > min_var_allowed) && (bias_variance.max() < max_var_allowed);
|
||||
|
||||
if (valid) {
|
||||
// find corresponding mag calibration
|
||||
|
||||
Reference in New Issue
Block a user