Library for ublox neo 6m

Dependents:   SATELITE

Files at this revision

API Documentation at this revision

Comitter:
JorgeGtz
Date:
Fri Nov 29 19:59:45 2019 +0000
Parent:
0:8f2e256775d7
Commit message:
Satelite

Changed in this revision

GPS.cpp Show annotated file Show diff for this revision Revisions of this file
GPS.h Show annotated file Show diff for this revision Revisions of this file
diff -r 8f2e256775d7 -r 380b615d1237 GPS.cpp
--- a/GPS.cpp	Mon May 04 03:41:27 2015 +0000
+++ b/GPS.cpp	Fri Nov 29 19:59:45 2019 +0000
@@ -63,7 +63,8 @@
 
         */
        // if (sscanf(msg, "GPGGA,%f,%f,%c,%f,%c,%*d,%*d, %*f,%*f,%*f,%*f,%*f,%*f,%d ", &time, &latitude, &ns, &longitude, &ew, &lock) >= 1) {
-        if(sscanf(msg, "GPGGA,%f,%f,%c,%f,%c,%d", &time, &latitude, &ns, &longitude, &ew, &lock) >= 1) { 
+        if(sscanf(msg, "GPGGA,%f,%f,%c,%f,%c,%d,%d,%f,%f,%c,%f", &time, &latitude, &ns, &longitude, &ew, &lock, &sats, &hdop, &alt, &unit, &geoid) >= 1) {
+      //  if(sscanf(msg, "GPGGA,%f,%f,%c,%f,%c,%d", &time, &latitude, &ns, &longitude, &ew, &lock) >= 1) { 
 
             if (!lock) 
             {
diff -r 8f2e256775d7 -r 380b615d1237 GPS.h
--- a/GPS.h	Mon May 04 03:41:27 2015 +0000
+++ b/GPS.h	Fri Nov 29 19:59:45 2019 +0000
@@ -39,16 +39,42 @@
      */
     int sample();
     
+    /** Beijig time format(shi,fen,miao) **/
+    int hour;
+    int minute;
+    int seconed;
+    
     /** The longitude (call sample() to set) */
     float longitude;
-
+    
+    /** display north/south, east/west unit**/
+    char ns, ew, unit;
+    
     /** The latitude (call sample() to set) */
     float latitude;
     
-    /** The UTC time */
+    /** The time (call sample() to set) */
+    float time;
+    
+    /** Number of satellites received (call sample() to set) */
+    int sats;
+    
+    /** Horizontal dilusion of precision (call sample() to set) */
+    float hdop;
+    
+    /** The altitude (call sample() to set)
+        Note that the accurate altitude is corrected by the geoid
+        See http://homepages.slingshot.co.nz/~geoff36/datum.htm
+    */
+    float alt;
+    
+    /** The geoid (call sample() to set) */
+    float  geoid;
+    
+    /** The NMEA sentence */
+    char msg[256];
     float utc;
     
-    char msg[256];
     
 private:
     float trunc(float v);