I am using TinyGPS++ and just found out about NeoGPS, but none of the Examples will compile.
LOL, I go offline for a week, and someone finally asks a question about NeoGPS... 
TL;DR - Comment out PARSE_MFR_ID
in NMEAGPS_cfg.h
:
//#define PARSE_MFR_ID
And for a non-Mega boards, like the Uno, get the latest NMEA.ino. Other examples to follow.
TL
the errors seem to be fundamental omissions. That does not give confidence for the rest of the library... NONE of Examples compile as installed. That's how all the other libraries I have installed in the Arduino IDE have performed, this should be no different.
Yes, this was definitely my fault, and your skepticism is completely understandable. It is very possible that I checked in a non-default configuration file after testing a different configuration. There are thousands of possible configurations, and I have only tested a covering set of dozens.
Ah, yes... after a quick look, it appears that PARSE_MFR_ID
in NMEAGPS_cfg.h
should have been commented out for the default configuration. A thousand apologies! (One for each configuration.
) I'm sorry you were thwarted by this mistake.
It should work with an Uno out of the box. How do I tell the code I'm using an Uno instead of a Mega?
The only change should be using a SoftwareSerial
instance instead of Serial1
. I have struggled with what configuration and platform should be "the default". I think I should be able to support both the Mega and Uno platforms in the examples with conditional code, like other libraries. That's a good suggestion.
Where am I supposed to define NMEAGPS_DERIVED_TYPES? Where is this described in the documentation? Why isn't it defined for the basic examples?
Well, I thought this was clear, but I obviously missed. Hmmm... NeoGPS is different because I expect the user to modify these configuration files: NeoGPS_cfg.h
, GPSfix_cfg.h
, and NMEAGPS_cfg.h
. Typically, users treat the libraries as sacred read-only files.
Unfortunately, there is no other C++ technique that allows class/struct members to be eliminated from RAM. Compile and link optimizations can eliminate some, but not all, parsing code from FLASH, a situation similar the sprintf
bloat problem. Up to IDE 1.6.x, library management did not support configuration files in the (local) INO directory instead of the library directory, but maybe that has changed.
Perhaps a step-by-step guide would help, especially to show that it's ok to edit the sacred files. Maybe an HTML configuration page? After I get a few things out of the way from being absent, I'll update the examples and docs, and post an update in the NeoGPS thread.
I have just written my own small section of code to read the GPS Sentence stream and decode just the two sentences I need. Currently at 59 lines of code, it gives me everything I want for my project and NO GPS libraries needed. Saved me 228 Bytes of memory.
Would you mind sharing?
Many users have successfully used other libraries for basic GPS processing. NeoGPS is for those users who are stepping past the typical usage and may need to squeeze more performance out of an Arduino, or save a few hundred bytes of RAM.
Many users are also quickly frustrated by other libraries when they get to that point. Although I have focused on supporting advanced users, better docs and examples may allow a wider audience to take advantage of its features and avoid frustration with other libraries.This topic comes up quite frequently. Umm, compiling without errors would also help... :-[
Thanks, everyone, for the comments and suggestions!
/dev