jpilet / anemomind

Anemomind: a sailing data recording, visualization and analysis solution.
http://www.anemomind.com/
MIT License
14 stars 2 forks source link

NMEA parser do not handle empty RMC sentences #1011

Open jpilet opened 7 years ago

jpilet commented 7 years ago

Sentences such as

$GNRMC,,V,,,,,,,,,,N*4D
$GNRMC,193355.00,V,,,,,,,020615,,,N*6B

produce wrong data (time and GPS pos):

2015-06-02T19:34:00.159: pos[:0]: (-16, 0)

To search for raw internal GPS nmea in Irene logs, just do:

 for i in *log ; do logcat $i -b | grep -q "Internal GPS NMEA" && echo $i ; done

This is related to #1007, because we must handle old log files that contain the bug properly. The downSampleGps1Hz function used to filter those bad coordinate out, but its not called anymore.

jonasseglare commented 7 years ago

I think the parsing functions should produce optionals, so that we can deal with partial NMEA sentences. Having a callback-based system, where a method is called whenever a sentence is parsed would also be good.