Index: /trunk/BNC/bncephuser.cpp
===================================================================
--- /trunk/BNC/bncephuser.cpp	(revision 2910)
+++ /trunk/BNC/bncephuser.cpp	(revision 2911)
@@ -149,2 +149,61 @@
   }
 }
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void t_corr::readLine(const QString& line) {
+
+  QTextStream in(line.toAscii());
+
+  int     messageType;
+  int     updateInterval;
+  int     GPSweek;
+  double  GPSweeks;
+  QString prn;
+
+  in >> messageType >> updateInterval >> GPSweek >> GPSweeks >> prn;
+
+  tt.set(GPSweek, GPSweeks);
+
+  if      ( messageType == COTYPE_GPSCOMBINED    || 
+            messageType == COTYPE_GLONASSCOMBINED ) {
+    rao.ReSize(3);       rao       = 0.0;
+    dotRao.ReSize(3);    dotRao    = 0.0;
+    dotDotRao.ReSize(3); dotDotRao = 0.0;
+    dClk       = 0.0;
+    dotDClk    = 0.0;
+    dotDotDClk = 0.0;
+    in >> iod 
+       >> dClk       >> rao[0]       >> rao[1]       >> rao[2]
+       >> dotDClk    >> dotRao[0]    >> dotRao[1]    >> dotRao[2]
+       >> dotDotDClk >> dotDotRao[0] >> dotDotRao[1] >> dotDotRao[2];
+    dClk       /= t_CST::c;
+    dotDClk    /= t_CST::c;
+    dotDotDClk /= t_CST::c;
+    raoSet  = true;
+    dClkSet = true;
+  }
+  else if ( messageType == COTYPE_GPSORBIT    || 
+            messageType == COTYPE_GLONASSORBIT ) {
+    rao.ReSize(3);       rao       = 0.0;
+    dotRao.ReSize(3);    dotRao    = 0.0;
+    dotDotRao.ReSize(3); dotDotRao = 0.0;
+    in >> iod 
+      >> rao[0]       >> rao[1]       >> rao[2]
+      >> dotRao[0]    >> dotRao[1]    >> dotRao[2]
+      >> dotDotRao[0] >> dotDotRao[1] >> dotDotRao[2];
+    raoSet  = true;
+  }
+  else if ( messageType == COTYPE_GPSCLOCK    || 
+            messageType == COTYPE_GLONASSCLOCK ) {
+    int dummyIOD;
+    dClk       = 0.0;
+    dotDClk    = 0.0;
+    dotDotDClk = 0.0;
+    in >> dummyIOD >> dClk >> dotDClk >> dotDotDClk;
+    dClk       /= t_CST::c;
+    dotDClk    /= t_CST::c;
+    dotDotDClk /= t_CST::c;
+    dClkSet = true;
+  }
+}
Index: /trunk/BNC/bncephuser.h
===================================================================
--- /trunk/BNC/bncephuser.h	(revision 2910)
+++ /trunk/BNC/bncephuser.h	(revision 2911)
@@ -33,4 +33,8 @@
 #include "RTCM3/ephemeris.h"
 
+extern "C" {
+#include "clock_orbit_rtcm.h"
+}
+
 class t_corr {
  public:
@@ -40,4 +44,16 @@
   }
   bool ready() {return raoSet && dClkSet;}
+
+  static bool relevantMessageType(int msgType) {
+    return ( msgType == COTYPE_GPSCOMBINED     || 
+             msgType == COTYPE_GLONASSCOMBINED ||
+             msgType == COTYPE_GPSORBIT        ||
+             msgType == COTYPE_GPSCLOCK        ||
+             msgType == COTYPE_GLONASSORBIT    ||
+             msgType == COTYPE_GLONASSCLOCK );
+  }
+
+  void readLine(const QString& line);
+
   bncTime      tt;
   int          iod;
Index: /trunk/BNC/bncpppclient.cpp
===================================================================
--- /trunk/BNC/bncpppclient.cpp	(revision 2910)
+++ /trunk/BNC/bncpppclient.cpp	(revision 2911)
@@ -50,8 +50,4 @@
 #include "bncsettings.h"
 
-extern "C" {
-#include "clock_orbit_rtcm.h"
-}
-
 using namespace std;
 
@@ -280,5 +276,7 @@
   QListIterator<QString> it(corrList);
   while (it.hasNext()) {
-    QTextStream in(it.next().toAscii());
+    QString line = it.next();
+
+    QTextStream in(&line);
     int     messageType;
     int     updateInterval;
@@ -288,11 +286,5 @@
     in >> messageType >> updateInterval >> GPSweek >> GPSweeks >> prn;
 
-    if ( messageType == COTYPE_GPSCOMBINED     || 
-         messageType == COTYPE_GLONASSCOMBINED ||
-         messageType == COTYPE_GPSORBIT        ||
-         messageType == COTYPE_GPSCLOCK        ||
-         messageType == COTYPE_GLONASSORBIT    ||
-         messageType == COTYPE_GLONASSCLOCK ) {
-
+    if ( t_corr::relevantMessageType(messageType) ) {
       t_corr* cc = 0;
       if (_corr.contains(prn)) {
@@ -304,48 +296,6 @@
       }
 
-      cc->tt.set(GPSweek, GPSweeks);
-      _corr_tt.set(GPSweek, GPSweeks);
-
-      if      ( messageType == COTYPE_GPSCOMBINED    || 
-                messageType == COTYPE_GLONASSCOMBINED ) {
-        cc->rao.ReSize(3);       cc->rao       = 0.0;
-        cc->dotRao.ReSize(3);    cc->dotRao    = 0.0;
-        cc->dotDotRao.ReSize(3); cc->dotDotRao = 0.0;
-        cc->dClk       = 0.0;
-        cc->dotDClk    = 0.0;
-        cc->dotDotDClk = 0.0;
-        in >> cc->iod 
-           >> cc->dClk       >> cc->rao[0]       >> cc->rao[1]       >> cc->rao[2]
-           >> cc->dotDClk    >> cc->dotRao[0]    >> cc->dotRao[1]    >> cc->dotRao[2]
-           >> cc->dotDotDClk >> cc->dotDotRao[0] >> cc->dotDotRao[1] >> cc->dotDotRao[2];
-        cc->dClk       /= t_CST::c;
-        cc->dotDClk    /= t_CST::c;
-        cc->dotDotDClk /= t_CST::c;
-        cc->raoSet  = true;
-        cc->dClkSet = true;
-      }
-      else if ( messageType == COTYPE_GPSORBIT    || 
-                messageType == COTYPE_GLONASSORBIT ) {
-        cc->rao.ReSize(3);       cc->rao       = 0.0;
-        cc->dotRao.ReSize(3);    cc->dotRao    = 0.0;
-        cc->dotDotRao.ReSize(3); cc->dotDotRao = 0.0;
-        in >> cc->iod 
-          >> cc->rao[0]       >> cc->rao[1]       >> cc->rao[2]
-          >> cc->dotRao[0]    >> cc->dotRao[1]    >> cc->dotRao[2]
-          >> cc->dotDotRao[0] >> cc->dotDotRao[1] >> cc->dotDotRao[2];
-        cc->raoSet  = true;
-      }
-      else if ( messageType == COTYPE_GPSCLOCK    || 
-                messageType == COTYPE_GLONASSCLOCK ) {
-        int dummyIOD;
-        cc->dClk       = 0.0;
-        cc->dotDClk    = 0.0;
-        cc->dotDotDClk = 0.0;
-        in >> dummyIOD >> cc->dClk >> cc->dotDClk >> cc->dotDotDClk;
-        cc->dClk       /= t_CST::c;
-        cc->dotDClk    /= t_CST::c;
-        cc->dotDotDClk /= t_CST::c;
-        cc->dClkSet = true;
-      }
+      cc->readLine(line);
+      _corr_tt = cc->tt;
     }
     else if ( messageType == BTYPE_GPS ) { 
