GPS/GNSS UBX library for UART

Dependencies:   Vector3

Dependents:   GPS_0002

Revision:
13:facd8e54f2eb
Parent:
12:2ffb2fcaac23
Child:
14:1ed344c662d2
--- a/GPSUBX_UART.cpp	Thu Nov 04 09:41:59 2021 +0000
+++ b/GPSUBX_UART.cpp	Fri Nov 12 06:11:39 2021 +0000
@@ -117,20 +117,16 @@
         Height = (float)posllh.data.height / 1000.0f;
 //        pc.printf("!%d, %f, %f, %f\r\n", iTOW_POSLLH, Longitude, Latitude, Height);
     }
-    // RELPOSNED
-    if (mc == 0x01 && mi == 0x3c)
+    // STATUS
+    if (mc == 0x01 && mi == 0x03)
     {
-        RELPOSNED relposned;
-        for (int i = 0; i < RELPOSNED_LEN; i++)
+        STATUS status;
+        for (int i = 0; i < STATUS_LEN; i++)
         {
             relposned.byte_data[i] = buffer[i+6];
         }
-        RefStationID = relposned.data.refStationId;
-        iTOW_RELPOSNED = relposned.data.iTOW;
-        RelPosNED.x = (float)relposned.data.relPosN / 100.0f + (float)relposned.data.relPosHPN / 1000.0f;
-        RelPosNED.y = (float)relposned.data.relPosE / 100.0f + (float)relposned.data.relPosHPE / 1000.0f;
-        RelPosNED.z = (float)relposned.data.relPosD / 100.0f + (float)relposned.data.relPosHPD / 1000.0f;
-//        pc.printf("^%d, %d, %f, %f, %f\r\n", iTOW_RELPOSNED, RefStationID, RelPosNED.x, RelPosNED.y, RelPosNED.z);
+        iTOW_RELPOSNED = status.data.iTOW;
+        gpsFix = satus.data.gpsFix;
     }
     // TIMEUTC
     else if (mc == 0x01 && mi == 0x21)