mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 14:19:57 +08:00
fix(mag_bias_estimator): disable the mag bias estimator by default (#29342)
* fix(mag_bias_estimator): disable the mag bias estimator by default It only helps if you have a very bad or no calibration in the first place or if the vehicle has magnets everywhere. But it causes problems if you have a perfectly fresh calibration and no new disturbance especially of course if the estimator runs twice, once on the can node, once on the autopilot. * fix(mag_bias_estimator): remove the mag bias estimator from all cannodes It will cause issues if the can nodes run their own online calibration and the autopilot expects to receive raw data. It's not super obvious but will lead to inaccuracies, drifts and inconsitencies in magnetometer heading.
This commit is contained in:
1 parent
79feb2e3f4
commit
96075cb00c
14 files changed
+2
-25
No files matched your search
@@ -95,17 +95,6 @@ then
|
||||
gyro_calibration start
|
||||
fi
|
||||
|
||||
|
||||
if param compare -s MBE_ENABLE 1
|
||||
then
|
||||
# conservative mag bias estimation
|
||||
param set-default MBE_LEARN_GAIN 5
|
||||
param set-default IMU_GYRO_CUTOFF 20
|
||||
# nodes have no GCS calibration flow, persist the estimated bias
|
||||
param set-default SENS_MAG_AUTOCAL 1
|
||||
mag_bias_estimator start
|
||||
fi
|
||||
|
||||
param set-default SENS_MAG_RATE 100
|
||||
|
||||
sensors start
|
||||
|
||||
@@ -22,7 +22,6 @@ CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
|
||||
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# board specific defaults
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
param set-default MBE_ENABLE 0
|
||||
param set-default SENS_IMU_CLPNOTI 0
|
||||
|
||||
safety_button start
|
||||
|
||||
@@ -25,7 +25,6 @@ CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
|
||||
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
|
||||
|
||||
@@ -7,7 +7,6 @@ param set-default CANNODE_SUB_MBD 1
|
||||
param set-default CANNODE_SUB_RTCM 1
|
||||
param set-default GPS_1_GNSS 63
|
||||
param set-default GPS_UBX_BAUD1 921600
|
||||
param set-default MBE_ENABLE 0
|
||||
param set-default SENS_IMU_CLPNOTI 0
|
||||
|
||||
safety_button start
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# board specific defaults
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
param set-default MBE_ENABLE 0
|
||||
param set-default SENS_IMU_CLPNOTI 0
|
||||
|
||||
pwm_out start
|
||||
|
||||
@@ -23,7 +23,6 @@ CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_MODULES_EKF2=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
|
||||
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
param set-default CANNODE_SUB_MBD 1
|
||||
param set-default CANNODE_SUB_RTCM 1
|
||||
param set-default MBE_ENABLE 0
|
||||
param set-default SENS_IMU_CLPNOTI 0
|
||||
|
||||
safety_button start
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
param set-default CANNODE_SUB_MBD 1
|
||||
param set-default CANNODE_SUB_RTCM 1
|
||||
param set-default MBE_ENABLE 0
|
||||
param set-default SENS_IMU_CLPNOTI 0
|
||||
|
||||
tone_alarm start
|
||||
|
||||
@@ -20,7 +20,6 @@ CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
|
||||
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
|
||||
|
||||
@@ -21,7 +21,6 @@ CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
|
||||
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
|
||||
|
||||
@@ -21,7 +21,6 @@ CONFIG_UAVCANNODE_SAFETY_BUTTON=y
|
||||
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
|
||||
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
|
||||
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
|
||||
|
||||
@@ -9,7 +9,7 @@ parameters:
|
||||
This enables continuous calibration of the magnetometers
|
||||
before takeoff using gyro data.
|
||||
type: boolean
|
||||
default: 1
|
||||
default: 0
|
||||
reboot_required: true
|
||||
MBE_LEARN_GAIN:
|
||||
description:
|
||||
|
||||
@@ -79,8 +79,7 @@ parameters:
|
||||
short: Magnetometer auto calibration
|
||||
long: Automatically initialize magnetometer calibration from bias estimate
|
||||
if available. The estimate only captures hard-iron offsets, so a full
|
||||
calibration is still recommended. Mainly intended for remote nodes
|
||||
(e.g. CAN GPS units) that cannot be calibrated from a ground station.
|
||||
calibration is still recommended.
|
||||
category: System
|
||||
type: boolean
|
||||
default: 0
|
||||
Reference in new issue
Block a user