Skip to content

Commit

Permalink
Arduino library compatibility (#92)
Browse files Browse the repository at this point in the history
* Rename Files and Library

Rename src files and library to follow Arduino's library guidelines:
https://arduino.github.io/arduino-cli/latest/library-specification/

* Bump version

Bump version to 2.0.0
- Not backwards compatible with file name changes

* Revert file name change

* Create wrapper header

Wrapper header for library name change
Provides backwards compatibility

* Version reduction

revert version bump

* Update TinyGPSPlus.h

Wrapper header for dummy header
  • Loading branch information
santaimpersonator authored Jan 19, 2022
1 parent cfb60e5 commit 81ba32c
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 44 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# TinyGPSPlus
A new, customizable Arduino NMEA parsing library
A *NEW* Full-featured GPS/NMEA Parser for Arduino
TinyGPS++ is a new Arduino library for parsing NMEA data streams provided by GPS modules.
TinyGPSPlus is a new Arduino library for parsing NMEA data streams provided by GPS modules.

Like its predecessor, TinyGPS, this library provides compact and easy-to-use methods for extracting position, date, time, altitude, speed, and course from consumer GPS devices.

However, TinyGPS++’s programmer interface is considerably simpler to use than TinyGPS, and the new library can extract arbitrary data from any of the myriad NMEA sentences out there, even proprietary ones.
However, TinyGPSPlus’s programmer interface is considerably simpler to use than TinyGPS, and the new library can extract arbitrary data from any of the myriad NMEA sentences out there, even proprietary ones.

See [Arduiniana - TinyGPS++](http://arduiniana.org/libraries/tinygpsplus/) for more detailed information on how to use TinyGPSPlus
See [Arduiniana - TinyGPSPlus](http://arduiniana.org/libraries/tinygpsplus/) for more detailed information on how to use TinyGPSPlus
12 changes: 6 additions & 6 deletions examples/BasicExample/BasicExample.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <TinyGPS++.h>
#include <TinyGPSPlus.h>
/*
This sample sketch should be the first you try out when you are testing a TinyGPS++
(TinyGPSPlus) installation. In normal use, you feed TinyGPS++ objects characters from
This sample sketch should be the first you try out when you are testing a TinyGPSPlus
(TinyGPSPlus) installation. In normal use, you feed TinyGPSPlus objects characters from
a serial NMEA GPS device, but this example uses static strings for simplicity.
*/

Expand All @@ -14,16 +14,16 @@ const char *gpsStream =
"$GPRMC,045251.000,A,3014.4275,N,09749.0626,W,0.51,217.94,030913,,,A*7D\r\n"
"$GPGGA,045252.000,3014.4273,N,09749.0628,W,1,09,1.3,206.9,M,-22.5,M,,0000*6F\r\n";

// The TinyGPS++ object
// The TinyGPSPlus object
TinyGPSPlus gps;

void setup()
{
Serial.begin(115200);

Serial.println(F("BasicExample.ino"));
Serial.println(F("Basic demonstration of TinyGPS++ (no device needed)"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("Basic demonstration of TinyGPSPlus (no device needed)"));
Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();

Expand Down
10 changes: 5 additions & 5 deletions examples/DeviceExample/DeviceExample.ino
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <TinyGPS++.h>
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
This sample sketch demonstrates the normal use of a TinyGPSPlus (TinyGPSPlus) object.
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 4800;

// The TinyGPS++ object
// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
Expand All @@ -20,8 +20,8 @@ void setup()
ss.begin(GPSBaud);

Serial.println(F("DeviceExample.ino"));
Serial.println(F("A simple demonstration of TinyGPS++ with an attached GPS module"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("A simple demonstration of TinyGPSPlus with an attached GPS module"));
Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
}
Expand Down
10 changes: 5 additions & 5 deletions examples/FullExample/FullExample.ino
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <TinyGPS++.h>
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
This sample code demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
This sample code demonstrates the normal use of a TinyGPSPlus (TinyGPSPlus) object.
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 4800;

// The TinyGPS++ object
// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
Expand All @@ -20,8 +20,8 @@ void setup()
ss.begin(GPSBaud);

Serial.println(F("FullExample.ino"));
Serial.println(F("An extensive example of many interesting TinyGPS++ features"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("An extensive example of many interesting TinyGPSPlus features"));
Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
Serial.println(F("Sats HDOP Latitude Longitude Fix Date Time Date Alt Course Speed Card Distance Course Card Chars Sentences Checksum"));
Expand Down
10 changes: 5 additions & 5 deletions examples/KitchenSink/KitchenSink.ino
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <TinyGPS++.h>
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
This sample code demonstrates just about every built-in operation of TinyGPS++ (TinyGPSPlus).
This sample code demonstrates just about every built-in operation of TinyGPSPlus (TinyGPSPlus).
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 4800;

// The TinyGPS++ object
// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
Expand All @@ -23,8 +23,8 @@ void setup()
ss.begin(GPSBaud);

Serial.println(F("KitchenSink.ino"));
Serial.println(F("Demonstrating nearly every feature of TinyGPS++"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("Demonstrating nearly every feature of TinyGPSPlus"));
Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
}
Expand Down
8 changes: 4 additions & 4 deletions examples/SatElevTracker/SatElevTracker.ino
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <TinyGPS++.h>
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
This sample code tracks satellite elevations using TinyGPSCustom objects.
Satellite numbers and elevations are not normally tracked by TinyGPS++, but
Satellite numbers and elevations are not normally tracked by TinyGPSPlus, but
by using TinyGPSCustom we get around this.
It requires the use of SoftwareSerial and assumes that you have a
Expand All @@ -14,7 +14,7 @@ static const uint32_t GPSBaud = 4800;
static const int MAX_SATELLITES = 40;
static const int PAGE_LENGTH = 40;

// The TinyGPS++ object
// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
Expand All @@ -40,7 +40,7 @@ void setup()

Serial.println(F("SatElevTracker.ino"));
Serial.println(F("Displays GPS satellite elevations as they change"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();

Expand Down
2 changes: 1 addition & 1 deletion examples/SatElevTracker/sample_satellite_elevation_log.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SatElevTracker.ino
Displays GPS satellite elevations as they change
Testing TinyGPS++ library v. 1
Testing TinyGPSPlus library v. 1
by Mikal Hart

Time 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Expand Down
8 changes: 4 additions & 4 deletions examples/SatelliteTracker/SatelliteTracker.ino
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <TinyGPS++.h>
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
This sample code demonstrates how to use an array of TinyGPSCustom objects
to monitor all the visible satellites.
Satellite numbers, elevation, azimuth, and signal-to-noise ratio are not
normally tracked by TinyGPS++, but by using TinyGPSCustom we get around this.
normally tracked by TinyGPSPlus, but by using TinyGPSCustom we get around this.
The simple code also demonstrates how to use arrays of TinyGPSCustom objects,
each monitoring a different field of the $GPGSV sentence.
Expand All @@ -16,7 +16,7 @@
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 4800;

// The TinyGPS++ object
// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
Expand Down Expand Up @@ -70,7 +70,7 @@ void setup()

Serial.println(F("SatelliteTracker.ino"));
Serial.println(F("Monitoring satellite location and signal strength using TinyGPSCustom"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();

Expand Down
10 changes: 5 additions & 5 deletions examples/UsingCustomFields/UsingCustomFields.ino
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <TinyGPS++.h>
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>

/*
This sample demonstrates TinyGPS++'s capacity for extracting custom
fields from any NMEA sentence. TinyGPS++ has built-in facilities for
This sample demonstrates TinyGPSPlus's capacity for extracting custom
fields from any NMEA sentence. TinyGPSPlus has built-in facilities for
extracting latitude, longitude, altitude, etc., from the $GPGGA and
$GPRMC sentences. But with the TinyGPSCustom type, you can extract
other NMEA fields, even from non-standard NMEA sentences.
Expand All @@ -14,7 +14,7 @@
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 4800;

// The TinyGPS++ object
// The TinyGPSPlus object
TinyGPSPlus gps;

// The serial connection to the GPS device
Expand Down Expand Up @@ -45,7 +45,7 @@ void setup()

Serial.println(F("UsingCustomFields.ino"));
Serial.println(F("Demonstrating how to extract any NMEA field using TinyGPSCustom"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
}
Expand Down
2 changes: 1 addition & 1 deletion keywords.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#######################################
# Syntax Coloring Map for TinyGPS++
# Syntax Coloring Map for TinyGPSPlus
#######################################

#######################################
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TinyGPSPlus",
"version": "1.0.2",
"version": "1.0.3",
"keywords": "gps,NMEA",
"description": "A new, customizable Arduino NMEA parsing library",
"repository":
Expand Down
8 changes: 4 additions & 4 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=TinyGPS++
version=1.0.2
name=TinyGPSPlus
version=1.0.3
author=Mikal Hart
maintainer=Mikal Hart<[email protected]>
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.
sentence=TinyGPSPlus provides object-oriented parsing of GPS (NMEA) sentences
paragraph=NMEA is the standard format GPS devices use to report location, time, altitude, etc. TinyGPSPlus 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=*
26 changes: 26 additions & 0 deletions src/TinyGPSPlus.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
TinyGPSPlus - a small GPS library for Arduino providing universal NMEA parsing
Based on work by and "distanceBetween" and "courseTo" courtesy of Maarten Lamers.
Suggestion to add satellites, courseTo(), and cardinal() by Matt Monson.
Location precision improvements suggested by Wayne Holder.
Copyright (C) 2008-2013 Mikal Hart
All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef __TinyGPSPlus_h
#include "TinyGPS++.h"
#endif

0 comments on commit 81ba32c

Please sign in to comment.