Discussion:
QT program with Libgpsmm delivers wrong NMEA data
Ulrich Betzenbichler
2014-07-10 14:32:06 UTC
Permalink
Hello,

I try to use gpsd 3.9 on a SOC platform with Linux 3.10.16 and QT 5.0
We have the GPS device on board. The program supplies the gps-data (NMEA) as a stream on the file system (/data/gps/agiin).
The gpsd daemon is started with following parameter

Gpsd -b -n -P /var/run/gpsd.pid /data/gps/agiin

Gpsd itself works. I have tested it with gpsmon.

I have created a program that uses libgpsmm to connect to gpsd.
I try to read the NMEA data.

I use the attached procedures (see GNSSViewr.cpp)
(This is not a runnable program. It's only the parts to read the data in a loop.)

.
The problem is, that it reads always the same data and much more data that are exported every seconds.
This file show the read data.


Each time when a line shows a 'time : number' (e.g. 01:06:34 : 9) a new loop is started. The number at the end shows the number of readed lines.

If you look e.g. at the 'GPGGA' sentences, you can see that the same data are shown repeated.
The actual data are missing.

I think there is some kind of buffer that is never been deleted and if the buffer is full, no new data are added.
Is there a possibility to delete this buffer after reading?

Best regards

Uli Betzenbichler








Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
Loading...