[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-users] GPSD read issue
From: |
Jim Davis |
Subject: |
[gpsd-users] GPSD read issue |
Date: |
Wed, 7 Sep 2016 16:06:30 +0000 |
Hello,
I've written an application that uses gps_open, and gps_stream, but the output
from gps_read returns a negative number for
gpsdata.fix.time
if (gps_open("localhost", "2947", gpsdata) < 0)
...
//register for updates
gps_stream(gpsdata, WATCH_ENABLE | WATCH_JSON, NULL );
and later
gps_read(gpsdata);
printf("GPS:%10.0f (%9.6lf, %9.6lf) v:%6.3f #%d [%d]",
gpsdata.fix.time, gpsdata.fix.latitude,
gpsdata.fix.longitude,
gpsdata.fix.speed, gpsdata.satellites_visible,
gpsdata.fix.mode);
GPS:-476482636 (35.257066, -120.667353) v: 0.566 #4 [3]
GPS:-476482635 (35.257063, -120.667360) v: 0.241 #4 [3]
I took a look at raw output via telnet with these commands:
telnet localhost 2947
?WATCH={"enable":true,"json":true}
And see the json text shows the year as 1954... which explains the negative
time parsed by gps_read()
{"class":"VERSION","release":"3.11~dev","rev":"2016-08-17T13:34:09.74","proto_major":3,"proto_minor":9}
{"class":"TPV","tag":"GLL","device":"/dev/ttymxc1","mode":3,"time":"1954-11-30T01:48:05.000Z","ept":0.005,
"lat":35.257306500,"lon":-120.667479167,"alt":50.200,
"epx":39.540,"epy":91.586,"epv":37.030,"track":0.0000,"speed":0.412,"climb":0.000,"eps":183.17}
Looks at this point like broken gps except that the output from gpspipe looks
correct:
$GNRMC,175026.00,A,3515.44597,N,12040.04234,W,0.141,,020916,,,A*7C
$GNRMC,175027.00,A,3515.44593,N,12040.04239,W,0.164,,020916,,,A*73
$GNRMC,175028.00,A,3515.44578,N,12040.04248,W,0.107,,020916,,,A*7A
Any ideas here?
Thanks,
Jim Davis
Senior Software Architect
Quake Global, Inc.
San Luis Obispo, CA 93401
Office (858) 277-7290 ext. 241
This email may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this email in error), please
notify the sender immediately and destroy this email. Any unauthorized
copying, disclosure or distribution of the material in this email is strictly
forbidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gpsd-users] GPSD read issue,
Jim Davis <=