solaESKF_EIGEN

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

Revision:
119:a21e283730d1
Parent:
117:f899fd694e2a
Child:
121:2523eef96b36
Child:
122:68efdee114fa
--- a/setup.cpp	Wed Nov 17 05:12:24 2021 +0000
+++ b/setup.cpp	Thu Nov 18 08:48:29 2021 +0000
@@ -21,9 +21,12 @@
     SensorAlignmentAG << 1.0f << 0.0f << 0.0f
                       << 0.0f << 1.0f << 0.0f
                       << 0.0f << 0.0f << -1.0f;
-    SensorAlignmentMAG <<  0.0f <<  1.0f << 0.0f
-                       << -1.0f <<  0.0f << 0.0f
+    SensorAlignmentMAG << -1.0f <<  0.0f << 0.0f
+                       <<  0.0f <<  1.0f << 0.0f
                        <<  0.0f <<  0.0f << -1.0f; 
+    float magMin[3] =  {-392.590332, -85.194908, -155.781174};
+    float magMax[3] =  {182.602386, 530.811523, 365.834625};
+    magCalibrator.setExtremes(magMin,magMax);
     
     pitchPID.setSetPoint(0.0);
     pitchratePID.setSetPoint(0.0);