Eigen Revision

Dependencies:   mbed LPS25HB_I2C LSM9DS1 PIDcontroller Autopilot_Eigen LoopTicker GPSUBX_UART_Eigen SBUS_without_mainfile MedianFilter Eigen UsaPack solaESKF_Eigen Vector3 CalibrateMagneto FastPWM

Revision:
61:c05353850017
Parent:
56:888379912f81
Child:
64:e9661430f0e3
--- a/global.hpp	Wed Jun 02 06:14:47 2021 +0000
+++ b/global.hpp	Thu Jun 03 11:28:13 2021 +0000
@@ -7,6 +7,7 @@
 #include "LoopTicker.hpp"
 #include "MPU6050.h"
 #include "MAG3110.h"
+#include "CalibrateMagneto.h"
 #include "I2Cdev.h"
 #include "FastPWM.h"
 #include <cmath>
@@ -28,7 +29,7 @@
 #define servoPwmMin  1200.0f
 #define motorPwmMax  2000.0f
 #define motorPwmMin  1100.0f
-#define N_EEPROM 10
+#define N_EEPROM 12
 
 // struct union
 union U
@@ -59,6 +60,7 @@
 // sensor
 extern MPU6050 accelgyro;
 extern MAG3110 mag_sensor;
+extern CalibrateMagneto magCalibrator;
 
 // io
 extern DigitalIn userButton;
@@ -94,19 +96,21 @@
 extern Vector3 LPacc;
 extern Vector3 LPmag;
 
-extern int out1, out2;
 extern float scaledServoOut[1];
 extern float servoOut[1];
 
 
 extern float val_thmg;
+extern float sigma_thmg;
 extern float th_mg;
 extern float accnormerr;
- 
+extern float sigma_accnorm;
+
 extern int calibrationFlag;
 extern int pos_tail; // 0:left 1:center 2:right
 extern int agoffset[6];
-extern float magbias[4];
+extern float magbiasMin[3];
+extern float magbiasMax[3];
 
 extern Vector3 rpy_align;