meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.53k stars 879 forks source link

NMEA GPS - bogus heading (course) data from TinyGPS++ #863

Closed a-f-G-U-C closed 2 years ago

a-f-G-U-C commented 3 years ago

Hardware TBEAM T22_V1.1 with UBLOX M8N in forced NMEA mode - but the issue doesn't appear to be specific to this device

On rare occasions, the value returned by TinyGPS++ call reader.course.value() is obviously bogus (>360 deg) and does not match any of the GNRMC lines logged from GPS, but: the actual digits in the bogus number sometimes (visually) match those in the longitude value (!!)

I suspect this is a TinyGPS++ parsing bug. Posting here to hopefully assist others and collect more information.

The issue occurs irrespective of TinyGPS Custom Fields being enabled or disabled.

a-f-G-U-C commented 3 years ago

Update: I have traced the problem to an improper variable initialization bug in TinyGPS++ Since Meshtastic uses its own fork of TinyGPS++, I will raise a PR against our fork first. It's only 3 lines of code :)

a-f-G-U-C commented 3 years ago

Leaving this issue open for the time being, just because of the related TinyGPS PR https://github.com/meshtastic/TinyGPSPlus/pull/1 which is still open.

From a user perspective, the problem as originally reported has been fixed.

sachaw commented 2 years ago

@a-f-G-U-C Sorry, only just saw this was still open, have merged it, please commit the updated dependency and I can merge it, then close this. Thanks!

a-f-G-U-C commented 2 years ago

No problem @sachaw , and thanks for your help. I think the issue is now completely fixed, with no further action necessary.