Package: gpsd
Version: 2.92-1
Severity: normal
man gpsd claims that
"A TPV object is a time-position-velocity report. The "class" and
"mode" fields will reliably be present."
but I keep hitting TPV objects that do not include mode field at all.
I can reliably reproduce this by running
echo
'?WATCH={"class":"WATCH","enable":true,"json":false,"nmea":true,"raw":0,"scaled":false,"timing":false}'
| nc 0 gpsd
in one terminal and then running
#!/usr/bin/python
import gps
import sys
session = gps.gps()
session.stream(gps.WATCH_ENABLE | gps.WATCH_NEWSTYLE)
for report in session:
if report["class"] == "TPV":
if True:
keys = report.keys()
if "mode" not in keys:
print("bug, TPV report does not include mode!")
sys.exit(2)
if report["mode"] == 2 or report["mode"] == 3:
print("%s %s" % (report["lat"], report["lon"]))
sys.exit(0)
else:
sys.exit(1)
multiple times in a different terminal:
$ for i in 1 2 3 4 5; do gpsd-get-position ; done
60.16XXXXXXX 24.9XXXXXXXX
bug, TPV report does not include mode!
bug, TPV report does not include mode!
bug, TPV report does not include mode!
bug, TPV report does not include mode!
tcpdump shows
{"class":"TPV","tag":"GLL","device":"/dev/ttySAC1","time":1268500224.000,"ept":0.005,"lat":60.161XXXXXX,"lon":24.93XXXXXXX}
so this should bug should not be limited to the python bindings.
(The above python program "gpsd-get-position" works only if I also apply
"http://git.recluse.de/?p=debian/pkg-gpsd.git;a=blob_plain;f=debian/patches/0002-Non-streaming-operation-of-the-Python-exerciser-does.patch;h=06ef791d3a025d16ccb83c3357e712d6237520fa;hb=3723afb4b84a8d06c5ec424b687b47c85e7fa520"
to gps.py)
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: armel (armv4tl)
Kernel: Linux 2.6.29-GTA02_lindi2-andy-tracking-mokodev
Locale: LANG=C, LC_CTYPE=fi_FI (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Versions of packages gpsd depends on:
ii debconf [debconf-2.0] 1.5.28 Debian configuration management sy
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libdbus-1-3 1.2.20-2 simple interprocess messaging syst
ii libgps19 2.92-1 Global Positioning System - librar
ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip
ii netbase 4.40 Basic TCP/IP networking system
ii python 2.5.4-9 An interactive high-level object-o
Versions of packages gpsd recommends:
ii udev 151-2 /dev/ and hotplug management daemo
Versions of packages gpsd suggests:
ii dbus 1.2.20-2 simple interprocess messaging syst
ii gpsd-clients 2.92-1 Global Positioning System - client
-- debconf information:
gpsd/start_daemon: false
gpsd/socket: /var/run/gpsd.sock
gpsd/device:
gpsd/daemon_options:
gpsd/brokenconfig:
gpsd/autodetection: false
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]