<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
This file is Copyright 2017 by the GPSD project
SPDX-License-Identifier: BSD-2-clause
-->
<!DOCTYPE refentry PUBLIC
   "-//OASIS//DTD DocBook XML V4.1.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id='gpxlogger.1'>
 <refentryinfo>
  <date>6 December 2020</date>
 </refentryinfo>
 <refmeta>
  <refentrytitle>gpxlogger</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="source">The GPSD Project</refmiscinfo>
  <refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
 </refmeta>
 <refnamediv id='name'>
  <refname>gpxlogger</refname>
  <refpurpose>Tool to connect to gpsd and generate a GPX file</refpurpose>
 </refnamediv>
 <refsynopsisdiv id='synopsis'>
  <cmdsynopsis>
   <command>gpxlogger</command>
   <arg choice='opt'>-? </arg>
   <arg choice='opt'>--daemonize </arg>
   <arg choice='opt'>--debug <replaceable>debug-level</replaceable>
   </arg>
   <arg choice='opt'>--export <replaceable>export-method</replaceable>
   </arg>
   <arg choice='opt'>--exports</arg>
   <arg choice='opt'>--help </arg>
   <arg choice='opt'>--interval<replaceable>track timeout</replaceable>
   </arg>
   <arg choice='opt'>--minmove <replaceable>minmove</replaceable>
   </arg>
   <arg choice='opt'>--output <replaceable>filename</replaceable>
   </arg>
   <arg choice='opt'>--version </arg>
   <arg choice='opt'>-d </arg>
   <arg choice='opt'>-D <replaceable>debug-level</replaceable>
   </arg>
   <arg choice='opt'>-e <replaceable>export-method</replaceable>
   </arg>
   <arg choice='opt'>-f <replaceable>filename</replaceable>
   </arg>
   <arg choice='opt'>-h </arg>
   <arg choice='opt'>-i <replaceable>track timeout</replaceable>
   </arg>
   <arg choice='opt'>-l </arg>
   <arg choice='opt'>-m <replaceable>minmove</replaceable>
   </arg>
   <arg choice='opt'>-V </arg>
   <group>
    <replaceable>server</replaceable>
    <group>
     <replaceable>:port</replaceable>
     <group>
      <replaceable>:device</replaceable>
     </group>
    </group>
   </group>
  </cmdsynopsis>
 </refsynopsisdiv>
 <refsect1 id='description'>
  <title>DESCRIPTION</title>
  <para>This program collects fixes from <application>gpsd</application>
and logs them to standard output in GPX, an XML profile for track
logging.</para>
  <para>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
<option>-i, --interval</option> and defaulting to 5 seconds.</para>
  <para>
   <application>gpxlogger</application> can use any of the
export methods that <application>gpsd</application> supports.
For a list of these methods, use the <option>-l, --exports</option>.
To force the method, give the <option>-e, --export</option> one of
the colon-terminated method names from the <option>-l, --exports</option>
table.</para>
 </refsect1>
 <refsect1 id='options'>
  <title>OPTIONS</title>
  <variablelist>
   <varlistentry>
    <term>
     <option>-?</option>
    </term>
    <term>
     <option>-h</option>
    </term>
    <term>
     <option>--help</option>
    </term>
    <listitem>
     <para>Print a summary of options and then exit.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-d</option>
    </term>
    <term>
     <option>--daemonize</option>
    </term>
    <listitem>
     <para>Run as a daemon in background.
It requires the <option>-f, --output</option> option, which directs output to a
specified logfile.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-D LVL</option>
    </term>
    <term>
     <option>--debug LVL</option>
    </term>
    <listitem>
     <para>Sets the debug level;
it is primarily for troubleshooting.
It enables various progress messages to standard error.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-e METHOD</option>
    </term>
    <term>
     <option>--export METHOD</option>
    </term>
    <listitem>
     <para>If D-Bus support is available on
the host, GPSD is configured to use it, and <command>-e dbus, --export
dbus</command> is specified, this program listens to DBUS broadcasts
from <application>gpsd</application> via org.gpsd.fix.</para>
     <para>With <command>-e sockets</command>, or if sockets is the method
defaulted to, you may give a server-port-device specification as
arguments.</para>
     <para>The sockets default is to all devices on the localhost,
using the default GPSD port 2947. An optional argument to any
client may specify a server to get data from. A colon-separated suffix
is taken as a port number. If there is a second colon-separated
suffix, that is taken as a specific device name to be
watched. However, if the server specification contains square
brackets, the part inside them is taken as an IPv6 address and
port/device suffixes are only parsed after the trailing bracket.
Possible cases look like this:</para>
     <variablelist>
      <varlistentry>
       <term>localhost:/dev/ttyS1</term>
       <listitem>
        <para>Look at the default port of localhost, trying both
IPv4 and IPv6 and watching output from serial device 1.</para>
       </listitem>
      </varlistentry>
      <varlistentry>
       <term>example.com:2317</term>
       <listitem>
        <para>Look at port 2317 on example.com, trying both
IPv4 and IPv6.</para>
       </listitem>
      </varlistentry>
      <varlistentry>
       <term>71.162.241.5:2317:/dev/ttyS3</term>
       <listitem>
        <para>Look at port 2317 at the specified IPv4
address, collecting data from attached serial device 3.</para>
       </listitem>
      </varlistentry>
      <varlistentry>
       <term>[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:2317:/dev/ttyS5</term>
       <listitem>
        <para>Look at port 2317 at the specified IPv6
address, collecting data from attached serial device 5.</para>
       </listitem>
      </varlistentry>
     </variablelist>
     <para>With <command>-e shm, --export shm</command> this program will listen to
the local <application>gpsd</application> using shared memory.  </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-i SECONDS</option>
    </term>
    <term>
     <option>--interval SECONDS</option>
    </term>
    <listitem>
     <para>A new track is created if there's no fix written for an interval
 of SECONDS.
Defaulting to 5 seconds.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-l</option>
    </term>
    <term>
     <option>--exports</option>
    </term>
    <listitem>
     <para>List all possible options for <option>-e, --export</option>.
</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-m MINMOVE</option>
    </term>
    <term>
     <option>--minmove MINMOVE</option>
    </term>
    <listitem>
     <para>Sets a
minimum move distance in meters (it may include a fractional decimal
part). Motions shorter than this will not be logged.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-r</option>
    </term>
    <term>
     <option>--reconnect</option>
    </term>
    <listitem>
     <para>Retry when GPSd loses the fix.
Without <option>-r</option>, <application>gpxlogger</application>
would quit in this case.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <option>-V</option>
    </term>
    <term>
     <option>--version</option>
    </term>
    <listitem>
     <para>Dump the package version and exit.</para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
 <refsect1 id='see_also'>
  <title>SEE ALSO</title>
  <para>
   <citerefentry>
    <refentrytitle>gpsd</refentrytitle>
    <manvolnum>8</manvolnum>
   </citerefentry>,
<citerefentry>
    <refentrytitle>gps</refentrytitle>
    <manvolnum>1</manvolnum>
   </citerefentry>
   <citerefentry>
    <refentrytitle>gpspipe</refentrytitle>
    <manvolnum>1</manvolnum>
   </citerefentry>
  </para>
 </refsect1>
 <refsect1 id='maintainer'>
  <title>AUTHORS</title>
  <para>
  Amaury Jacquot <email>sxpert@sxpert.org</email> &amp;
  Petter Reinholdtsen <email>pere@hungry.com</email> &amp;
  Chris Kuethe <email>chris.kuethe@gmail.com</email>
  </para>
 </refsect1>
</refentry>
