Index: trunk/rtcm3torinex/lib/rtcm3torinex.h
===================================================================
--- trunk/rtcm3torinex/lib/rtcm3torinex.h	(revision 4374)
+++ trunk/rtcm3torinex/lib/rtcm3torinex.h	(revision 4417)
@@ -5,5 +5,5 @@
   Converter for RTCM3 data to RINEX.
   $Id$
-  Copyright (C) 2005-2006 by Dirk Stöcker <stoecker@alberding.eu>
+  Copyright (C) 2005-2012 by Dirk Stöcker <stoecker@alberding.eu>
 
   This program is free software; you can redistribute it and/or modify
@@ -66,13 +66,24 @@
 #define GNSSENTRY_SNR     3
 
-#define GNSSENTRY_C1DATA     ((0<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L1CDATA    ((0<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D1CDATA    ((0<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S1CDATA    ((0<<2)+GNSSENTRY_SNR)
-
-#define GNSSENTRY_C2DATA     ((1<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L2CDATA    ((1<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D2CDATA    ((1<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S2CDATA    ((1<<2)+GNSSENTRY_SNR)
+#define GNSSENTRY_TYPEC1    (0<<2)
+#define GNSSENTRY_TYPEC2    (1<<2)
+#define GNSSENTRY_TYPEP1    (2<<2)
+#define GNSSENTRY_TYPEP2    (3<<2)
+#define GNSSENTRY_TYPEC5    (4<<2)
+#define GNSSENTRY_TYPEC6    (5<<2)
+#define GNSSENTRY_TYPEC5B   (6<<2)
+#define GNSSENTRY_TYPEC5AB  (7<<2)
+#define GNSSENTRY_TYPECSAIF (8<<2)
+#define GNSSENTRY_TYPEC1N   (9<<2)
+
+#define GNSSENTRY_C1DATA     (GNSSENTRY_TYPEC1+GNSSENTRY_CODE)
+#define GNSSENTRY_L1CDATA    (GNSSENTRY_TYPEC1+GNSSENTRY_PHASE)
+#define GNSSENTRY_D1CDATA    (GNSSENTRY_TYPEC1+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S1CDATA    (GNSSENTRY_TYPEC1+GNSSENTRY_SNR)
+
+#define GNSSENTRY_C2DATA     (GNSSENTRY_TYPEC2+GNSSENTRY_CODE)
+#define GNSSENTRY_L2CDATA    (GNSSENTRY_TYPEC2+GNSSENTRY_PHASE)
+#define GNSSENTRY_D2CDATA    (GNSSENTRY_TYPEC2+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S2CDATA    (GNSSENTRY_TYPEC2+GNSSENTRY_SNR)
 
 #define GNSSENTRY_CB1DATA    GNSSENTRY_C2DATA
@@ -81,23 +92,23 @@
 #define GNSSENTRY_SB1DATA    GNSSENTRY_S2CDATA
 
-#define GNSSENTRY_P1DATA     ((2<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L1PDATA    ((2<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D1PDATA    ((2<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S1PDATA    ((2<<2)+GNSSENTRY_SNR)
-
-#define GNSSENTRY_P2DATA     ((3<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L2PDATA    ((3<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D2PDATA    ((3<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S2PDATA    ((3<<2)+GNSSENTRY_SNR)
-
-#define GNSSENTRY_C5DATA     ((4<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L5DATA     ((4<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D5DATA     ((4<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S5DATA     ((4<<2)+GNSSENTRY_SNR)
-
-#define GNSSENTRY_C6DATA     ((5<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L6DATA     ((5<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D6DATA     ((5<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S6DATA     ((5<<2)+GNSSENTRY_SNR)
+#define GNSSENTRY_P1DATA     (GNSSENTRY_TYPEP1+GNSSENTRY_CODE)
+#define GNSSENTRY_L1PDATA    (GNSSENTRY_TYPEP1+GNSSENTRY_PHASE)
+#define GNSSENTRY_D1PDATA    (GNSSENTRY_TYPEP1+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S1PDATA    (GNSSENTRY_TYPEP1+GNSSENTRY_SNR)
+
+#define GNSSENTRY_P2DATA     (GNSSENTRY_TYPEP2+GNSSENTRY_CODE)
+#define GNSSENTRY_L2PDATA    (GNSSENTRY_TYPEP2+GNSSENTRY_PHASE)
+#define GNSSENTRY_D2PDATA    (GNSSENTRY_TYPEP2+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S2PDATA    (GNSSENTRY_TYPEP2+GNSSENTRY_SNR)
+
+#define GNSSENTRY_C5DATA     (GNSSENTRY_TYPEC5+GNSSENTRY_CODE)
+#define GNSSENTRY_L5DATA     (GNSSENTRY_TYPEC5+GNSSENTRY_PHASE)
+#define GNSSENTRY_D5DATA     (GNSSENTRY_TYPEC5+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S5DATA     (GNSSENTRY_TYPEC5+GNSSENTRY_SNR)
+
+#define GNSSENTRY_C6DATA     (GNSSENTRY_TYPEC6+GNSSENTRY_CODE)
+#define GNSSENTRY_L6DATA     (GNSSENTRY_TYPEC6+GNSSENTRY_PHASE)
+#define GNSSENTRY_D6DATA     (GNSSENTRY_TYPEC6+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S6DATA     (GNSSENTRY_TYPEC6+GNSSENTRY_SNR)
 
 #define GNSSENTRY_CB3DATA    GNSSENTRY_C6DATA
