sudo apt-get update
sudo apt-get install gpsd gpsd-clients
Generate fake NMEA data using this NMEA Generator.
Stop the running gpsd
daemon and start the gpsfake
instance (which runs a daemon itself):
sudo systemctl stop gpsd.socket
gpsfake -c 1 -P 2947 fake.nmea
gpspipe -w | sed -n 's/.*"time":"\([^"]\+\)".*"lat":\([^,]\+\),"lon":\([^,]\+\).*/\1,\2,\3/p'