mikalhart / TinyGPSPlus

A new, customizable Arduino NMEA parsing library
http://arduiniana.org
1.05k stars 486 forks source link

Initialize all members + sanity check on received data #77

Open TD-er opened 3 years ago

TD-er commented 3 years ago

Perform a sanity check on the received data for time/date and position.

Also added a separate commit of parsing the fix quality and fix mode flags, which I had implemented a while ago.

TD-er commented 3 years ago

Just a small status update from tests running here with this code. There used to be some fluke measurements which had a position offset of several km upto 100 km, every now and then. Now the max. offset I see from the stationary position the node is at is +/- 250 m. That's to be expected, especially considering the receiver is indoors on my desk. Those extremes are only a handful of updates, from a run of 2 weeks.

cyberman54 commented 1 year ago

@mikalhart ping - can we merge this?

mikalhart commented 7 months ago

There is some thoughtful and arguably helpful content here, but I think I am going to decline to merge, because I want TinyGPS++ to focus on parsing rather than interpreting. I don't want TinyGPS to conceal the fact, e.g, that the Quectel L80 misreports the date as 1/1/80 for a few seconds at cold start. That's something that should not be hidden from a system designer, I think.

TD-er commented 7 months ago

Would you perhaps consider having a boolean flag (or #ifdef compiler flags) to allow for some sanity checks? This way the user may decide whether or not processing invalid data is desired.