@@ -111,8 +122,8 @@
 #define GNSSENTRY_SLEXDATA   GNSSENTRY_S6DATA
 
-#define GNSSENTRY_C5BDATA    ((6<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L5BDATA    ((6<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D5BDATA    ((6<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S5BDATA    ((6<<2)+GNSSENTRY_SNR)
+#define GNSSENTRY_C5BDATA    (GNSSENTRY_TYPEC5B+GNSSENTRY_CODE)
+#define GNSSENTRY_L5BDATA    (GNSSENTRY_TYPEC5B+GNSSENTRY_PHASE)
+#define GNSSENTRY_D5BDATA    (GNSSENTRY_TYPEC5B+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S5BDATA    (GNSSENTRY_TYPEC5B+GNSSENTRY_SNR)
 
 #define GNSSENTRY_CB2DATA    GNSSENTRY_C5BDATA
@@ -121,18 +132,18 @@
 #define GNSSENTRY_SB2DATA    GNSSENTRY_S5BDATA
 
-#define GNSSENTRY_C5ABDATA   ((7<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L5ABDATA   ((7<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D5ABDATA   ((7<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S5ABDATA   ((7<<2)+GNSSENTRY_SNR)
-
-#define GNSSENTRY_CSAIFDATA  ((8<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_LSAIFDATA  ((8<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_DSAIFDATA  ((8<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_SSAIFDATA  ((8<<2)+GNSSENTRY_SNR)
-
-#define GNSSENTRY_C1NDATA    ((9<<2)+GNSSENTRY_CODE)
-#define GNSSENTRY_L1NDATA    ((9<<2)+GNSSENTRY_PHASE)
-#define GNSSENTRY_D1NDATA    ((9<<2)+GNSSENTRY_DOPPLER)
-#define GNSSENTRY_S1NDATA    ((9<<2)+GNSSENTRY_SNR)
+#define GNSSENTRY_C5ABDATA   (GNSSENTRY_TYPEC5AB+GNSSENTRY_CODE)
+#define GNSSENTRY_L5ABDATA   (GNSSENTRY_TYPEC5AB+GNSSENTRY_PHASE)
+#define GNSSENTRY_D5ABDATA   (GNSSENTRY_TYPEC5AB+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S5ABDATA   (GNSSENTRY_TYPEC5AB+GNSSENTRY_SNR)
+
+#define GNSSENTRY_CSAIFDATA  (GNSSENTRY_TYPECSAIF+GNSSENTRY_CODE)
+#define GNSSENTRY_LSAIFDATA  (GNSSENTRY_TYPECSAIF+GNSSENTRY_PHASE)
+#define GNSSENTRY_DSAIFDATA  (GNSSENTRY_TYPECSAIF+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_SSAIFDATA  (GNSSENTRY_TYPECSAIF+GNSSENTRY_SNR)
+
+#define GNSSENTRY_C1NDATA    (GNSSENTRY_TYPEC1N+GNSSENTRY_CODE)
+#define GNSSENTRY_L1NDATA    (GNSSENTRY_TYPEC1N+GNSSENTRY_PHASE)
+#define GNSSENTRY_D1NDATA    (GNSSENTRY_TYPEC1N+GNSSENTRY_DOPPLER)
+#define GNSSENTRY_S1NDATA    (GNSSENTRY_TYPEC1N+GNSSENTRY_SNR)
 
 #define GNSSENTRY_NUMBER     40 /* number of types!!! */
