SITL: added SIM_ACC_TRIM_{X,Y,Z} for simulating IMU trim

this will enable an autotest for AHRS trim
This commit is contained in:
Andrew Tridgell 2021-01-24 16:54:42 +11:00
parent 2ae57f8861
commit 7292b4f260
2 changed files with 2 additions and 0 deletions

View File

@ -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),

View File

@ -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;