Index: /trunk/BNC/RTCM3/rtcm3torinex.c
===================================================================
--- /trunk/BNC/RTCM3/rtcm3torinex.c	(revision 522)
+++ /trunk/BNC/RTCM3/rtcm3torinex.c	(revision 523)
@@ -1,5 +1,5 @@
 /*
   Converter for RTCM3 data to RINEX.
-  $Id: rtcm3torinex.c,v 1.24 2007/10/08 13:29:45 stoecker Exp $
+  $Id: rtcm3torinex.c,v 1.5 2007/10/17 06:12:00 mervart Exp $
   Copyright (C) 2005-2006 by Dirk Stoecker <stoecker@alberding.eu>
 
@@ -51,5 +51,5 @@
 
 /* CVS revision and version */
-static char revisionstr[] = "$Revision: 1.24 $";
+static char revisionstr[] = "$Revision: 1.5 $";
 
 #ifndef COMPILEDATE
@@ -236,5 +236,5 @@
 }
 
-static void updatetime(int *week, int *tow, int tk, int fixnumleap)
+void updatetime(int *week, int *tow, int tk, int fixnumleap)
 {
   int y,m,d,k,l, nul;
@@ -776,5 +776,5 @@
 };
 
-static void converttime(struct converttimeinfo *c, int week, int tow)
+void converttime(struct converttimeinfo *c, int week, int tow)
 {
   int i, k, doy, j; /* temporary variables */
@@ -1534,5 +1534,5 @@
 
 #ifndef NO_RTCM3_MAIN
-static char datestr[]     = "$Date: 2007/10/08 13:29:45 $";
+static char datestr[]     = "$Date: 2007/10/17 06:12:00 $";
 
 /* The string, which is send as agent in HTTP request */
Index: /trunk/BNC/bncapp.cpp
===================================================================
--- /trunk/BNC/bncapp.cpp	(revision 522)
+++ /trunk/BNC/bncapp.cpp	(revision 523)
@@ -48,4 +48,19 @@
 
 using namespace std;
+
+struct converttimeinfo {
+  int second;    /* seconds of GPS time [0..59] */
+  int minute;    /* minutes of GPS time [0..59] */
+  int hour;      /* hour of GPS time [0..24] */
+  int day;       /* day of GPS time [1..28..30(31)*/
+  int month;     /* month of GPS time [1..12]*/
+  int year;      /* year of GPS time [1980..] */
+};
+
+extern "C" {
+  void converttime(struct converttimeinfo *c, int week, int tow);
+  void updatetime(int *week, int *tow, int tk, int fixnumleap);
+}
+
 
 // Constructor
@@ -256,6 +271,13 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncApp::printGlonassEph(glonassephemeris* ep) {
+
   if (_ephStream) {
-    *_ephStream << "GLONASS: "  << ep->almanac_number << endl;
+
+    int w = ep->GPSWeek, tow = ep->GPSTOW, i;
+    struct converttimeinfo cti;
+
+    updatetime(&w, &tow, ep->tb*1000, 1);
+    converttime(&cti, w, tow);
+
     _ephStream->flush();
   }
