Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "QNmeaPositionInfoSource: cannot find NMEA sentence with valid date & time".
Forum Updated to NodeBB v4.3 + New Features

"QNmeaPositionInfoSource: cannot find NMEA sentence with valid date & time".

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 267 Views
  • 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.
  • R Offline
    R Offline
    Renjith R
    wrote on last edited by
    #1

    Hi,

    I am a newbie to Qt Positioning modules. I tried to parse NMEA messages using QNmeaPositionInfoSource in Qt.
    Here is the code

    QNmeaPositionInfoSource *nmeaSource = new QNmeaPositionInfoSource(QNmeaPositionInfoSource::SimulationMode);
    nmeaSource->setDevice(/*logFile*/);
    nmeaSource->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
    nmeaSource->startUpdates();
    

    And I got this error when running the application

    QNmeaPositionInfoSource: cannot find NMEA sentence with valid date & time
    

    What's wrong with the above code(ref:https://doc.qt.io/qt-5/qnmeapositioninfosource.html)?
    How to fix it?

    eyllanescE 6thC6 2 Replies Last reply
    0
    • R Renjith R

      Hi,

      I am a newbie to Qt Positioning modules. I tried to parse NMEA messages using QNmeaPositionInfoSource in Qt.
      Here is the code

      QNmeaPositionInfoSource *nmeaSource = new QNmeaPositionInfoSource(QNmeaPositionInfoSource::SimulationMode);
      nmeaSource->setDevice(/*logFile*/);
      nmeaSource->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
      nmeaSource->startUpdates();
      

      And I got this error when running the application

      QNmeaPositionInfoSource: cannot find NMEA sentence with valid date & time
      

      What's wrong with the above code(ref:https://doc.qt.io/qt-5/qnmeapositioninfosource.html)?
      How to fix it?

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by
      #2

      @Renjith-R show the logfile content.

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      1 Reply Last reply
      0
      • R Renjith R

        Hi,

        I am a newbie to Qt Positioning modules. I tried to parse NMEA messages using QNmeaPositionInfoSource in Qt.
        Here is the code

        QNmeaPositionInfoSource *nmeaSource = new QNmeaPositionInfoSource(QNmeaPositionInfoSource::SimulationMode);
        nmeaSource->setDevice(/*logFile*/);
        nmeaSource->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
        nmeaSource->startUpdates();
        

        And I got this error when running the application

        QNmeaPositionInfoSource: cannot find NMEA sentence with valid date & time
        

        What's wrong with the above code(ref:https://doc.qt.io/qt-5/qnmeapositioninfosource.html)?
        How to fix it?

        6thC6 Offline
        6thC6 Offline
        6thC
        wrote on last edited by 6thC
        #3

        @Renjith-R
        https://doc.qt.io/qt-5/qnmeapositioninfosource.html#setDevice

        The source device can only be set once and must be set before calling startUpdates() or requestUpdate().

        Note: The device must emit QIODevice::readyRead() for the source to be notified when data is available for reading. QNmeaPositionInfoSource does not assume the ownership of the device, and hence does not deallocate it upon destruction.

        /* logfile */

        You just yadda yadda'd the most important detail. Example project probably will help: https://doc.qt.io/qt-5/qtpositioning-logfilepositionsource-example.html

        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