Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved using socket for nmeaSource in PositionSource object

    QML and Qt Quick
    2
    2
    459
    Loading More Posts
    • 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.
    • T
      twall last edited by

      Hello, I'm working on an app and the goal is to be location-aware. I understand that I can use a TCP socket for PositionSource.nmeaSource in QML, but I'd like to know a little more about it. I have a Python script that opens a TCP server socket on localhost, takes the serial output from my device, then sends the NMEA string to a connected client. It sends every half-second.

      I've noticed that the PositionSource object checks the TCP server immediately on launch, but the program crashes shortly after. I'd like to know a little more about the nmeaSource property. It is configured as a TCP client, yes?

      When onUpdate triggers, does the PositionSource create a new client socket on every update, or does it continue to use the same socket? I have also noticed that my program will crash if it checks the socket and does not receive any new NMEA data. That doesn't seem like normal behaviour, especially with how finicky GPS systems can be.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        You should take a look at the QtLocation sources. That will likely be faster to find about the inner workings that you are looking for.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post