1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4//EN" "../../../Tools/dtd/docbook-4.4/docbookx.dtd">
3 <refentry id="gpst" lang="en">
5 <date><![CDATA[$Id$]]></date>
8 <refentrytitle>gpst</refentrytitle>
9 <manvolnum>1</manvolnum>
12 <refname>gpst</refname>
13 <refpurpose>Converts between various GPS formats.</refpurpose>
18 <command>gpst</command>
20 <replaceable>options</replaceable>
22 <arg choice="opt" rep="repeat">
23 <replaceable>file</replaceable>
28 <command>gpst</command>
29 <arg choice="req">-S</arg>
31 <replaceable>options</replaceable>
33 <arg choice="opt" rep="repeat">
34 <replaceable>file</replaceable>
39 <command>gpst</command>
40 <arg choice="req">-u</arg>
42 <replaceable>options</replaceable>
44 <arg choice="opt" rep="repeat">
45 <replaceable>file</replaceable>
50 <refsect1 id="gpst.description">
51 <title>Description</title>
56 <term><option>--chronology</option></term>
58 <para>Check for broken chronology, warn about entries with an
64 <term><option>-d</option>, <option>--skip-dups</option></term>
66 <para>If succeeding identical coordinates are found, print
67 only the first one and ignore the rest.</para>
72 <term><option>-e</option>, <option>--epoch</option></term>
74 <para>Use seconds since 1970-01-01 00:00:00 GMT as date
80 <term><option>--fix</option></term>
82 <para>Comment out entries which is obviously wrong.
83 Use together with <option>--chronology</option> to fix those
85 Does not work with GPX output yet.</para>
90 <term><option>--from-date
91 <replaceable>x</replaceable></option></term>
93 <para>Used by the <literal>pgwupd</literal> format.
94 Specifies from which date waypoints should be updated.
95 No checks for valid date format here, let
96 <application>PostgreSQL</application> take care of that.
97 All variants it understands can be used here.</para>
102 <term><option>-h</option>, <option>--help</option></term>
104 <para>Send a brief help summary to stdout.</para>
109 <term><option>--inside</option></term>
111 <para>Print only trackpoints inside a rectangle specified by
112 <option>--pos1</option> and <option>--pos2</option>.</para>
117 <term><option>-n</option>, <option>--undefined
118 <replaceable>x</replaceable></option></term>
120 <para>Use <replaceable>x</replaceable> as undefined
126 <term><option>--near</option></term>
128 <para>Add names of the three closest waypoints to the
130 Unfinished and experimental, needs <citerefentry>
131 <refentrytitle>gpsbabel</refentrytitle>
132 <manvolnum>1</manvolnum> </citerefentry>, which is called from
134 <command>/usr/local/bin/gpsbabel</command>.</para>
139 <term><option>-o</option>, <option>--output-format
140 <replaceable>x</replaceable></option></term>
142 <para>Use output format <replaceable>x</replaceable>:</para>
146 <term><option>clean</option></term>
148 <para>TAB-separated format with longitude, latitude and
154 <term><option>csv</option></term>
156 <para>TAB-separated format:
162 <para>Date of trackpoint.
164 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal>
165 unless the <option>--epoch</option> option is
167 If so, it’s represented as number of seconds since
168 1970-01-01 00:00:00 UTC.</para>
173 <term>longitude</term>
175 <para>Longitude, decimal degrees.</para>
180 <term>latitude</term>
182 <para>Latitude, decimal degrees.</para>
187 <term>altitude</term>
189 <para>Altitude in metres above sea level.
191 If not present, the corresponding TAB is also
192 printed, to keep the number of columns
197 </variablelist></para>
202 <term><option>gpsml</option> (Default)</term>
204 <para>Line-based XML which makes it easy to edit and
206 In the past, there was this big plan about making this
207 the default storage format, so it was declared as The
208 Honourable Default Output Format.
209 But using GPX is the way to go, so this will probably
210 change in the future.
211 It’s way too <foreignphrase>de facto</foreignphrase> and
212 widely used, so storing GPS data in anything else is
214 Probably not finished yet.</para>
219 <term><option>gpstrans</option></term>
221 <para>The format generated by <citerefentry>
222 <refentrytitle>gpstrans</refentrytitle>
223 <manvolnum>1</manvolnum> </citerefentry>.</para>
228 <term><option>gpx</option></term>
230 <para>Not complete yet, but good enough in most
236 <term><option>pgtab</option></term>
238 <para>TAB-separated format for import into
239 <application>PostgreSQL</application>.
240 Undefined values are written as <literal>\N</literal> if
241 the <option>--undefined</option> option is not
246 <term><database class="field">date</database></term>
249 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal></para>
254 <term><database class="field">coor</database></term>
257 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
262 <term><database class="field">ele</database></term>
264 <para>Altitude in metres above sea level.</para>
269 <term><database class="field">sted</database></term>
271 <para>Short name of closest waypoint.
273 <application>PostgreSQL</application>, so this
274 value is always <literal>\N</literal>.</para>
279 <term><database class="field">dist</database></term>
281 <para>Distance in decimal degrees to closest
284 <application>PostgreSQL</application>, so this
285 value is always <literal>\N</literal>.</para>
291 class="field">description</database></term>
293 <para>Description of waypoint.
295 <application>PostgreSQL</application>, so this
296 value is always <literal>\N</literal>.</para>
301 <term><database class="field">avst</database></term>
303 <para>Distance to trackpoint in decimal degrees
304 from a defined <quote>home</quote> position.
305 This is calculated in
306 <application>PostgreSQL</application>, so the
307 field value is always
308 <literal>\N</literal>.</para>
317 <term><option>pgwtab</option></term>
319 <para>Output waypoints on a TAB-separated format:</para>
323 <term><database class="field">coor</database></term>
326 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
331 <term><database class="field">name</database></term>
333 <para>Title of waypoint.</para>
338 <term><database class="field">ele</database></term>
340 <para>Elevation in metres above sea level.</para>
345 <term><database class="field">type</database></term>
347 <para>Type of waypoint, same as the GPX <sgmltag
348 class="starttag">type</sgmltag> element.</para>
353 <term><database class="field">time</database></term>
355 <para>Timestamp of waypoint.</para>
360 <term><database class="field">cmt</database></term>
362 <para>Short waypoint description, used by the GPS
364 Same as the GPX <sgmltag
365 class="starttag">cmt</sgmltag> element.</para>
371 class="field">descr</database></term>
373 <para>Long description, not used by the GPS.
374 Same as the GPX <sgmltag
375 class="starttag">desc</sgmltag> element.</para>
380 <term><database class="field">src</database></term>
382 <para>Source of data, same as the <sgmltag
383 class="starttag">src</sgmltag> GPX element.</para>
388 <term><database class="field">sym</database></term>
390 <para>GPS symbol name.
392 class="starttag">sym</sgmltag> GPX element.</para>
401 <term><option>pgwupd</option></term>
403 <para>Output waypoints as SQL transactions which updates
404 the <database class="field">sted</database> and
405 <database class="field">dist</database> columns.</para>
410 <term><option>poscount</option></term>
412 <para>Creates a 3D plot where areas with many
413 trackpoints are higher than areas with less track
419 <term><option>ps</option></term>
421 <para>Postscript. Unfinished.</para>
426 <term><option>svg</option></term>
428 <para>Unfinished.</para>
433 <term><option>xgraph</option></term>
435 <para>Input format for <citerefentry>
436 <refentrytitle>xgraph</refentrytitle>
437 <manvolnum>1</manvolnum> </citerefentry>.</para>
442 <term><option>ygraph</option></term>
444 <para>Input format for <citerefentry>
445 <refentrytitle>ygraph</refentrytitle>
446 <manvolnum>1</manvolnum> </citerefentry>.</para>
455 <term><option>--outside</option></term>
457 <para>Print only trackpoints outside a rectangle specified by
458 <option>--pos1</option> and <option>--pos2</option>.</para>
464 <replaceable>x1</replaceable>,<replaceable>y1</replaceable></option></term>
466 <replaceable>x2</replaceable>,<replaceable>y2</replaceable></option></term>
468 <para>Specifies corners of an area rectangle used by the
469 <option>--inside</option> and <option>--outside</option>
471 The <replaceable>x</replaceable> and
472 <replaceable>y</replaceable> values are specified as decimal
473 degrees, negative for west or south.</para>
478 <term><option>-r</option>, <option>--require
479 <replaceable>x</replaceable></option></term>
481 <para>Specify requirements for trackpoints to be written.
482 <replaceable>x</replaceable> is a string with the following
487 <term><option>e</option></term>
489 <para>Print only waypoints which have an
495 <term><option>p</option></term>
497 <para>Print only waypoints which have a position.</para>
502 <term><option>t</option></term>
504 <para>Print only waypoints which have a
514 <term><option>-R</option>, <option>--round
515 <replaceable>x</replaceable>=<replaceable>y</replaceable><optional>,<replaceable>x2</replaceable>=<replaceable>y2</replaceable><optional>...</optional></optional></option></term>
517 <para>Round trackpoint element <replaceable>x</replaceable> to
518 <replaceable>y</replaceable> decimals.</para>
519 <para>Example:</para>
521 <para><option>--round lat=4,lon=5,ele=1</option></para>
527 <term><option>-s</option>, <option>--short-date</option></term>
529 <para>Use short date format.</para>
534 <term><option>-S</option>, <option>--save-to-file
535 <replaceable>x</replaceable></option></term>
537 <para>Save the unconverted data to a file with a filename
538 starting with the timestamp of the first trackpoint.
539 The parameter string <replaceable>x</replaceable> is added at
540 the end of the filename.
541 For the time being this option will ignore all other
544 <para>If several files are specified on the command line,
545 all data will be saved into only one file.
546 This behaviour may change in the future.</para>
552 <term><option>-t</option>,
553 <option>--create-breaks</option></term>
555 <para>Create breaks in track between points with a difference
556 more than the number of seconds specified by the
557 <envar>PAUSE_LIMIT</envar> variable.</para>
562 <term><option>-u</option>,
563 <option>--comment-out-dups</option></term>
565 <para>Comment out following data with identical position
566 values, only print first entry.</para>
571 <term><option>-v</option>, <option>--verbose</option></term>
573 <para>Verbose output, can be repeated.</para>
578 <term><option>--version</option></term>
580 <para>Print program version information.</para>
585 <term><option>-w</option>,
586 <option>--strip-whitespace</option></term>
588 <para>Strip all unnecessary whitespace.</para>
593 <term><option>-y</option>,
594 <option>--double-y-scale</option></term>
596 <para>Double Y scale (latitude).</para>
601 <term><option>--debug</option></term>
603 <para>Print debugging messages.</para>
610 <refsect1 id="gpst.bugs">
611 <title>Bugs and things that need to be done</title>
616 <para>Pretty incomplete in some areas.
617 Some of the source formats are undocumented and thus incomplete.
618 Some functionality is not working properly, for example the
619 Postscript output.</para>
623 <para>Remove hardcodings, for example the <quote>home</quote>
624 position used to calculate the <database
625 class="field">avst</database> database column.</para>
629 <para>Translate database column names to English.</para>
633 <para>Add more tests to cover all command-line options.</para>
639 <refsect1 id="gpst.author">
640 <title>Author</title>
642 <para>Made by <personname><firstname>Øyvind</firstname>
643 <othername>A.</othername> <surname>Holm</surname></personname>
644 <email>sunny@sunbase.org</email>.</para>
647 <refsect1 id="gpst.copyright">
648 <title>Copyright</title>
650 <para>Copyleft © <personname><firstname>Øyvind</firstname>
651 <othername>A.</othername> <surname>Holm</surname></personname>
652 <email>sunny@sunbase.org</email>.
653 This is free software; see the file <filename>COPYING</filename> for
654 legalese stuff.</para>
657 <refsect1 id="gpst.license">
658 <title>License</title>
660 <para>This program is free software; you can redistribute it and/or
661 modify it under the terms of the <citetitle>GNU General Public
662 License</citetitle> as published by the <orgname
663 class="nonprofit">Free Software Foundation</orgname>; either version
664 2 of the License, or (at your option) any later version.</para>
666 <para>This program is distributed in the hope that it will be
667 useful, but <emphasis>WITHOUT ANY WARRANTY</emphasis>; without even
668 the implied warranty of <emphasis>MERCHANTABILITY</emphasis> or
669 <emphasis>FITNESS FOR A PARTICULAR PURPOSE</emphasis>.
670 See the GNU General Public License for more details.</para>
672 <para>You should have received a copy of the GNU General Public
673 License along with this program; if not, write to
674 <address>The Free Software Foundation, Inc.
675 <street>59 Temple Place</street>, <otheraddr>Suite 330</otheraddr>
676 <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
677 <country>USA</country></address></para>
680 <refsect1 id="gpst.seealso">
681 <title>See also</title>
684 <refentrytitle>gpsbabel</refentrytitle>
685 <manvolnum>1</manvolnum>
686 </citerefentry></para>
689 <!-- vim: set tw=72 ts=2 sts=2 sw=2 et fo=tcqw fenc=UTF-8 : -->