Brent Wood via Qgis-user <qgis-user@lists.osgeo.org> writes: > I have a log file of GPS NMEA messages captured during a survey. > > I'm working with QGIS for real time data capture during these surveys. > > For demo/training/dev purposes I'd like to pass the file of GPS messages into > QGIS via teh GPS panel to simulate the real world survey. > > Any suggestions as to how I can do this (running on Linux at present)?? > > I've tried gpsfake with gpsd but just run into network/port errors I > can't resolve. I can uset netcat -l to listen then send the NMEA > messages via netcat using a bash script, but can't see how to get > netcat to work with QGIS as a listener.
[I am a minor gpsd maintainer.] I would try to understand the various mechanisms qgis has for dealing with live data, and then write python code to meet one of those interfaces. I found this which may or may not be helpful: https://gis.stackexchange.com/questions/368388/nmea-data-feed-into-qgis The documentation says that live tracking can use a device or gpsd: https://docs.qgis.org/3.22/en/docs/user_manual/working_with_gps/live_GPS_tracking.html It is possible you can create a named fifo, read from that in qgis and then send to it. Or to use a pseudoterminal. But, I suspect it is easiest to use gpsd, and to figure out how to make gpsfake work. There is a "once" and a delay option. I think what you really want is an option to send the NMEA sentences based on their timestamps with an offset so you get real-time playback. However you can probably grep for GGA and then you'll have a regular stream of sentences at 1 Hz. gpsd also supports udp sources. You could send nmea in udp to it via python or maybe even netcat, and avoid gpsfake. You didn't describe your errors but debugging gpsfake is off topic for this list anyway. Brief observations: - gpsd wants to listen on 2947, so running two of them without choosing alternate ports does not go well, and you want the gpsfake gpsd on 2947 so that qgis connects to it - the gpsd project only provides help for the most recent release, or the tip of git. The project does not help with systemd configuration, so if you are running gpsd via systemd or any other OS-provided glue, you should entirely deconfigure it and reproduce your problem with just the command line before asking for help. (I realize this probably seems unfriendly to LTS users, but the other side of the coin is that LTS is unfriendly to maintainers, with LTS distributions having customers, sometimes even paid, and then asking others to provide free support for no-longer-maintained versions.) Greg
signature.asc
Description: PGP signature
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user