HAPSRG / Mbed 2 deprecated HAPStail

Dependencies:   mbed MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM

Revision:
70:9e7be21475f8
Parent:
69:0caaad87cf1d
Child:
71:62eb45ecffe9
diff -r 0caaad87cf1d -r 9e7be21475f8 global.hpp
--- a/global.hpp	Mon Jun 28 03:30:54 2021 +0000
+++ b/global.hpp	Tue Jun 29 10:53:06 2021 +0000
@@ -14,6 +14,7 @@
 #include "UsaPack.hpp"
 #include "Vector3.hpp"
 #include "errStateEKF.hpp"
+#include "MedianFilter.hpp"
 
 #define MPU6050_PWR_MGMT_1   0x6B
 #define MPU_ADDRESS  0x68
@@ -29,7 +30,7 @@
 #define servoPwmMin  1200.0f
 #define motorPwmMax  2000.0f
 #define motorPwmMin  1100.0f
-#define N_EEPROM 12
+#define N_EEPROM 18
 
 // struct union
 union U
@@ -105,6 +106,9 @@
 extern Vector3 magref;
 extern Vector3 dynacc;
 extern Vector3 gyro;
+extern MedianFilter accMedian;
+extern MedianFilter gyroMedian;
+extern MedianFilter magMedian;
 
 
 extern float scaledServoOut[1];
@@ -122,6 +126,8 @@
 extern int agoffset[6];
 extern float magbiasMin[3];
 extern float magbiasMax[3];
+extern float accMin[3];
+extern float accMax[3];
 
 extern Vector3 rpy_align;
 
@@ -144,6 +150,7 @@
 // setup.cpp
 extern void setup();
 extern void calibrate();
+extern float accScaleCalibrate(int attNo);
 
 // run.cpp
 extern void run();