hwdef: added compass compensation for 3 boards

use the new compass heater compensation for 4 compasses across 3
boards
This commit is contained in:
Andrew Tridgell 2022-08-02 08:00:43 +10:00 committed by Randy Mackay
parent 1fd0ed4e1f
commit 255ffb48df
3 changed files with 16 additions and 5 deletions

View File

@ -280,8 +280,8 @@ COMPASS AK8963:probe_mpu9250 1 ROTATION_YAW_270
COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90
# offset the internal compass for EM impact of the IMU heater
# this is in sensor frame mGauss
define HAL_AK09916_HEATER_OFFSET Vector3f(30,10,235)
# this is in body frame mGauss
define HAL_HEATER_MAG_OFFSET {AP_HAL::Device::make_bus_id(AP_HAL::Device::BUS_TYPE_SPI,4,1,9),Vector3f(10,30,-235)}
# also probe for external compasses
define HAL_PROBE_EXTERNAL_I2C_COMPASSES

View File

@ -17,5 +17,5 @@ define HAL_IMUHEAT_I_DEFAULT 0.07
PG14 USART6_TX USART6 NODMA
# offset the internal compass for EM impact of the IMU heater
# this is in sensor frame mGauss
define HAL_IST8310_I2C_HEATER_OFFSET Vector3f(-3,14,-6)
# this is in body frame mGauss
define HAL_HEATER_MAG_OFFSET {AP_HAL::Device::make_bus_id(AP_HAL::Device::BUS_TYPE_I2C,0,0xe,0xa),Vector3f(18,0,8)}

View File

@ -291,7 +291,18 @@ BARO BMP388 I2C:0:0x77
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
COMPASS BMM150 I2C:0:0x10 false ROTATION_NONE
# SPI devices
# builtin compass on CUAV 6X
COMPASS RM3100 I2C:0:0x20 false ROTATION_PITCH_180
# compensate for magnetic field generated by the heater on CUAV-6X RM3100
define HAL_HEATER_MAG_OFFSET_RM3100 AP_HAL::Device::make_bus_id(AP_HAL::Device::BUS_TYPE_I2C,0,0x20,0x11),Vector3f(-19,37,-24)
# compensate for magnetic field generated by the heater on Holybro6X BMM150
define HAL_HEATER_MAG_OFFSET_BMM150 AP_HAL::Device::make_bus_id(AP_HAL::Device::BUS_TYPE_I2C,0,0x10,0x05),Vector3f(12,-38,23)
define HAL_HEATER_MAG_OFFSET {HAL_HEATER_MAG_OFFSET_RM3100, HAL_HEATER_MAG_OFFSET_BMM150}
# IMU devices for Holybro6X
SPIDEV bmi088_g SPI3 DEVID1 BMI088_G_CS MODE3 10*MHZ 10*MHZ
SPIDEV bmi088_a SPI3 DEVID2 BMI088_A_CS MODE3 10*MHZ 10*MHZ
# alternative to bmi088