summaryrefslogtreecommitdiff
path: root/src/sensor/calibration.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-07 11:24:01 +0100
committerHampusM <hampus@hampusmat.com>2022-03-07 11:24:01 +0100
commitee076c66c99fbd7895459e80d679c374340a9ed2 (patch)
tree14bbacde20f8d23d8ec3c4638f18f6a09a1153cb /src/sensor/calibration.hpp
parent5fea3a40f77417f639de3dbb27797d8e2ecdbaca (diff)
refactor: make misc improvements & update calibration precision
Diffstat (limited to 'src/sensor/calibration.hpp')
-rw-r--r--src/sensor/calibration.hpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/sensor/calibration.hpp b/src/sensor/calibration.hpp
index 585d655..17f8fa9 100644
--- a/src/sensor/calibration.hpp
+++ b/src/sensor/calibration.hpp
@@ -4,28 +4,28 @@
#include "serial.hpp"
// Calibration precision
-constexpr float ACCEL_CAL_X_MAX = 0.006;
-constexpr float ACCEL_CAL_X_MIN = -0.006;
+constexpr double ACCEL_CAL_X_MAX = 0.003;
+constexpr double ACCEL_CAL_X_MIN = -0.003;
-constexpr float ACCEL_CAL_Y_MAX = 0.006;
-constexpr float ACCEL_CAL_Y_MIN = -0.006;
+constexpr double ACCEL_CAL_Y_MAX = 0.003;
+constexpr double ACCEL_CAL_Y_MIN = -0.003;
-constexpr float ACCEL_CAL_Z_MAX = 0.006;
-constexpr float ACCEL_CAL_Z_MIN = -0.006;
+constexpr double ACCEL_CAL_Z_MAX = 0.003;
+constexpr double ACCEL_CAL_Z_MIN = -0.003;
-constexpr float GYRO_CAL_X_MAX = 0.06;
-constexpr float GYRO_CAL_X_MIN = -0.06;
+constexpr double GYRO_CAL_X_MAX = 0.003;
+constexpr double GYRO_CAL_X_MIN = -0.003;
-constexpr float GYRO_CAL_Y_MAX = 0.06;
-constexpr float GYRO_CAL_Y_MIN = -0.06;
+constexpr double GYRO_CAL_Y_MAX = 0.05;
+constexpr double GYRO_CAL_Y_MIN = -0.05;
-constexpr float GYRO_CAL_Z_MAX = 0.06;
-constexpr float GYRO_CAL_Z_MIN = -0.06;
+constexpr double GYRO_CAL_Z_MAX = 0.04;
+constexpr double GYRO_CAL_Z_MIN = -0.04;
-constexpr uint32_t CALIBRATION_TIMEOUT = 120000; // Milliseconds
+constexpr uint32_t CALIBRATION_TIMEOUT = 120000; // milliseconds
-constexpr unsigned int SENSOR_READ_CNT = 20;
-constexpr float SENSOR_VAL_ADJUST = 0.05;
+constexpr uint32_t SENSOR_READ_CNT = 20;
+constexpr double SENSOR_VAL_ADJUST = 0.05;
class SensorCalibratorValues
{