clazzes.org's python3 gpsclient is a python library to connect to GPSD and is packaged with a versatile command line client and GPSD simulator daemon.
gpsclient Command Line Tool
Use the debian package
python3-clazzes-gpsclient in order to run the following examples.
Connect to GPSD
The following command show basic usage of gpsclient to connect to a running
Connect to GPSD and write a gpstrack file
The following examples use gpsclient to log JSON records to a gzipped gpstrack file.
Replay a gpstrack file
The following examples replay a previously recorded gpstrack instead of conenctiong to GPSD/gpstrack-runner. There are two options to modify timestamps:
fake_timestamp=truein oder to emit the records with the current timestamp
start_timestamp=2014-04-19T22:34:57Zin order to map the first TPV timestamp to the given timestamp and output all subsequent records offset by the so calculated time difference between the recording timestamp and the given first timestamp.
interval=1 is used to emit records in a given time intervals given in seconds or fraction of a second like
Getting information on a track
A summary on the contents of a gpstrack file may be retrieved by calling
Converting NMEA logfiles
NMEA logfiles created by gpsmon -l may be converted by the schell script gpslog2gpstrack
The gpstrack-runner Daemon is contained in the debian package
gpstrack-runner and may be started by
By default, the daemon listens on port 2948 (intentionally one port beside the original gpsd Server).
The daemon replays all gpstrack files contained in the directory
/var/spool/gpstrack-runner/ by faking timestamps and emitting one record per second.
For each newly connected client, the daemon replay all the logfiles from the beginning, the set of gpstrack files is scanned anew for each new client connection.
The behavior might be customized by editing the config file