Results 1 to 3 of 3

Thread: Parsing *.nmea file with QNmeaPositionInfoSource class returns timeout.

  1. #1
    Join Date
    Jun 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Parsing *.nmea file with QNmeaPositionInfoSource class returns timeout.

    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?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Parsing *.nmea file with QNmeaPositionInfoSource class returns timeout.

    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?
    Last edited by ChrisW67; 7th June 2015 at 21:35. Reason: updated contents

  3. #3
    Join Date
    Jun 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Parsing *.nmea file with QNmeaPositionInfoSource class returns timeout.

    Quote Originally Posted by ChrisW67 View Post
    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


    Quote Originally Posted by ChrisW67 View Post
    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 ?

    Quote Originally Posted by ChrisW67 View Post
    Does your error slot get called?
    No, it's not.

    Quote Originally Posted by ChrisW67 View Post
    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.

Similar Threads

  1. Parsing a Qt ts file....
    By PaladinKnight in forum Qt Programming
    Replies: 0
    Last Post: 20th May 2012, 23:01
  2. Replies: 2
    Last Post: 9th September 2009, 00:26
  3. Parsing xml file
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 2
    Last Post: 10th June 2009, 05:05
  4. html parsing class problem
    By yagabey in forum Qt Programming
    Replies: 4
    Last Post: 22nd December 2008, 18:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.