solaESKF_EIGEN

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

Revision:
88:be349faa1976
Parent:
87:89bbbcdb667b
Child:
89:c9f64bd655d9
--- a/global.hpp	Wed Oct 20 01:50:52 2021 +0000
+++ b/global.hpp	Thu Oct 21 06:41:03 2021 +0000
@@ -1,6 +1,8 @@
 #ifndef __GLOBAL_HPP__
 #define __GLOBAL_HPP__
 
+using namespace std;
+
 #include "mbed.h"
 #include "SBUS.hpp"
 #include "PIDcontroller.h"
@@ -11,24 +13,21 @@
 #include "Vector3.hpp"
 #include "Matrix.h"
 #include "MatrixMath.h"
+#include "LSM9DS1.h"
+#include "LPS.h"
 #include "ScErrStateEKF.hpp"
 #include "MedianFilter.hpp"
 
-#define MPU6050_PWR_MGMT_1   0x6B
-#define MPU_ADDRESS  0x68
 #define M_PI 3.141592f
-#define ACCEL_FSR MPU6050_ACCEL_FS_8
 #define ACCEL_SSF 4096.0f
-#define GYRO_FSR MPU6050_GYRO_FS_250
 #define GYRO_SSF 131.0f
-#define MPU6050_LPF MPU6050_DLPF_BW_42
-#define MPU6050_SAMPLERATE 0
 #define PID_dt 0.015f
 #define servoPwmMax  1800.0f
 #define servoPwmMin  1200.0f
 #define motorPwmMax  2000.0f
 #define motorPwmMin  1100.0f
 
+
 struct valuePack
 {
     int16_t accData[3];
@@ -54,7 +53,7 @@
 // var
 
 // communication
-extern I2C i2c;  // sda, scl
+
 extern UsaPack pc; // log - tail
 extern Serial sd;
 extern Serial twelite;
@@ -62,6 +61,9 @@
 // io
 extern DigitalIn userButton;
 extern SBUS sbus;
+extern I2C i2c;  // sda, scl
+extern LSM9DS1 lsm;
+extern LPS lps;
 
 // control
 extern FastPWM servoRight;
@@ -132,7 +134,7 @@
 extern void run();
 
 // imu.cpp
-//extern void getIMUval();
+extern void getIMUval();
 
 // hil.cpp
 extern void getHILval();
@@ -149,5 +151,4 @@
 // global.cpp
 extern float mapfloat(float x, float in_min, float in_max, float out_min, float out_max);
 
-
 #endif
\ No newline at end of file