I need to replay collected gps data by gpsd for testing. I know that I can feed gpsd by tcp, for example: gpsd -N tcp://127.0.0.1:6000
, but I can't find right format for feeding. What the format should I use?
Asked
Active
Viewed 389 times
3

Andrej Levkovitch
- 235
- 1
- 11
1 Answers
2
If you want to replay the GPS data for testing, you can use gpsfake
tool from the gpsd suite: https://gpsd.gitlab.io/gpsd/gpsfake.html
Regarding the log format that it can use
Logfiles for the use with gpsfake can be retrieved using gpspipe, gpscat, or cgps from the gpsd distribution, or any other application which is able to create a compatible output.
So I would record the log from a real GNSS receiver with
gpspipe -R > gps.log
and later use gpsfake to replay it during testing without GNSS receiver.
edit: The gpspipe -R
command will save a NMEA log if the receiver outputs NMEA messages. It can be later used for testing with gpsfake or other tool. Of course you can kill gpsd and just directly listen to the serial port to record the NMEA.

Filip Kubicz
- 459
- 1
- 5
- 17
-
Good idea, but not for my case. I used nmea messages for feading – Andrej Levkovitch Aug 08 '21 at 21:37
-
This is exactly what I meant in the answer. If your receiver outputs NMEA, the `gpspipe -R > gps.log` will give you a file with NMEA messages. – Filip Kubicz Aug 09 '21 at 08:42