Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions firmware/TinyGPS++.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,21 @@ 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

Added Neo-M8N support by Andreas Spiess

*/

#include "TinyGPS++.h"
#include <math.h>

#include <string.h>
#include <ctype.h>
#include <stdlib.h>

#define _GPRMCterm "GPRMC"
#define _GPGGAterm "GPGGA"

// Converts degrees to radians.
#define radians(angleDegrees) ((angleDegrees) * M_PI / 180.0)

// Converts radians to degrees.
#define degrees(angleRadians) ((angleRadians) * 180.0 / M_PI)

#define TWO_PI 6.283185307179586476925286766559
#define sq(x) ((x)*(x))
#define _GNRMCterm "GNRMC"
#define _GNGGAterm "GNGGA"

TinyGPSPlus::TinyGPSPlus()
: parity(0)
Expand Down Expand Up @@ -217,9 +212,9 @@ bool TinyGPSPlus::endOfTermHandler()
// the first term determines the sentence type
if (curTermNumber == 0)
{
if (!strcmp(term, _GPRMCterm))
if (!(strcmp(term, _GPRMCterm) && strcmp(term, _GNRMCterm)))
curSentenceType = GPS_SENTENCE_GPRMC;
else if (!strcmp(term, _GPGGAterm))
else if (!(strcmp(term, _GPGGAterm) && strcmp(term, _GNGGAterm)))
curSentenceType = GPS_SENTENCE_GPGGA;
else
curSentenceType = GPS_SENTENCE_OTHER;
Expand Down
6 changes: 5 additions & 1 deletion firmware/TinyGPS++.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef __TinyGPSPlus_h
#define __TinyGPSPlus_h

#include "application.h"
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include <limits.h>

#define _GPS_VERSION "0.92" // software version of this library
Expand Down