Index: /trunk/BNS/bns.cpp
===================================================================
--- /trunk/BNS/bns.cpp	(revision 2290)
+++ /trunk/BNS/bns.cpp	(revision 2291)
@@ -400,8 +400,14 @@
         co.SatRefDatum       = DATUM_ITRF;
       
+        struct Bias bias;
+        memset(&bias, 0, sizeof(bias));
+        bias.GPSEpochTime      = (int)GPSweeks;
+        bias.GLONASSEpochTime  = (int)fmod(GPSweeks, 86400.0) 
+                               + 3 * 3600 - gnumleap(year, month, day);
+
         for (int ii = 0; ii < lines.size(); ii++) {
 
           QString      prn;
-          ColumnVector xx(8); xx = 0.0;
+          ColumnVector xx(10); xx = 0.0;
           t_eph*       ep = 0;
       
@@ -412,5 +418,5 @@
             if ( _ephList.contains(prn) ) {
               in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5) 
-                 >> xx(6) >> xx(7) >> xx(8);
+                 >> xx(6) >> xx(7) >> xx(8) >> xx(9) >> xx(10);
               xx(1) *= 1e3;     // x-crd
               xx(2) *= 1e3;     // y-crd
@@ -419,4 +425,5 @@
               xx(5) *= 1e-6;    // rel. corr.
                                 // xx(6), xx(7), xx(8) ... PhaseCent - CoM
+                                // xx(9) P1-C1 DCB, xx(1) P1-P2 DCB
 
               t_ephPair* pair = _ephList[prn];
@@ -457,4 +464,18 @@
               _caster.at(ic)->printAscii(outLine);
             }
+
+            struct Bias::BiasSat* biasSat = 0;
+            if      (prn[0] == 'G') {
+              biasSat = bias.Sat + bias.NumberOfGPSSat;
+              ++bias.NumberOfGPSSat;
+            }
+            else if (prn[0] == 'R') {
+              biasSat = bias.Sat + CLOCKORBIT_NUMGPS + bias.NumberOfGLONASSSat;
+              ++bias.NumberOfGLONASSSat;
+            }
+
+            if (biasSat) {
+              //// TODO: fill biasSat structure
+            }
           }
         }
@@ -472,4 +493,17 @@
 
           int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
+          if (len > 0) {
+            if (_caster.at(ic)->ic() == 1) { emit(newOutBytes1(len));}
+            if (_caster.at(ic)->ic() == 2) { emit(newOutBytes2(len));}
+            if (_caster.at(ic)->ic() == 3) { emit(newOutBytes3(len));}
+            _caster.at(ic)->write(obuffer, len);
+          }
+        }
+
+        if ( _caster.at(ic)->usedSocket() && 
+             (bias.NumberOfGPSSat > 0 || bias.NumberOfGLONASSSat > 0) ) {
+          char obuffer[CLOCKORBIT_BUFFERSIZE];
+
+          int len = MakeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
           if (len > 0) {
             if (_caster.at(ic)->ic() == 1) { emit(newOutBytes1(len));}
