SatelliteSource missing data
-
Hi,
I have been creating a utility to view GPS information on linux mobile phones (postmarketOS + Plasma Mobile), and it seems like the qml SatelliteSource does not read all data.
I use a nmea source, piping /var/rungnss-share.sock into a TCP socket using socat (since qt does not support reading of the unix socket, right?). I get data in SatelliteSource.satellitesInUse but not in SatelliteSource.satellitesInView, and data in satelliteInUse lacks the azimuth and elevation properties. I also do not get accuracy data in PositionSource.position.
My data should be fine as fra as I can see, and a similar app - Sattelites, written in python with a gtk interface, have no problems, they read from the unix gnss-share socket - but The data in that is all piped to the TCP socket I use.
Sample NMEA data from the TCP socket:
$GPGSA,A,2,01,03,04,06,09,17,19,31,,,,,1.1,0.8,0.8*36 $GNGSA,A,2,10,29,,,,,,,,,,,1.1,0.8,0.8,3*38 $GNGNS,074042.00,5504.941805,N,01022.841792,E,AAA,16,0.8,34.6,44.0,,*27 $GPRMC,074042.00,A,5504.941805,N,01022.841792,E,0.0,1.7,220926,0.1,W,A*2D $GPGSV,3,1,10,01,11,149,27,03,52,094,36,04,75,165,30,06,47,296,20*73 $GPGSV,3,2,10,09,44,217,33,17,16,227,27,19,28,258,26,31,28,053,23*71 $GPGSV,3,3,10,11,14,312,,28,11,029,*7C $GAGSV,1,1,04,10,45,300,37,19,55,191,31,28,28,208,26,29,59,075,30*60 $GAGGA,074042.00,5504.941805,N,01022.841792,E,1,02,0.8,34.6,M,44.0,M,,*46 $GAVTG,1.7,T,1.8,M,0.0,N,0.0,K,A*3D $GAGSA,A,2,10,29,,,,,,,,,,,1.1,0.8,0.8,3*37 $PSTIS,*61 $GARMC,074042.00,A,5504.941805,N,01022.841792,E,0.0,1.7,220926,0.1,W,A*3C $PQGSA,A,2,,,,,,,,,,,,,1.1,0.8,0.8,5*3C $GPVTG,1.7,T,1.8,M,0.0,N,0.0,K,A*2C $GPGGA,074042.00,5504.941805,N,01022.841792,E,1,08,0.8,34.6,M,44.0,M,,*5D $GLGSV,2,1,07,78,20,066,24,70,39,246,28,69,80,004,18,84,53,198,29*66 $GLGSV,2,2,07,85,58,293,31,68,30,053,20,77,15,008,*5DPS: I also think it would be nice to have the GPS fix status (2D/3D) in the Position object. Qt version 6.11.1
-
Hi and welcome to devnet,
Do you have a minimal compilable sample code that people can use to check what might be going on ?
To discuss things such as the GPS fix status, you should open a feature request on the bug tracking system
-
Thank you for answering. I will add a wish to get the fix status in.
Code samples:
The SatteliteSource definition:
SatelliteSource { id: sats name: "nmea" // PluginParameter { name: "nmea.source"; value: "socket://localhost:3434" } PluginParameter { name: "nmea.source"; value: "file:///home/user/tmpfile" } updateInterval: 1000 active: true }(the file source is created using socat, but can be done in user space. Command:
socat -u UNIX-CONNECT:/var/run/gnss-share.sock OPEN:tmpfile,trunc,append=0Display the sattelite in use/in view counts:
QQC2.Label { text: "Satellites in use:" } QQC2.Label { text: sats.valid ? sats.satellitesInUse.length : "N/A" } QQC2.Label { text: "Satellites in view:" } QQC2.Label { text: sats.valid ? sats.satellitesInView.length : "N/A" }The in view count is always 0
Display the sattelites in use - this works:Component { id: barChart ListView { id: satList Layout.fillWidth: true Layout.fillHeight: true Layout.preferredWidth: myPage.width Layout.columnSpan: 2 width: root.width height: root.height - y - Kirigami.Units.mediumSpacing model: sats.satellitesInUse delegate: SattItem {} } }A similar list for sattelitesInView is always empty - logically, as it's length is 0.
-
For the fix status: https://qt-project.atlassian.net/browse/QTBUG-150738
-
I filed this issue too: https://qt-project.atlassian.net/browse/QTBUG-150742 - a suggestion to add support for unix sockets in the SatelliteSource object, which would mean no need to pipe gnss-share output.
I would really like for someone to confirm if the sattlitesInView list is empty - I have not been able to fix that, and I consider filing an issue for that as well.