gpxlogger1
Tool to connect to gpsd and generate a gpx file
Usage
gpxlogger [OPTIONS]
[server
[:port
[:device]]]
gpxlogger -h
gpxlogger -V
Overview
gpslogger program collects fixes from gpsd and logs them to standard output in GPX format, an XML profile for track logging. It does not need to run as root, but can run as root.
The output may be composed of multiple tracks. A new track is created if there’s no fix written for an interval specified by the -i or --interval option and defaulting to 5 seconds.
gpxlogger can use any of the export methods that gpsd supports. For a list of these methods, use the -l or --exports option. To force a method, give the -e, --export option folloed by one of the colon-terminated method names from the -l, --exports table.
Options
-
-?, -h, --help -
Print a summary of options and then exit.
-
-d, --daemonize -
Run as a daemon in background. It requires the -f, --output option, which directs output to a specified logfile.
-
-D LVL, --debug LVL -
Sets the debug level, it is primarily for troubleshooting. It enables various progress messages to standard error.
-
-e METHOD, --export METHOD -
If D-Bus support is available on the host, GPSD is configured to use it, and -e dbus, or --export dbus is specified, this program listens to DBUS broadcasts from
gpsdvia org.gpsd.fix.With -e sockets, or if sockets is the method defaulted to, you may give a [server[:port[:device]]] specification as arguments. See the ARGUMENTS section below for more details.
With -e shm, --export shm this program will listen to the local
gpsdusing shared memory.
-
-f OUTFILE, --output OUTFILE -
Output the GPX logg to file file OUTFILE, instead of to stdout.. You may use strftime(3) options int OUTFILE.
-
-F INFILE, --filein INFILE -
Read
gpsdJSON from file INFILE, instead of from agpsddaemon.
-
-g, --garmin -
Enable Garmin extensions to GPX format. This allows depth to also be logged in the gpx output. Not compatible with Google maps.
-
-i SECONDS, --interval SECONDS -
A new track is created if there’s no fix written for an interval of SECONDS. Defaulting to 5 seconds.
-
-l, --exports -
List all possible options for -e, --export.
-
-m MINMOVE, --minmove MINMOVE -
Sets a minimum move distance in meters (it may include a fractional decimal part). Motions shorter than this will not be logged.
-
-r, --reconnect -
Retry when GPSd loses the fix. Without
-r,gpxloggerwould quit in this case.
-
-V, --version -
Dump the package version and exit.
Arguments
By default, clients collect data from the local gpsd daemon running on localhost, using the default GPSD port 2947. The optional argument to any client may override this behavior: [server[:port[:device]]]
For further explanation, and examples, see the ARGUMENTS section in the gps(1) man page
Return values
0
on success.
1
on failure
Note
spxlogger sends error messages to the system log, not to stderr.
Examples
To daemonize, and output the gpx log to a date stamped filename:
$ gpxlogger -d -f "out-%c.gpx"
Resources
Project web site: <https://gpsd.io/>
Copying
This file is Copyright 2013 by the GPSD project
SPDX-License-Identifier: BSD-2-clause
Releases
11 releases since Debian 4.0 (Etch); the text changed 9 times.
--daemonize since Debian 11 (Bullseye);
--debug since Debian 11 (Bullseye);
--export since Debian 11 (Bullseye);
--exports since Debian 11 (Bullseye);
--filein since Debian 13 (Trixie);
--garmin since Debian 13 (Trixie);
--help since Debian 11 (Bullseye);
--interval since Debian 11 (Bullseye);
--minmove since Debian 11 (Bullseye);
--output since Debian 13 (Trixie);
--reconnect since Debian 11 (Bullseye);
--version since Debian 11 (Bullseye);
-? since Debian 11 (Bullseye);
-D since Debian 11 (Bullseye);
-F since Debian 13 (Trixie);
-V since Debian 11 (Bullseye);
-d since Debian 11 (Bullseye);
-e since Debian 11 (Bullseye);
-f since Arch Linux 2026-11-01;
-g since Debian 13 (Trixie);
-h since Debian 11 (Bullseye);
-i since Debian 11 (Bullseye);
-l since Debian 11 (Bullseye);
-m since Debian 11 (Bullseye);
-r since Debian 11 (Bullseye).
-o until Debian 13 (Trixie).