Rather than checking the status field for the fix validity, we should be looking at the mode field. These fields are described here: https://gpsd.gitlab.io/gpsd/gpsd_json.html. Currently, the checks on the status field will work correctly with basic GPS receivers, but may not work with RTK, DGPS, or other receivers, and may report that we do not have a fix, even if the receivers are working correctly. This change will bring us closer to how GPSD is intended to be used, and will also help resolve issues with the status values changing between gpsd releases that we're continuously putting ifdef statements in for.
This will become especially important around gpsd v3.23 gets released, as the status fields have significantly changed, and the conditionally compiling around them will be quite ugly. It will also allow us to remove many of the ifdef statements that are littering the code and making it challenging to read and maintain.
Rather than checking the
statusfield for the fix validity, we should be looking at themodefield. These fields are described here: https://gpsd.gitlab.io/gpsd/gpsd_json.html. Currently, the checks on thestatusfield will work correctly with basic GPS receivers, but may not work with RTK, DGPS, or other receivers, and may report that we do not have a fix, even if the receivers are working correctly. This change will bring us closer to how GPSD is intended to be used, and will also help resolve issues with thestatusvalues changing between gpsd releases that we're continuously puttingifdefstatements in for.This will become especially important around gpsd v3.23 gets released, as the status fields have significantly changed, and the conditionally compiling around them will be quite ugly. It will also allow us to remove many of the
ifdefstatements that are littering the code and making it challenging to read and maintain.