From 7292b4f2605438a376924279ed95d01224125222 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 24 Jan 2021 16:54:42 +1100 Subject: [PATCH] SITL: added SIM_ACC_TRIM_{X,Y,Z} for simulating IMU trim this will enable an autotest for AHRS trim --- libraries/SITL/SITL.cpp | 1 + libraries/SITL/SITL.h | 1 + 2 files changed, 2 insertions(+) diff --git a/libraries/SITL/SITL.cpp b/libraries/SITL/SITL.cpp index 32769b5be4..0c1d8078c0 100644 --- a/libraries/SITL/SITL.cpp +++ b/libraries/SITL/SITL.cpp @@ -386,6 +386,7 @@ const AP_Param::GroupInfo SITL::var_ins[] = { AP_GROUPINFO("ACC1_SCAL", 22, SITL, accel_scale[0], 0), AP_GROUPINFO("ACC2_SCAL", 23, SITL, accel_scale[1], 0), AP_GROUPINFO("ACC3_SCAL", 24, SITL, accel_scale[2], 0), + AP_GROUPINFO("ACC_TRIM", 25, SITL, accel_trim, 0), // the IMUT parameters must be last due to the enable parameters AP_SUBGROUPINFO(imu_tcal[0], "IMUT1_", 61, SITL, AP_InertialSensor::TCal), diff --git a/libraries/SITL/SITL.h b/libraries/SITL/SITL.h index 730baec710..24e413ed4b 100644 --- a/libraries/SITL/SITL.h +++ b/libraries/SITL/SITL.h @@ -450,6 +450,7 @@ public: AP_Float accel_noise[INS_MAX_INSTANCES]; // in m/s/s AP_Vector3f accel_bias[INS_MAX_INSTANCES]; // in m/s/s AP_Vector3f accel_scale[INS_MAX_INSTANCES]; // in m/s/s + AP_Vector3f accel_trim; AP_Float accel_fail[INS_MAX_INSTANCES]; // accelerometer failure value // gyro and accel fail masks AP_Int8 gyro_fail_mask;