gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-users] "online" reporting


From: Paul Fox
Subject: [gpsd-users] "online" reporting
Date: Mon, 15 Jun 2015 12:44:01 -0400

hi --

i'm trying to use libgps in place of the NMEA access to gpsd that my
code has used for a long time.  i'm running gpsd 3.9, on ubuntu 14.04.

i'm having trouble getting device availability.

i expected (and maybe this is where i went wrong, right off the bat)
that the gpsdata.online field, and the corresponding ONLINE_SET bit,
would reflect whether at least one GPS sensor is being watched, and is
active.  but the "online" field and the set bit never change,
regardless of whether i plug/unplug the GPS device.  not only don't
they change, but the field has a value of '0', indicating permanently
offline, even when the rest of the fields and bits are updating.

i understand that it wouldn't make sense to send continuous "offline"
updates when the device has gone missing.  but i'd expect "online" to
be true most of the time, with at least one final "online = 0" update
when the device goes away.  without that facility, my code needs to
rely on timeouts, and i was hoping to do away with those.  i do
see these wire message when unpluggin/replugging, so i hope i can get that
info through the library:
    {"class":"DEVICE","path":"/dev/ttyUSB1","activated":0}
    {"class":"DEVICE","path":"/dev/ttyUSB1","activated":1434386556.706474}


perhaps "online" isn't really meant to be useful to libgps clients? 
skimming the gpsd sources, it does seem that some of the fields in
gps_data might not really be meant for "external" consumption: 
DEVICEID_SET, for example, looks to be used for communication with the
drivers, not the clients.

is there a table somewhere showing which of the fields in the
gps_data_t structure are really given to the client, as well as which
xxx_SET bits cover which fields?

paul
=----------------------
 paul fox, address@hidden (arlington, ma, where it's 51.8 degrees)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]