Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. using socket for nmeaSource in PositionSource object

using socket for nmeaSource in PositionSource object

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 610 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.
  • T Offline
    T Offline
    twall
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0

      • Login

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