Wed 10 Dec 2014 06:38:12 AM UTC, original submission:
I have source of PTNTHTM data. Roll and pitch always worked ok.
But now I need dip and mag_x, and I get zeros or nan instead of sensors values.
I have this problem with all versions of gpsd that I tried: 3.6, 3.9 and 3.11.
How to reproduce a problem:
1) Download a new version of gpsd: gpsd-3.11.tar.gz, unpack it
2) Patch cgps.c to see roll and dip (my patch is in attachment)
3) Build gpsd with scons prefix=/home/USER/gpsd-3.11/PREFIX
4) scons install
5) sudo ./PREFIX/sbin/gpsd -D2 -N -F /var/run/gpsd.sock udp://127.0.0.1:4321
7) Give gpsd some PTNTHTM data:
while read p; do echo Sending $p ; echo $p | nc -u -w1 127.0.0.1 4321 ; done < ./test/daemon/tnt-revolution.log
6) Now, the most interesting. gpspipe shows right mag_x and dip values:
./gpspipe -w
{"class":"ATT","tag":"PTNTHTM","device":"udp://127.0.0.1:4321","heading":14091.00,
"mag_st":"N","pitch":171.00,"pitch_st":"N","roll":-43.00,"roll_st":"N","dip":13599.000,"mag_x":2454.000}
7) But cgps does not show dip (roll is ok):
./cgps
│ Roll: -39.000000 ││ │
│ Dip: 0.000000 ││ │
And my program (I use libgps) does not show dip and mag_x, but shows roll and pitch.
Looks like a problem with json parser on client side?
|