Skip to content

Read gpsd repeatedly to avoid stale data

johnwa johnwa requested to merge johnwa/marble:work/johnwa/gps_bugfix into master

In the gpsd position provider plugin, one position report was read from gpsd every 1000ms. However, reports are available from the GPS at a higher frequency, and gpsd buffers these (to an unknown depth) and supplies then on a FIFO basis to the plugin. This means that the plugin will never keep up with the new fixes, and will constantly be reading stale data. This has the effect that, if the receiver is moved, it may be some minutes before this move is registered on the map.

Therefore, we need to read fixes until there are no more available instead, and throw away all of the fixes except the last one.

This bug appears to have been introduced in commit 090196ae 2022-04-05. The bug was noticed on a PinePhone v1.2b running Mobian trixie, gpsd 3.25, and a Quectel EG25-G GPS, but it will probably affect other configurations as well.

Merge request reports

Loading