----------------------------------------------------------------------
              Standalone RTCM RTK Decoder, Version 1.1
----------------------------------------------------------------------

Easy example RTCM DGPS and RTK Decoder for Linux.
Copyright (C) 2005 by DLR Neustrelitz 
Author: Carsten Becker
    
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
or read http://www.gnu.org/licenses/gpl.txt


Files in LinuxRtcmDecoder.zip
-----------------------------
RTCMModule.tar:         Linux RTCM decoder source code
ReadmeRTCMModule.txt:   This Readme file


Program "rtcm"
--------------
The stand-alone decoder "rtcm" reads DGPS and/or RTK 
corrections in RTCM 2.1, 2.2, or 2.3 format from standard input, 
basically message type 1 (DGPS, pseudo range corrections and
range rate corrections), type 3 (reference station coordinates),
and types 18 and 19 (RTK, uncorrected carrier phase measurements
and uncorrected pseudorange measurements). Note that so far 
"rtcm" doesn't decode data from GLONASS satellites. The program 
writes to standard output.


Compilation/Installation
------------------------
To install program "rtcm" you need to

- Copy RTCMModule.tar in a separate directory,
- Enter command "tar -xf RTCMModule.tar",
- Enter command "cd RTCMModule" to change into source code directory,
- Generate program "rtcm" by entering command "make".

A number of warnings concerning unused variables may be displayed
when compiling the software. Note that various parameters have
intentinally been introduced but are still unused in the code for
those interested in a further development of program "rtcm".


Usage Options
-------------
-p Additional decoding and print of message type 3 containing
   X,Y,Z coordinates of reference station
-t Additional print of epoch time


Usage Example
-------------

Command "rtcm -p -t" decodes a data stream coming in RTCM 2.x format.
Depending on the content of the data stream, it may lead to an output like:

Type01: 4       0       186     2640.0  9.660   0.124
Type01: 5       0       18      2640.0  17.740  0.122
Type01: 6       0       236     2640.0  6.280   0.126
Type01: 9       0       233     2640.0  17.000  0.128
Type01: 14      0       117     2640.0  16.680  0.120
Type01: 22      0       230     2640.0  -33.180 0.060
Type01: 24      0       211     2640.0  8.260   0.116
Type01: 30      0       63      2640.0  18.680  0.120
Type03:    4033461.020      23537.680    4924318.170
Z-Count:        2640.00       0.000000
Type18/19:  0  4 1387 146639   23819816.580          0.000   23819820.460    -306300.343    -306299.597  0  0
Type18/19:  0  5 1387 146639   20033021.480          0.000   20033024.440    -469646.405   -1613658.205  0  0
Type18/19:  0  6 1387 146639   24007617.620          0.000   24007622.700   -1201019.563   -1201017.291  0  0
Type18/19:  0  9 1387 146639   21917986.780          0.000   21917990.640    1486616.668    1486615.967  0  0
Type18/19:  0 14 1387 146639   21515398.500          0.000   21515400.780    -638135.753    -185850.236  0  0
Type18/19:  0 22 1387 146639   25514799.840          0.000   25514802.260     233472.251     245750.461  0  0
Type18/19:  0 24 1387 146639   24565176.140          0.000   24565180.840    -218288.048    -218287.140  0  0
Type18/19:  0 30 1387 146639   20805701.480          0.000   20805704.060    -724910.774   -1868922.951  0  0
Z-Count:        2642.00      -0.000000
Type18/19:  0  4 1387 146640   23819651.080          0.000   23819654.960    -306465.843    -306465.099  0  0
Type18/19:  0  5 1387 146640   20033164.860          0.000   20033167.800    -469503.040   -1613514.840  0  0
Type18/19:  0  6 1387 146640   24006920.420          0.000   24006925.500   -1201716.766   -1201714.495  0  0
Type18/19:  0  9 1387 146640   21918583.780          0.000   21918587.640    1487213.666    1487212.963  0  0
Type18/19:  0 14 1387 146640   21515311.880          0.000   21515314.160    -638222.373    -185936.858  0  0
Type18/19:  0 22 1387 146640   25515349.280          0.000   25515351.780     234021.718     246299.930  0  0
Type18/19:  0 24 1387 146640   24565230.400          0.000   24565235.100    -218233.781    -218232.876  0  0
Type18/19:  0 30 1387 146640   20805322.560          0.000   20805325.140    -725289.692   -1869301.870  0  0


Output Interpretation
---------------------

(1) Records beginning with "Type01:" contain information derived form
    message type 1. Parameters 1 to 6 are to be interpreted as:

 1 SVPRN 
 2 User Differential Range Error (UDRE):
   0 ... <= 1 m
   1 ...  > 1 m <= 4 m
   2 ...  > 4 m <= 8 m
   3 ...  > 8 m 
 3 Issue of Data (IOD)
 4 Z-Count
 5 Pseudo-Range Correction [m]
 6 Pseudo-Range Rate Correction [m/s]

(2) Records beginning with "Type03:" contain information derived form
    message type 3. Parameters 1 to 3 are to be interpreted as:

 1 X coordinate
 2 Y coordinate
 3 Z coordinate

(3) Records beginning with "Type18/19:" contain information derived form 
    message types 18 and 19. Parameters 1 to 11 are to be interpreted as:

 1 Station ID 
 2 SVPRN 
 3 GPSWeek
 4 GPS WeekSec
 5 CA Code on L1
 6 P Code on L1
 7 P Code on L2
 8 L1
 9 L2
10 SNR1
11 SNR2

(4) Records beginning with "Z-Count:" contain epoch time information.
    Columns 1 to 2 are to be interpreted as:

 1 Epoch time
 2 Clock error


Input
-----
To feed the RTCM decoder you need a real-time DGPS and/or RTK data stream.
This may be accessed using the "Networked Transport of RTCM via Internet
Protocol (Ntrip)" streaming format. To retrieve RTCM corrections via Ntrip,
you may like to use the NtripLinuxClient available from link below. It 
reads from an Ntrip Broadcaster and write to standard output so that you 
can pipe data into the RTCM decoder. 


Links
-----
Ntrip Protocol: http://igs.bkg.bund.de/index_ntrip.htm
Ntrip Software: http://igs.bkg.bund.de/index_ntrip_down.htm
Ntrip Broadcasters: http://www.rtcm-ntrip.org/home
EUREF-IP Ntrip Broadcaster: http://www.euref-ip.net/home
IGS-IP Ntrip Broadcaster: http://www.igs-ip.net/home


Author
------
Carsten Becker, DRL, Neustrelitz, February 2005, C/O <euref-ip@bkg.bund.de>

Modification
------------
Wolfgang Shne, BKG, Frankfurt, March 2005, <wolfgang.soehne@bkg.bund.de>
(added identifyer to distinguish between CA Code and P Code on L1)
Christian Waese, BKG, Frankfurt, August 2006, <euref-ip@bkg.bund.de>
(re-activated output of DGPS corrections: RTCM 2.x Message Type 1)

