Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to get NMEA sentences out of GPS device?
Forum Updated to NodeBB v4.3 + New Features

How to get NMEA sentences out of GPS device?

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joergpauly
    wrote on last edited by
    #1

    Hi, all,

    how can I get the raw NMEA data out of a GPS device?
    QGeoPositionInfo doesn't provide it...

    Regards
    Joerg

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      You could subclass "QNmeaPositionInfoSource":http://doc.qt.io/qt-5/qnmeapositioninfosource.html and reimplement parsePosInfoFromNmeaData() to capture the raw NMEA sentence:

      @
      bool MySource::parsePosInfoFromNmeaData(const char * data, int size, QGeoPositionInfo * posInfo, bool * hasFix) override
      {
      // Store the raw sentence for later retrieval
      this->sentence += QString(data, size);

      // Call the base implementation to process the sentence
      return QNmeaPositionInfoSource::parsePosInfoFromNmeaData(data, size, posInfo, hasFix);
      

      }
      @

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • J Offline
        J Offline
        joergpauly
        wrote on last edited by
        #3

        Hello,

        that sounds very interesting.

        But as QNmeaPositionInfoSource requires a QIODevice now the goal was to find out what device file is emitting the GPS' data...

        Sorry, I'm absolutely rookie to android development.

        Regards
        Joerg

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hmm... reading through the documentation again, I might have misunderstood how QNmeaPositionInfoSource works.

          I have to admit I don't have experience with the Qt Positiioning classes; try asking at the "Interest mailing list":http://lists.qt-project.org/mailman/listinfo/interest where you can find Qt engineers (you'll need to subscribe first)

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved