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 <refsect1 id="gpst.description">
40 <title>Description</title>
45 <term><option>--chronology</option></term>
47 <para>Check for broken chronology, warn about entries with an
53 <term><option>-d</option>, <option>--skip-dups</option></term>
55 <para>If succeeding identical coordinates are found, print
56 only the first one and ignore the rest.</para>
61 <term><option>-e</option>, <option>--epoch</option></term>
63 <para>Use seconds since 1970-01-01 00:00:00 GMT as date
69 <term><option>--fix</option></term>
71 <para>Comment out entries which is obviously wrong.
72 Use together with <option>--chronology</option> to fix those
74 Does not work with GPX output yet.</para>
79 <term><option>--from-date
80 <replaceable>x</replaceable></option></term>
82 <para>Used by the <literal>pgwupd</literal> format.
83 Specifies from which date waypoints should be updated.
84 No checks for valid date format here, let
85 <application>PostgreSQL</application> take care of that.
86 All variants it understands can be used here.</para>
91 <term><option>-h</option>, <option>--help</option></term>
93 <para>Send a brief help summary to stdout.</para>
98 <term><option>--inside</option></term>
100 <para>Print only trackpoints inside a rectangle specified by
101 <option>--pos1</option> and <option>--pos2</option>.</para>
106 <term><option>-n</option>, <option>--undefined
107 <replaceable>x</replaceable></option></term>
109 <para>Use <replaceable>x</replaceable> as undefined
115 <term><option>--near</option></term>
117 <para>Add names of the three closest waypoints to the
119 Unfinished and experimental, needs <citerefentry>
120 <refentrytitle>gpsbabel</refentrytitle>
121 <manvolnum>1</manvolnum> </citerefentry>, which is called from
123 <command>/usr/local/bin/gpsbabel</command>.</para>
128 <term><option>-o</option>, <option>--output-format
129 <replaceable>x</replaceable></option></term>
131 <para>Use output format <replaceable>x</replaceable>:</para>
135 <term><option>clean</option></term>
137 <para>TAB-separated format with longitude, latitude and
143 <term><option>csv</option></term>
145 <para>TAB-separated format:
151 <para>Date of trackpoint.
153 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal>
154 unless the <option>--epoch</option> option is
156 If so, it’s represented as number of seconds since
157 1970-01-01 00:00:00 UTC.</para>
162 <term>longitude</term>
164 <para>Longitude, decimal degrees.</para>
169 <term>latitude</term>
171 <para>Latitude, decimal degrees.</para>
176 <term>altitude</term>
178 <para>Altitude in metres above sea level.
180 If not present, the corresponding TAB is also
181 printed, to keep the number of columns
186 </variablelist></para>
191 <term><option>gpsml</option> (Default)</term>
193 <para>Line-based XML which makes it easy to edit and
195 In the past, there was this big plan about making this
196 the default storage format, so it was declared as The
197 Honourable Default Output Format.
198 But using GPX is the way to go, so this will probably
199 change in the future.
200 It’s way too <foreignphrase>de facto</foreignphrase> and
201 widely used, so storing GPS data in anything else is
203 Probably not finished yet.</para>
208 <term><option>gpstrans</option></term>
210 <para>The format generated by <citerefentry>
211 <refentrytitle>gpstrans</refentrytitle>
212 <manvolnum>1</manvolnum> </citerefentry>.</para>
217 <term><option>gpx</option></term>
219 <para>Not complete yet, but good enough in most
225 <term><option>pgtab</option></term>
227 <para>TAB-separated format for import into
228 <application>PostgreSQL</application>.
229 Undefined values are written as <literal>\N</literal> if
230 the <option>--undefined</option> option is not
235 <term><database class="field">date</database></term>
238 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal></para>
243 <term><database class="field">coor</database></term>
246 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
251 <term><database class="field">ele</database></term>
253 <para>Altitude in metres above sea level.</para>
258 <term><database class="field">sted</database></term>
260 <para>Short name of closest waypoint.
262 <application>PostgreSQL</application>, so this
263 value is always <literal>\N</literal>.</para>
268 <term><database class="field">dist</database></term>
270 <para>Distance in decimal degrees to closest
273 <application>PostgreSQL</application>, so this
274 value is always <literal>\N</literal>.</para>
280 class="field">description</database></term>
282 <para>Description of waypoint.
284 <application>PostgreSQL</application>, so this
285 value is always <literal>\N</literal>.</para>
290 <term><database class="field">avst</database></term>
292 <para>Distance to trackpoint in decimal degrees
293 from a defined <quote>home</quote> position.
294 This is calculated in
295 <application>PostgreSQL</application>, so the
296 field value is always
297 <literal>\N</literal>.</para>
306 <term><option>pgwtab</option></term>
308 <para>Output waypoints on a TAB-separated format:</para>
312 <term><database class="field">coor</database></term>
315 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
320 <term><database class="field">name</database></term>
322 <para>Title of waypoint.</para>
327 <term><database class="field">ele</database></term>
329 <para>Elevation in metres above sea level.</para>
334 <term><database class="field">type</database></term>
336 <para>Type of waypoint, same as the GPX <sgmltag
337 class="starttag">type</sgmltag> element.</para>
342 <term><database class="field">time</database></term>
344 <para>Timestamp of waypoint.</para>
349 <term><database class="field">cmt</database></term>
351 <para>Short waypoint description, used by the GPS
353 Same as the GPX <sgmltag
354 class="starttag">cmt</sgmltag> element.</para>
360 class="field">descr</database></term>
362 <para>Long description, not used by the GPS.
363 Same as the GPX <sgmltag
364 class="starttag">desc</sgmltag> element.</para>
369 <term><database class="field">src</database></term>
371 <para>Source of data, same as the <sgmltag
372 class="starttag">src</sgmltag> GPX element.</para>
377 <term><database class="field">sym</database></term>
379 <para>GPS symbol name.
381 class="starttag">sym</sgmltag> GPX element.</para>
390 <term><option>pgwupd</option></term>
392 <para>Output waypoints as SQL transactions which updates
393 the <database class="field">sted</database> and
394 <database class="field">dist</database> columns.</para>
399 <term><option>poscount</option></term>
401 <para>Creates a 3D plot where areas with many
402 trackpoints are higher than areas with less track
408 <term><option>ps</option></term>
410 <para>Postscript. Unfinished.</para>
415 <term><option>svg</option></term>
417 <para>Unfinished.</para>
422 <term><option>xgraph</option></term>
424 <para>Input format for <citerefentry>
425 <refentrytitle>xgraph</refentrytitle>
426 <manvolnum>1</manvolnum> </citerefentry>.</para>
431 <term><option>ygraph</option></term>
433 <para>Input format for <citerefentry>
434 <refentrytitle>ygraph</refentrytitle>
435 <manvolnum>1</manvolnum> </citerefentry>.</para>
444 <term><option>--outside</option></term>
446 <para>Print only trackpoints outside a rectangle specified by
447 <option>--pos1</option> and <option>--pos2</option>.</para>
453 <replaceable>x1</replaceable>,<replaceable>y1</replaceable></option></term>
455 <replaceable>x2</replaceable>,<replaceable>y2</replaceable></option></term>
457 <para>Specifies corners of an area rectangle used by the
458 <option>--inside</option> and <option>--outside</option>
460 The <replaceable>x</replaceable> and
461 <replaceable>y</replaceable> values are specified as decimal
462 degrees, negative for west or south.</para>
467 <term><option>-r</option>, <option>--require
468 <replaceable>x</replaceable></option></term>
470 <para>Specify requirements for trackpoints to be written.
471 <replaceable>x</replaceable> is a string with the following
476 <term><option>e</option></term>
478 <para>Print only waypoints which have an
484 <term><option>p</option></term>
486 <para>Print only waypoints which have a position.</para>
491 <term><option>t</option></term>
493 <para>Print only waypoints which have a
503 <term><option>-R</option>, <option>--round
504 <replaceable>x</replaceable>=<replaceable>y</replaceable><optional>,<replaceable>x2</replaceable>=<replaceable>y2</replaceable><optional>...</optional></optional></option></term>
506 <para>Round trackpoint element <replaceable>x</replaceable> to
507 <replaceable>y</replaceable> decimals.</para>
508 <para>Example:</para>
510 <para><option>--round lat=4,lon=5,ele=1</option></para>
516 <term><option>-s</option>, <option>--short-date</option></term>
518 <para>Use short date format.</para>
523 <term><option>-S</option>, <option>--save-to-file
524 <replaceable>x</replaceable></option></term>
526 <para>Save the unconverted data to a file with a filename
527 starting with the timestamp of the first trackpoint.
528 The parameter string <replaceable>x</replaceable> is added at
529 the end of the filename.
530 For the time being this option will ignore all other
533 <para>If several files are specified on the command line,
534 all data will be saved into only one file.
535 This behaviour may change in the future.</para>
541 <term><option>-t</option>,
542 <option>--create-breaks</option></term>
544 <para>Create breaks in track between points with a difference
545 more than the number of seconds specified by the
546 <envar>PAUSE_LIMIT</envar> variable.</para>
551 <term><option>-T <replaceable>x</replaceable></option>,
553 <replaceable>x</replaceable></option></term>
555 <para>Move timestamps <replaceable>x</replaceable> seconds
556 forwards or backwards in output.
557 <replaceable>x</replaceable> can be a positive or negative
563 <term><option>-v</option>, <option>--verbose</option></term>
565 <para>Verbose output, can be repeated.</para>
570 <term><option>--version</option></term>
572 <para>Print program version information.</para>
577 <term><option>-w</option>,
578 <option>--strip-whitespace</option></term>
580 <para>Strip all unnecessary whitespace.</para>
585 <term><option>-y</option>,
586 <option>--double-y-scale</option></term>
588 <para>Double Y scale (latitude).</para>
593 <term><option>--debug</option></term>
595 <para>Print debugging messages.</para>
602 <refsect1 id="gpst.bugs">
603 <title>Bugs and things that need to be done</title>
608 <para>Pretty incomplete in some areas.
609 Some of the source formats are undocumented and thus incomplete.
610 Some functionality is not working properly, for example the
611 Postscript output.</para>
615 <para>Remove hardcodings, for example the <quote>home</quote>
616 position used to calculate the <database
617 class="field">avst</database> database column.</para>
621 <para>Translate database column names to English.</para>
625 <para>Add more tests to cover all command-line options.</para>
631 <refsect1 id="gpst.author">
632 <title>Author</title>
634 <para>Made by <personname><firstname>Øyvind</firstname>
635 <othername>A.</othername> <surname>Holm</surname></personname>
636 <email>sunny@sunbase.org</email>.</para>
639 <refsect1 id="gpst.copyright">
640 <title>Copyright</title>
642 <para>Copyleft © <personname><firstname>Øyvind</firstname>
643 <othername>A.</othername> <surname>Holm</surname></personname>
644 <email>sunny@sunbase.org</email>.
645 This is free software; see the file <filename>COPYING</filename> for
646 legalese stuff.</para>
649 <refsect1 id="gpst.license">
650 <title>License</title>
652 <para>This program is free software; you can redistribute it and/or
653 modify it under the terms of the <citetitle>GNU General Public
654 License</citetitle> as published by the <orgname
655 class="nonprofit">Free Software Foundation</orgname>; either version
656 2 of the License, or (at your option) any later version.</para>
658 <para>This program is distributed in the hope that it will be
659 useful, but <emphasis>WITHOUT ANY WARRANTY</emphasis>; without even
660 the implied warranty of <emphasis>MERCHANTABILITY</emphasis> or
661 <emphasis>FITNESS FOR A PARTICULAR PURPOSE</emphasis>.
662 See the GNU General Public License for more details.</para>
664 <para>You should have received a copy of the GNU General Public
665 License along with this program; if not, write to
666 <address>The Free Software Foundation, Inc.
667 <street>59 Temple Place</street>, <otheraddr>Suite 330</otheraddr>
668 <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
669 <country>USA</country></address></para>
672 <refsect1 id="gpst.seealso">
673 <title>See also</title>
676 <refentrytitle>gpsbabel</refentrytitle>
677 <manvolnum>1</manvolnum>
678 </citerefentry></para>
681 <!-- vim: set tw=72 ts=2 sts=2 sw=2 et fo=tcqw fenc=UTF-8 : -->