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:
141:725321fe2949
Parent:
139:b378528c05f2
Child:
143:53808e4e684c
--- a/gps.cpp	Mon Dec 06 11:37:55 2021 +0000
+++ b/gps.cpp	Fri Dec 10 10:43:50 2021 +0000
@@ -1,26 +1,21 @@
-//#include "global.hpp"
-//
-//void getGPSval()
-//{
-//    gpsUpdateFlag = false;
-//    gps.Update();
-//    if (gps.iTOW_STATUS != itow_status){
-//        itow_status = gps.iTOW_STATUS;
-//        if(gps.gpsFix == 0x02 || gps.gpsFix == 0x03){
-//            vi.x = gps.VelocityNED.x;
-//            vi.y = gps.VelocityNED.y;
-//            vi.z = gps.VelocityNED.z;
-//            if(gpsLlh0Fixed == false){
-//                gps.CalculateUnit();
-//                gpsLlh0Fixed = true;
-//            }else{
-//                gps.Calculate();
-//            }
-//            pi.x = gps.PositionNED.x;
-//            pi.y = gps.PositionNED.y;
-//            pi.z = gps.PositionNED.z;
-//            gpsUpdateFlag = true;
-//        }
-//    }
-//}
-//
+#include "global.hpp"
+
+void getGPSval()
+{
+    gpsUpdateFlag = false;
+    gps.Update();
+    if (gps.iTOW_STATUS != itow_status){
+        itow_status = gps.iTOW_STATUS;
+        if(gps.gpsFix == 0x02 || gps.gpsFix == 0x03){
+            vi = gps.VelocityNED;
+            if(gpsLlh0Fixed == false){
+                gps.CalculateUnit();
+                gpsLlh0Fixed = true;
+            }else{
+                gps.Calculate();
+            }
+            pi = gps.PositionNED;
+            gpsUpdateFlag = true;
+        }
+    }
+}