u-blox driver alternately gives gives "n/a" or a valid value for altHAE and altMSL in NMEA mode
See this recording of cgps with a u-blox M8N receiver in NMEA mode. Watch the "Alt (HAE, MSL)" values: they alternate between a numeric value and n/a
. I have seen this frequently with this receiver, including with previous versions of gpsd, but also with the git master version.
Steps followed:
- Removed system gpsd
- git clone'd latest gpsd; built with scons.
{"class":"VERSION","release":"3.20.1~dev","rev":"release-3.20-278-g89cbbaf83","proto_major":3,"proto_minor":14}
- Started gpsd:
./gpsd -N -D 3 /dev/ttyUSB0
- Plugged in USB TTL device that is connected to the u-blox M8N receiver
- In a separate console, ran
./cgps
to cause gpsd to connect to receiver, and so gpsd could be observed from client's point of view - In another console:
-
telnet localhost 2947
. Initial response of?DEVICE;
command:{"class":"DEVICE","path":"/dev/ttyUSB0","driver":"u-blox","subtype":"SW EXT CORE 3.01 (107900),HW 00080000","subtype1":",ROM BASE 3.01 (107888),FWVER=SPG 3.01,PROTVER=18.00,MOD=NEO-M8N-0,FIS=0xEF4015 (100111),GPS;GLO;GAL;BDS,SBAS;IMES;QZSS","activated":"2020-03-03T01:51:18.339Z","flags":1,"native":1,"bps":9600,"parity":"N","stopbits":1,"cycle":1.00,"mincycle":0.25}
- Then sent
?DEVICE={"native":0}
, then?DEVICE={"native":1}
, then?DEVICE={"native":0}
again. Had to set"native":0
twice to get then/a
behavior to show up.
-
- In another console:
gpspipe -R -n 100 > /tmp/nmea-1.log
(yielding nmea-1.log) after then/a
values started showing up after the last"native":0
. - Also captured the log from
./gpsd -N -D 3 /dev/ttyUSB0 > gpsd-1.log
(yielding gpsd-1.log) while values were alternating back and forth ton/a
. - Then back in the telnet console, set
"native":1
again. Immediately then/a
values were gone, and the altHAE and altMSL values started updating to valid numerical values every second again. - Ran
gpspipe -R -n 100 > /tmp/binar-1.log
(yielding binary-1.log) after the last"native":1
was issued.
Edited by Luke Hutchison