using socket for nmeaSource in PositionSource object
-
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.
-
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.