ublox社製GPSモジュール NEO-7Mから、SPI経由でGPSデータをUBXプロトコルで読み出すライブラリです SPI経由ではGPSの出力設定が出来ないので、予めUART接続でPCから出力データを変更する必要があります。ここら辺の詳細については https://ameblo.jp/tsukuba-step/entry-12282936077.html を参考にして下さい。 出力設定は、 NAV-POSLLH,NAV-TIMEUTC,NAV-VELNED のみを出力して下さい

Dependents:   SensorManager

Revision:
2:5992db47f3c3
Parent:
1:2457089ca195
--- a/ubloxUBX.h	Tue Feb 13 04:25:54 2018 +0000
+++ b/ubloxUBX.h	Tue Feb 13 04:52:01 2018 +0000
@@ -8,6 +8,38 @@
 #define POSLLH_LEN 28
 #define VELNED_LEN 36
 
+/*
+
+//sample program
+
+#include "mbed.h"
+#include "ubloxUBX.h"
+
+GPS gps(PB_5,PB_4,PB_3,PB_6);
+Serial pc(USBTX,USBRX);
+
+
+
+obsvdData obsvd;
+tim gt;
+
+
+int main() {
+
+    while(1) {
+        while(gps.updateData()); //upload from ublox module
+        gps.chkData(&obsvd);          //position and velocity data update
+        gps.chkTime(&gt);             //time data update
+        
+        pc.printf("%d,%d,%d,%d\r\n",obsvd.Lon,obsvd.Lat,gt.Year,gt.Month);
+        wait(0.1);
+    }
+}
+
+
+
+*/
+
 typedef union{
     unsigned char Raw[TIMEUTC_LEN];
     struct{