I have an NMEA test data file that contains a few gps points:
$GPGGA,170358.132,5230.704,N,01324.262,E,1,12,1.0,0.0,M,0.0,M,,*63
$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30
$GPRMC,170358.132,A,5230.704,N,01324.262,E,4152.6,050.1,150822,000.0,W*4B
$GPGGA,170359.132,5231.634,N,01325.380,E,1,12,1.0,0.0,M,0.0,M,,*6D
$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30
$GPRMC,170359.132,A,5231.634,N,01325.380,E,2369.6,047.3,150822,000.0,W*4D
$GPGGA,170400.132,5232.183,N,01325.977,E,1,12,1.0,0.0,M,0.0,M,,*6C
$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30
$GPRMC,170400.132,A,5232.183,N,01325.977,E,1313.3,288.5,150822,000.0,W*40
I am trying to feed these to gpsfake to test it with a gpsd demo script I have. I have tried running gpsfake alone, piping it with gpsd, and gpsd alone, but no luck. Mind you, this is the first time I use gpsd.
I have tried running gpsd using my script and a physical GPS dongle, it runs perfectly fine and I get the following output per my code:
~$ /usr/sbin/gpsd -n -G -b /dev/ttyUSB0 &
[1] 4514
~$ ./demo
WARNING: Opening interface localhost:gpsd
WARNING: Entering GPS poll loop (2000000us)
Speed: 0.017
Speed: 0.018
Speed: 0.018
Speed: 0.021
speed: 0.046976
{
"timestamp": 1660331437857,
"latitude": 33.6973963,
"longitude": -117.7707148,
"eph": 4.563,
"speed": 0.047,
"eps": 0.460,
"track": 0.000,
"satellites_used": 8,
"hdop": 0.000000,
"vdop": 0.000000
}
Speed: 0.021
[1]+ Done /usr/sbin/gpsd -n -G -b /dev/ttyUSB0
Can someone please tell me how I can feed the fake data to gpsfake instead of using the GPS dongle? Thanks!