PDA

View Full Version : Parsing *.nmea file with QNmeaPositionInfoSource class returns timeout.



lazureus
7th June 2015, 17:42
I'm trying to write simple application which is going to simulate GPS hardware device basing on already taken *.nmea log file. Technology which I chose is Qt5.4.1. because it already got class which should take care of the task which I'm trying to do. Class name is QNmeaPositionInfoSource. I supposed that by setting proper update interval timeout instance of QNmeaPositionInfoSource will notify me about new position. However, when I set interval to the 1s I'm getting only one position and after that timeout is notified. When I set interval to the 0, I'm getting immediatelly all notifications about position.

Here is my code:
http://pastebin.com/SNJ9ddmD

Question is why I'm getting timeout notification?

ChrisW67
7th June 2015, 22:31
Is the one update you get the first position in the file?
Are the line endings in your data file the expected ones?
Does your error slot get called?
Does calling requestUpdate() return consecutive entries?

lazureus
7th June 2015, 23:10
Is the one update you get the first position in the file?

Yes, this is what is see as output of my program:

void MainWindow:: positionUpdated(const QGeoPositionInfo&)
"Lat: -27.5731"
"Lon: 153.091"
void MainWindow::updateTimeout()

After calculation of first GPGGA frame I see that returned result is from first GPGGA frame:
$GPGGA,222437.000,2734.33926,S,15305.44310,E,1,07, 1.3,50.6,M,39.2,M,,*72



Are the line endings in your data file the expected ones?

My dummy.nmea file is a strict file from the Qt Example called flickr, what I only did to it file is cutting it to the 50 lines and open it in vim. Which line endings does the file suppose to have ? Is it specified somewhere in specs ?


Does your error slot get called?

No, it's not.


Does calling requestUpdate() return consecutive entries?

After first call to the requestUpdate() I received single update, after that there is silence and no more update events come to me.