Index: trunk/rtcm3torinex/rtcm3torinex.c
===================================================================
--- trunk/rtcm3torinex/rtcm3torinex.c	(revision 1097)
+++ trunk/rtcm3torinex/rtcm3torinex.c	(revision 1237)
@@ -1,5 +1,5 @@
 /*
   Converter for RTCM3 data to RINEX.
-  $Id: rtcm3torinex.c,v 1.32 2008/09/02 07:45:48 stoecker Exp $
+  $Id: rtcm3torinex.c,v 1.19 2008/11/18 08:57:51 weber Exp $
   Copyright (C) 2005-2008 by Dirk Stöcker <stoecker@alberding.eu>
 
@@ -51,5 +51,5 @@
 
 /* CVS revision and version */
-static char revisionstr[] = "$Revision: 1.32 $";
+static char revisionstr[] = "$Revision: 1.19 $";
 
 #ifndef COMPILEDATE
@@ -176,4 +176,14 @@
 
 #define SKIPBITS(b) { LOADBITS(b) numbits -= (b); }
+
+/* extract byte-aligned byte from data stream,
+   b = variable to store size, s = variable to store string pointer */
+#define GETSTRING(b, s) \
+{ \
+  b = *(data++); \
+  s = (char *) data; \
+  data += b; \
+  size -= b+1; \
+}
 
 struct leapseconds { /* specify the day of leap second */
@@ -273,5 +283,9 @@
   int ret=0;
 
+#ifdef NO_RTCM3_MAIN
+  if(GetMessage(handle)) /* don't repeat */
+#else
   while(!ret && GetMessage(handle))
+#endif /* NO_RTCM3_MAIN */
   {
     /* using 64 bit integer types, as it is much easier than handling
@@ -284,9 +298,38 @@
     GETBITS(type,12)
 #ifdef NO_RTCM3_MAIN
-    handle->typeList[handle->typeSize] = type;           /* RTCM message types */
-    if(handle->typeSize < 100) {handle->typeSize += 1;}  /* RTCM message types */
+    handle->blocktype = type;
 #endif /* NO_RTCM3_MAIN */
     switch(type)
     {
+#ifdef NO_RTCM3_MAIN
+    default:
+      ret = type;
+      break;
+    case 1005: case 1006:
+      {
+        SKIPBITS(22)
+        GETBITSSIGN(handle->antX, 38)
+        SKIPBITS(2)
+        GETBITSSIGN(handle->antY, 38)
+        SKIPBITS(2)
+        GETBITSSIGN(handle->antZ, 38)
+        if(type == 1006)
+          GETBITS(handle->antH, 16)
+        ret = type;
+      }
+      break;
+    case 1007: case 1008: case 1033:
+      {
+        char *antenna;
+        int antnum;
+
+        SKIPBITS(12)
+        GETSTRING(antnum,antenna)
+        memcpy(handle->antenna, antenna, antnum);
+        handle->antenna[antnum] = 0;
+        ret = type;
+      }
+      break;
+#endif /* NO_RTCM3_MAIN */
     case 1019:
       {
@@ -1622,5 +1665,5 @@
 
 #ifndef NO_RTCM3_MAIN
-static char datestr[]     = "$Date: 2008/09/02 07:45:48 $";
+static char datestr[]     = "$Date: 2008/11/18 08:57:51 $";
 
 /* The string, which is send as agent in HTTP request */
Index: trunk/rtcm3torinex/rtcm3torinex.h
===================================================================
--- trunk/rtcm3torinex/rtcm3torinex.h	(revision 1097)
+++ trunk/rtcm3torinex/rtcm3torinex.h	(revision 1237)
@@ -4,5 +4,5 @@
 /*
   Converter for RTCM3 data to RINEX.
-  $Id: rtcm3torinex.h,v 1.8 2008/09/02 07:45:48 stoecker Exp $
+  $Id: rtcm3torinex.h,v 1.14 2008/11/10 18:07:35 weber Exp $
   Copyright (C) 2005-2006 by Dirk Stöcker <stoecker@alberding.eu>
 
@@ -195,6 +195,10 @@
   int    lastlockl2[64];
 #ifdef NO_RTCM3_MAIN
-  int    typeSize;       /* RTCM message types */
-  int    typeList[101];  /* RTCM message types */
+  double antX;
+  double antY;
+  double antZ;
+  double antH;
+  char   antenna[256+1];
+  int    blocktype;
 #endif /* NO_RTCM3_MAIN */
   int    datapos[RINEXENTRY_NUMBER];
