From 0a9d3c92c5b827a28c7b844a7fbf9c1ea0bb5d87 Mon Sep 17 00:00:00 2001 From: Mikal Hart Date: Thu, 5 Oct 2017 14:06:39 -0500 Subject: [PATCH] Version 1.0.0: reorganize per new Arduino library standard, fix bug with course in FullExample.ino --- examples/FullExample/FullExample.ino | 4 ++-- keywords.txt | 6 ++--- library.json | 33 ++++++++++++++++++---------- library.properties | 9 ++++++++ TinyGPS++.cpp => src/TinyGPS++.cpp | 6 ++--- TinyGPS++.h => src/TinyGPS++.h | 2 +- 6 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 library.properties rename TinyGPS++.cpp => src/TinyGPS++.cpp (98%) rename TinyGPS++.h => src/TinyGPS++.h (99%) diff --git a/examples/FullExample/FullExample.ino b/examples/FullExample/FullExample.ino index e8d8085..6d4eeda 100644 --- a/examples/FullExample/FullExample.ino +++ b/examples/FullExample/FullExample.ino @@ -42,7 +42,7 @@ void loop() printFloat(gps.altitude.meters(), gps.altitude.isValid(), 7, 2); printFloat(gps.course.deg(), gps.course.isValid(), 7, 2); printFloat(gps.speed.kmph(), gps.speed.isValid(), 6, 2); - printStr(gps.course.isValid() ? TinyGPSPlus::cardinal(gps.course.value()) : "*** ", 6); + printStr(gps.course.isValid() ? TinyGPSPlus::cardinal(gps.course.deg()) : "*** ", 6); unsigned long distanceKmToLondon = (unsigned long)TinyGPSPlus::distanceBetween( @@ -156,4 +156,4 @@ static void printStr(const char *str, int len) for (int i=0; i +sentence=TinyGPS++ provides object-oriented parsing of GPS (NMEA) sentences +paragraph=NMEA is the standard format GPS devices use to report location, time, altitude, etc. TinyGPS++ is a compact, resilient library that parses the most common NMEA 'sentences' used: GGA and RMC. It can also be customized to extract data from *any* compliant sentence. +category=Communication +url=https://github.com/mikalhart/TinyGPSPlus +architectures=* diff --git a/TinyGPS++.cpp b/src/TinyGPS++.cpp similarity index 98% rename from TinyGPS++.cpp rename to src/TinyGPS++.cpp index 296f7a0..ec23467 100644 --- a/TinyGPS++.cpp +++ b/src/TinyGPS++.cpp @@ -28,9 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #define _GPRMCterm "GPRMC" -#define _GNRMCterm "GNRMC" #define _GPGGAterm "GPGGA" -#define _GNGGAterm "GNGGA" TinyGPSPlus::TinyGPSPlus() : parity(0) @@ -209,9 +207,9 @@ bool TinyGPSPlus::endOfTermHandler() // the first term determines the sentence type if (curTermNumber == 0) { - if (!strcmp(term, _GPRMCterm) || !strcmp(term, _GNRMCterm)) + if (!strcmp(term, _GPRMCterm)) curSentenceType = GPS_SENTENCE_GPRMC; - else if (!strcmp(term, _GPGGAterm) || !strcmp(term, _GNGGAterm)) + else if (!strcmp(term, _GPGGAterm)) curSentenceType = GPS_SENTENCE_GPGGA; else curSentenceType = GPS_SENTENCE_OTHER; diff --git a/TinyGPS++.h b/src/TinyGPS++.h similarity index 99% rename from TinyGPS++.h rename to src/TinyGPS++.h index 6998c43..b4221f4 100644 --- a/TinyGPS++.h +++ b/src/TinyGPS++.h @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #endif #include -#define _GPS_VERSION "0.95" // software version of this library +#define _GPS_VERSION "0.92" // software version of this library #define _GPS_MPH_PER_KNOT 1.15077945 #define _GPS_MPS_PER_KNOT 0.51444444 #define _GPS_KMPH_PER_KNOT 1.852