summaryrefslogtreecommitdiff
path: root/rtcm.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-07-23 15:19:58 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-07-23 15:19:58 +0000
commita7631a17dda7ee2b3e372c89d6be59c580f8a9ec (patch)
tree7221e22f83a8bdc3db4af6ffa3cecf5b789b6c04 /rtcm.c
parentbccaa961005012defb1434a64dbf10131ecf9767 (diff)
downloadgpsd-a7631a17dda7ee2b3e372c89d6be59c580f8a9ec.tar.gz
Documentation improvements.
Diffstat (limited to 'rtcm.c')
-rw-r--r--rtcm.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/rtcm.c b/rtcm.c
index 43f4eb60..b41e4c46 100644
--- a/rtcm.c
+++ b/rtcm.c
@@ -18,8 +18,13 @@ region 1 and 285 - 325 kHz in regions 2 & 3."
The code was originally by Wolfgang Rupprecht. ESR severely hacked
it, with Wolfgang's help, in order to separate message analysis from
-message dumping. You are not expected to understand any of it. Here
-are Wolfgang's original rather cryptic notes on the decoder stage:
+message dumping (he also added support for big-endian machines and
+repacking). You are not expected to understand any of it.
+
+However, in case you think you need to, this decoder is divided into
+two layers. The lower one just handles synchronizing with the
+incoming bitstream and parity checking, Here are Wolfgang's original
+rather cryptic notes on the lower level:
--------------------------------------------------------------------------
1) trim and bitflip the input.
@@ -49,6 +54,13 @@ Shift 6 bytes of rtcm data in as such:
|||||||||||||||||||||||
--------------------------------------------------------------------------
+The lower layer's job is done when it has assembled a message of up to
+33 words of clean parity-checked data. At this point the upper layer
+takes over. struct rtcm_msg_t is overlaid on the buffer and the bitfields
+are used to extract pieces of it (which, if you're on a big-endian machine
+may need to be swapped end-for-end). Those pieces are copied and (where
+necessary) reassembled into a struct rtcm_t.
+
Wolfgang's decoder was loosely based on one written by John Sanger in
1999 (in particular the dump function emits Sanger's dump format).
Here are John Sanger's original notes: