hkicko/CubeCell-GPS-Helium-Mapper

speed not updated on display

aelyacho opened this issue · 5 comments

I've used my cubecell for a few hours today with Non-stop mode on, the device works as expected overall but the speed on screen never changed (always 0 km/h). Is it a known bug or am I the only one having this issue? TIA.

Cubecell v1.1 with stock antenna powered by usb

I think I know what is happening but can't explain why or how to prevent it. If you enable GPS debug mode you will see that we are getting both NMEA_RMC and NMEA_GGA messages from the GPS while there is no fix, and once it gets a fix it only sends the NMEA_GGA message. That message does not have the date and speed. I've observed this only while stationary, so I did not pay much attention to the speed, but I noticed this issue happening with the date. Sometimes I guess we get the NMEA_GGA messages before we get one good NMEA_RMC with a date in it and when that happens the date on the screen is empty. My guess was that it only sends the NMEA_RMC when the speed changes, and because it hasn't changed, I don't see this message.
In your case I am curious if it will fix itself if you reboot.
Let me know if it happens all time or too often and I will think of ways to debug. It hasn't happened for me - I've seen the date empty but not the speed.

I just saw the startGPS() function yesterday, that's what I thought. I have experienced it multiple times now, I still never saw the speed changing. The weird thing though, is that sometimes the date didn't update either but most of the time it did. Afaik, if the date is updated, the speed should too since both are coming from RMC. Also, the time that is displayed is always 1h behind my current time, but I don't think that's related to your code.
Anyway I just wanted to inform you, these are juste additional infos the mapper does his job. Thanks for your time !

Quick update, the speed did get updated this time but the values are unaccurate (stays at 10km/h, sometimes 20 no matter what speed I'm driving). I believe that's related to the gps information itself and not your code.

Could you try removing this line that limits the number of different messages we get - GPS.setNMEA(NMEA_RMC | NMEA_GGA) and see if that helps?

The values are now a bit more accurate, I just think there is some delay between the time it receives the speed and the update on the display. Thanks for your help!