From cc71efbca121181ba3774cf2cb8bc5489b70f327 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 5 Dec 2019 17:59:24 +1100 Subject: [PATCH] SITL: added SIM_MAG_SCALING for testing scale factor errors --- libraries/SITL/SITL.cpp | 1 + libraries/SITL/SITL.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/SITL/SITL.cpp b/libraries/SITL/SITL.cpp index 2f2c367e66..d0e90a14aa 100644 --- a/libraries/SITL/SITL.cpp +++ b/libraries/SITL/SITL.cpp @@ -121,6 +121,7 @@ const AP_Param::GroupInfo SITL::var_info2[] = { AP_GROUPINFO("MAG_DIA", 18, SITL, mag_diag, 0), AP_GROUPINFO("MAG_ODI", 19, SITL, mag_offdiag, 0), AP_GROUPINFO("MAG_ORIENT", 20, SITL, mag_orient, 0), + AP_GROUPINFO("MAG_SCALING", 60, SITL, mag_scaling, 1), AP_GROUPEND }; diff --git a/libraries/SITL/SITL.h b/libraries/SITL/SITL.h index b92a5340fb..8df4913ff2 100644 --- a/libraries/SITL/SITL.h +++ b/libraries/SITL/SITL.h @@ -143,7 +143,8 @@ public: AP_Int16 pin_mask; // for GPIO emulation AP_Float speedup; // simulation speedup AP_Int8 odom_enable; // enable visual odomotry data - + AP_Float mag_scaling; // scaling factor on first compasses + // wind control enum WindType { WIND_TYPE_SQRT = 0,