mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 02:03:33 +08:00
sensor calibration: apply board level adjustment to external sensors (#16127)
- apply SENS_BOARD_{X,Y,Z}_OFF to external sensors to prevent unnecessary misalignment with internal IMU
This commit is contained in:
@@ -228,7 +228,7 @@ static calibrate_return read_accelerometer_avg(float (&accel_avg)[MAX_ACCEL_SENS
|
||||
}
|
||||
|
||||
// rotate sensor measurements from sensor to body frame using board rotation matrix
|
||||
const Dcmf board_rotation = calibration::GetBoardRotation();
|
||||
const Dcmf board_rotation = calibration::GetBoardRotationMatrix();
|
||||
|
||||
for (unsigned s = 0; s < MAX_ACCEL_SENS; s++) {
|
||||
accel_sum[s] = board_rotation * accel_sum[s];
|
||||
@@ -362,7 +362,7 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
|
||||
if (calibrate_from_orientation(mavlink_log_pub, data_collected, accel_calibration_worker, &worker_data,
|
||||
false) == calibrate_return_ok) {
|
||||
|
||||
const Dcmf board_rotation = calibration::GetBoardRotation();
|
||||
const Dcmf board_rotation = calibration::GetBoardRotationMatrix();
|
||||
const Dcmf board_rotation_t = board_rotation.transpose();
|
||||
|
||||
bool param_save = false;
|
||||
|
||||
@@ -680,7 +680,7 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t cal_ma
|
||||
// only proceed if there's a valid internal
|
||||
if (internal_index >= 0) {
|
||||
|
||||
const Dcmf board_rotation = calibration::GetBoardRotation();
|
||||
const Dcmf board_rotation = calibration::GetBoardRotationMatrix();
|
||||
|
||||
// apply new calibrations to all raw sensor data before comparison
|
||||
for (unsigned cur_mag = 0; cur_mag < MAX_MAGS; cur_mag++) {
|
||||
|
||||
Reference in New Issue
Block a user