summaryrefslogtreecommitdiff
path: root/gpsdecode.xml
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-05-19 20:47:48 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-05-19 20:47:48 -0400
commitfc07400653635c8065adad2edd5bfb3852113e56 (patch)
treebc03a9e0c71c85edcae74ed8351e918574e4d3d1 /gpsdecode.xml
parentbc8faf61d4387c18b0fdcd029d0afe76926a4856 (diff)
downloadgpsd-fc07400653635c8065adad2edd5bfb3852113e56.tar.gz
Switch the CSV format emitted by gpsdecode(1) to DSV using |.
The problem with CSV is that string fields (such as ship name in type 5) can contain commas. I could have backslash-escaped them, but I think it's better to make old scripts fail in a way that's likely to be noticed than perpetuate a situation in which unescaped commas could cause output to be unpacked wrongly. I changed the Python decoder as well. Required rebuilding one regression test. All regression tests pass.
Diffstat (limited to 'gpsdecode.xml')
-rw-r--r--gpsdecode.xml15
1 files changed, 10 insertions, 5 deletions
diff --git a/gpsdecode.xml b/gpsdecode.xml
index 0c8fd224..4ca21763 100644
--- a/gpsdecode.xml
+++ b/gpsdecode.xml
@@ -81,9 +81,10 @@ lossless.</para>
each each field preceded by a quoted label and colon and the
entire dump line wrapped in curly braces.</para>
-<para>The <option>-c</option> sets the AIS dump format to CSV. Fields
-are dumped in the order they occur in the AIS packet. Numerics are
-not scaled. Strings are unpacked from six-bit to full ASCII</para>
+<para>The <option>-c</option> sets the AIS dump format to separate
+fields with an ASCII pipe symbol. Fields are dumped in the order they
+occur in the AIS packet. Numerics are not scaled. Strings are unpacked
+from six-bit to full ASCII</para>
<para>The <option>-V</option> option directs the program to emit its
version number, then exit.</para>
@@ -95,7 +96,7 @@ mainly of interest to developers.</para>
<refsect1 id='json_ais'><title>AIS DUMP FORMATS</title>
<para>Without the <option>-j</option> option, dump lines are values of AIS
-payload fields, comma-separated, in the order that they occur in the
+payload fields, pipe-separated, in the order that they occur in the
payload. Spans of fields expressing a date are emitted as an ISO8601
timestamp (look for colons and the trailing Z indicating Zulu/UTC
time), and the 19-bit group of TDMA status fields found at the end of
@@ -109,7 +110,7 @@ dump.</para>
performed for the output. Latitudes and longitudes are scaled to
decimal degrees rather than the native AIS unit of 1/10000th of a
minute of arc. Ship (but not air) speeds are scaled to knots rather
-than tenth-of-knot unit. Navigation status and positioning-system
+than tenth-of-knot units. Navigation status and positioning-system
type are dumped as text strings rather than IAS numeric codes. Rate of
turn may appear as "nan" if is unavailable, or as one of the strings
"fastright" or "fastleft" if it is out of the IAS encoding range;
@@ -174,6 +175,10 @@ scaling.</para>
compiler optimizers, notably in GCC 3.x at -O2, into generating bad
code.</para>
+<para>Older version of this utility used comma as a field separator with
+the <option>-c</option> option. This was a mistake, as ship name and
+other string fields can contain commas.</para>
+
</refsect1>
<refsect1 id='see_also'><title>SEE ALSO</title>
<para>