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">
4 <!-- File ID: 84662624-f924-11dd-9043-0001805bf4b1 -->
6 <refentrytitle>gpst</refentrytitle>
7 <manvolnum>1</manvolnum>
10 <refname>gpst</refname>
11 <refpurpose>Converts between various GPS formats.</refpurpose>
16 <command>gpst</command>
18 <replaceable>options</replaceable>
20 <arg choice="opt" rep="repeat">
21 <replaceable>file</replaceable>
26 <command>gpst</command>
27 <arg choice="req">-S</arg>
29 <replaceable>options</replaceable>
31 <arg choice="opt" rep="repeat">
32 <replaceable>file</replaceable>
37 <refsect1 id="gpst.description">
38 <title>Description</title>
43 <term><option>--chronology</option></term>
45 <para>Check for broken chronology, warn about entries with an
51 <term><option>-d</option>, <option>--skip-dups</option></term>
53 <para>If succeeding identical coordinates are found, print
54 only the first one and ignore the rest.</para>
59 <term><option>-e</option>, <option>--epoch</option></term>
61 <para>Use seconds since 1970-01-01 00:00:00 GMT as date
67 <term><option>--fix</option></term>
69 <para>Comment out entries which is obviously wrong.
70 Use together with <option>--chronology</option> to fix those
72 Does not work with GPX output yet.</para>
77 <term><option>--from-date
78 <replaceable>x</replaceable></option></term>
80 <para>Used by the <literal>pgwupd</literal> format.
81 Specifies from which date waypoints should be updated.
82 No checks for valid date format here, let
83 <application>PostgreSQL</application> take care of that.
84 All variants it understands can be used here.</para>
89 <term><option>-h</option>, <option>--help</option></term>
91 <para>Send a brief help summary to stdout.</para>
96 <term><option>--inside</option></term>
98 <para>Print only trackpoints inside a rectangle specified by
99 <option>--pos1</option> and <option>--pos2</option>.</para>
104 <term><option>-n</option>, <option>--undefined
105 <replaceable>x</replaceable></option></term>
107 <para>Use <replaceable>x</replaceable> as undefined
113 <term><option>-o</option>, <option>--output-format
114 <replaceable>x</replaceable></option></term>
116 <para>Use output format <replaceable>x</replaceable>:</para>
120 <term><option>clean</option></term>
122 <para>TAB-separated format with longitude, latitude and
128 <term><option>csv</option></term>
130 <para>TAB-separated format:
136 <para>Date of trackpoint.
138 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal>
139 unless the <option>--epoch</option> option is
141 If so, it’s represented as number of seconds since
142 1970-01-01 00:00:00 UTC.</para>
147 <term>longitude</term>
149 <para>Longitude, decimal degrees.</para>
154 <term>latitude</term>
156 <para>Latitude, decimal degrees.</para>
161 <term>altitude</term>
163 <para>Altitude in metres above sea level.
165 If not present, the corresponding TAB is also
166 printed, to keep the number of columns
171 </variablelist></para>
176 <term><option>gpsml</option> (Default)</term>
178 <para>Line-based XML which makes it easy to edit and
180 In the past, there was this big plan about making this
181 the default storage format, so it was declared as The
182 Honourable Default Output Format.
183 But using GPX is the way to go, so this will probably
184 change in the future.
185 It’s way too <foreignphrase>de facto</foreignphrase> and
186 widely used, so storing GPS data in anything else is
188 Probably not finished yet.</para>
193 <term><option>gpstrans</option></term>
195 <para>The format generated by <citerefentry>
196 <refentrytitle>gpstrans</refentrytitle>
197 <manvolnum>1</manvolnum> </citerefentry>.</para>
202 <term><option>gpx</option></term>
204 <para>Not complete yet, but good enough in most
210 <term><option>pgtab</option></term>
212 <para>TAB-separated format for import into
213 <application>PostgreSQL</application>.
214 Undefined values are written as <literal>\N</literal> if
215 the <option>--undefined</option> option is not
220 <term><database class="field">date</database></term>
223 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal></para>
228 <term><database class="field">coor</database></term>
231 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
236 <term><database class="field">ele</database></term>
238 <para>Altitude in metres above sea level.</para>
243 <term><database class="field">name</database></term>
245 <para>Short name of closest waypoint.
247 <application>PostgreSQL</application>, so this
248 value is always <literal>\N</literal>.</para>
253 <term><database class="field">dist</database></term>
255 <para>Distance in decimal degrees to closest
258 <application>PostgreSQL</application>, so this
259 value is always <literal>\N</literal>.</para>
265 class="field">description</database></term>
267 <para>Description of waypoint.
269 <application>PostgreSQL</application>, so this
270 value is always <literal>\N</literal>.</para>
279 <term><option>pgwtab</option></term>
281 <para>Output waypoints on a TAB-separated format:</para>
285 <term><database class="field">coor</database></term>
288 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
293 <term><database class="field">name</database></term>
295 <para>Title of waypoint.</para>
300 <term><database class="field">ele</database></term>
302 <para>Elevation in metres above sea level.</para>
307 <term><database class="field">type</database></term>
309 <para>Type of waypoint, same as the GPX <sgmltag
310 class="starttag">type</sgmltag> element.</para>
315 <term><database class="field">time</database></term>
317 <para>Timestamp of waypoint.</para>
322 <term><database class="field">cmt</database></term>
324 <para>Short waypoint description, used by the GPS
326 Same as the GPX <sgmltag
327 class="starttag">cmt</sgmltag> element.</para>
333 class="field">descr</database></term>
335 <para>Long description, not used by the GPS.
336 Same as the GPX <sgmltag
337 class="starttag">desc</sgmltag> element.</para>
342 <term><database class="field">src</database></term>
344 <para>Source of data, same as the <sgmltag
345 class="starttag">src</sgmltag> GPX element.</para>
350 <term><database class="field">sym</database></term>
352 <para>GPS symbol name.
354 class="starttag">sym</sgmltag> GPX element.</para>
363 <term><option>pgwupd</option></term>
365 <para>Output waypoints as SQL transactions which updates
366 the <database class="field">name</database> and
367 <database class="field">dist</database> columns.</para>
372 <term><option>poscount</option></term>
374 <para>Creates a 3D plot where areas with many
375 trackpoints are higher than areas with less track
381 <term><option>ps</option></term>
383 <para>Postscript. Unfinished.</para>
388 <term><option>svg</option></term>
390 <para>Unfinished.</para>
395 <term><option>xgraph</option></term>
397 <para>Input format for <citerefentry>
398 <refentrytitle>xgraph</refentrytitle>
399 <manvolnum>1</manvolnum> </citerefentry>.</para>
404 <term><option>ygraph</option></term>
406 <para>Input format for <citerefentry>
407 <refentrytitle>ygraph</refentrytitle>
408 <manvolnum>1</manvolnum> </citerefentry>.</para>
417 <term><option>--outside</option></term>
419 <para>Print only trackpoints outside a rectangle specified by
420 <option>--pos1</option> and <option>--pos2</option>.</para>
426 <replaceable>x1</replaceable>,<replaceable>y1</replaceable></option></term>
428 <replaceable>x2</replaceable>,<replaceable>y2</replaceable></option></term>
430 <para>Specifies corners of an area rectangle used by the
431 <option>--inside</option> and <option>--outside</option>
433 The <replaceable>x</replaceable> and
434 <replaceable>y</replaceable> values are specified as decimal
435 degrees, negative for west or south.</para>
440 <term><option>-r</option>, <option>--require
441 <replaceable>x</replaceable></option></term>
443 <para>Specify requirements for trackpoints to be written.
444 <replaceable>x</replaceable> is a string with the following
449 <term><option>e</option></term>
451 <para>Print only waypoints which have an
457 <term><option>p</option></term>
459 <para>Print only waypoints which have a position.</para>
464 <term><option>t</option></term>
466 <para>Print only waypoints which have a
476 <term><option>-R</option>, <option>--round
477 <replaceable>x</replaceable>=<replaceable>y</replaceable><optional>,<replaceable>x2</replaceable>=<replaceable>y2</replaceable><optional>...</optional></optional></option></term>
479 <para>Round trackpoint element <replaceable>x</replaceable> to
480 <replaceable>y</replaceable> decimals.</para>
481 <para>Example:</para>
483 <para><option>--round lat=4,lon=5,ele=1</option></para>
489 <term><option>-s</option>, <option>--short-date</option></term>
491 <para>Use short date format.</para>
496 <term><option>-S</option>, <option>--save-to-file
497 <replaceable>x</replaceable></option></term>
499 <para>Save the unconverted data to a file with a filename
500 starting with the timestamp of the first trackpoint.
501 The parameter string <replaceable>x</replaceable> is added at
502 the end of the filename.
503 For the time being this option will ignore all other
506 <para>If several files are specified on the command line,
507 all data will be saved into only one file.
508 This behaviour may change in the future.</para>
514 <term><option>-t</option>,
515 <option>--create-breaks</option></term>
517 <para>Create breaks in track between points with a difference
518 more than the number of seconds specified by the
519 <envar>PAUSE_LIMIT</envar> variable.</para>
524 <term><option>-T <replaceable>x</replaceable></option>,
526 <replaceable>x</replaceable></option></term>
528 <para>Move timestamps <replaceable>x</replaceable> seconds
529 forwards or backwards in output.
530 <replaceable>x</replaceable> can be a positive or negative
536 <term><option>-v</option>, <option>--verbose</option></term>
538 <para>Verbose output, can be repeated.</para>
543 <term><option>--version</option></term>
545 <para>Print program version information.</para>
550 <term><option>-w</option>,
551 <option>--strip-whitespace</option></term>
553 <para>Strip all unnecessary whitespace.</para>
558 <term><option>-y</option>,
559 <option>--double-y-scale</option></term>
561 <para>Double Y scale (latitude).</para>
566 <term><option>--debug</option></term>
568 <para>Print debugging messages.</para>
575 <refsect1 id="gpst.bugs">
576 <title>Bugs and things that need to be done</title>
581 <para>Pretty incomplete in some areas.
582 Some of the source formats are undocumented and thus incomplete.
583 Some functionality is not working properly, for example the
584 Postscript output.</para>
588 <para>Remove hardcodings.</para>
592 <para>Translate database column names to English.</para>
596 <para>Add more tests to cover all command-line options.</para>
602 <refsect1 id="gpst.author">
603 <title>Author</title>
605 <para>Made by <personname><firstname>Øyvind</firstname>
606 <othername>A.</othername> <surname>Holm</surname></personname>
607 <email>sunny@sunbase.org</email>.</para>
610 <refsect1 id="gpst.copyright">
611 <title>Copyright</title>
613 <para>Copyleft © <personname><firstname>Øyvind</firstname>
614 <othername>A.</othername> <surname>Holm</surname></personname>
615 <email>sunny@sunbase.org</email>.
616 This is free software; see the file <filename>COPYING</filename> for
617 legalese stuff.</para>
620 <refsect1 id="gpst.license">
621 <title>License</title>
623 <para>This program is free software: you can redistribute it and/or
624 modify it under the terms of the <citetitle>GNU General Public
625 License</citetitle> as published by the <orgname
626 class="nonprofit">Free Software Foundation</orgname>, either version
627 3 of the License, or (at your option) any later version.</para>
629 <para>This program is distributed in the hope that it will be
630 useful, but <emphasis>WITHOUT ANY WARRANTY</emphasis>; without even
631 the implied warranty of <emphasis>MERCHANTABILITY</emphasis> or
632 <emphasis>FITNESS FOR A PARTICULAR PURPOSE</emphasis>.
633 See the GNU General Public License for more details.</para>
635 <para>You should have received a copy of the GNU General Public
636 License along with this program.
637 If not, see <ulink url="http://www.gnu.org/licenses/" />.</para>
640 <refsect1 id="gpst.seealso">
641 <title>See also</title>
644 <refentrytitle>gpsbabel</refentrytitle>
645 <manvolnum>1</manvolnum>
646 </citerefentry></para>
649 <!-- vim: set tw=72 ts=2 sts=2 sw=2 et fo=tcqw fenc=UTF-8 : -->