don't show the position even if I have a valid fix

Bug #1917998 reported by diego roversi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FoxtrotGPS
Fix Committed
Undecided
Unassigned

Bug Description

foxtrotgps don't show the position even if I have a valid fix.

The problem is because foxtrotgps use the status field, but it seems to be "deprecated" in gpsd.
See https://gitlab.com/gpsd/gpsd/-/commit/c3b0fb6394964ca57cecfa0a65d6b3cde2dd1f6f

Gpsd developers recommends to use the fix.mode field instead.

I try this simple fix, and it works with my gps:

=== modified file 'src/gps_functions.c'
--- old/src/gps_functions.c 2021-01-09 00:39:19 +0000
+++ new/src/gps_functions.c 2021-03-06 10:45:48 +0000
@@ -763,7 +763,7 @@
                        gpsdata->fix.time = (time_t) 0;
                }
 #if GPSD_API_MAJOR_VERSION >= 10
- gpsdata->valid = (libgps_gpsdata.fix.status != STATUS_NO_FIX);
+ gpsdata->valid = (libgps_gpsdata.fix.status != STATUS_NO_FIX || libgps_gpsdata.fix.mode >= MODE_2D);
 #else
                gpsdata->valid = (libgps_gpsdata.status != STATUS_NO_FIX);
 #endif

I leaved the check on fix.status just in case it helps with previous version of gpsd.

Thanks,
  Diego.

Revision history for this message
Paul Wise (Debian) (pabs) wrote : Re: [Bug 1917998] [NEW] don't show the position even if I have a valid fix

On Sat, 2021-03-06 at 11:07 +0000, diego roversi wrote:

> foxtrotgps don't show the position even if I have a valid fix.

Thanks for the report and the patch.

I have merged your patch into the repository:

https://bazaar.launchpad.net/~foxtrotgps-team/foxtrotgps/trunk/revision/329

Unfortunately I don't have the ability to make releases, but I will
eventually update the Debian package, which will flow into Ubuntu.

 status fixcommitted

--
bye,
pabs

https://wiki.debian.org/PaulWise

Changed in foxtrotgps:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.