Index: /trunk/BNC/src/PPP/pppThread.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppThread.cpp	(revision 5839)
+++ /trunk/BNC/src/PPP/pppThread.cpp	(revision 5840)
@@ -104,4 +104,9 @@
     connect(BNC_CORE, SIGNAL(newCorrections(QStringList)),
             this, SLOT(slotNewCorrections(QStringList)));
+
+    for (unsigned iPrn = 0; iPrn <= t_prn::MAXPRN; iPrn++) {
+      _lastOrbCorrIOD[iPrn]   = -1;
+      _lastClkCorrValue[iPrn] = 0.0;
+    }
 
     _pppClient = new t_pppClient(_opt);
@@ -279,5 +284,4 @@
                messageType == COTYPE_GPSORBIT    || messageType == COTYPE_GLONASSORBIT    ) {
         t_orbCorr* cc = new t_orbCorr();
-        orbCorr.push_back(cc);
         cc->_prn.set(corr.prn.toAscii().data());
         cc->_iod       = corr.iod;
@@ -290,9 +294,12 @@
         cc->_dotXr[0]  = corr.dotRao[1]; 
         cc->_dotXr[0]  = corr.dotRao[2]; 
+        cout << "ORB: " << cc->_prn.toString() << ' ' << cc->_iod << endl;
+        orbCorr.push_back(cc);
+
+        _lastOrbCorrIOD[cc->_prn.toInt()] = cc->_iod;
       }
       else if (messageType == COTYPE_GPSCOMBINED || messageType == COTYPE_GLONASSCOMBINED ||
                messageType == COTYPE_GPSCLOCK    || messageType == COTYPE_GLONASSCLOCK    ) {
         t_clkCorr* cc = new t_clkCorr();
-        clkCorr.push_back(cc);        
         cc->_prn.set(corr.prn.toAscii().data());
         cc->_iod         = corr.iod;
@@ -302,4 +309,18 @@
         cc->_dotDotDClk  = corr.dotDotDClk;
         cc->_clkPartial  = 0.0;
+        if (messageType == COTYPE_GPSCLOCK || messageType == COTYPE_GLONASSCLOCK) {
+          int lastIOD = _lastOrbCorrIOD[cc->_prn.toInt()];
+          if (lastIOD != -1) {
+            cc->_iod = lastIOD;
+          }
+          else {
+            delete cc;
+            cc = 0;
+          }
+        }
+        if (cc) {
+          cout << "CLK: " << cc->_prn.toString() << ' ' << cc->_iod << endl;
+          clkCorr.push_back(cc);        
+        }
       }
     }
Index: /trunk/BNC/src/PPP/pppThread.h
===================================================================
--- /trunk/BNC/src/PPP/pppThread.h	(revision 5839)
+++ /trunk/BNC/src/PPP/pppThread.h	(revision 5840)
@@ -45,4 +45,6 @@
   t_pppClient*           _pppClient;
   std::deque<t_epoData*> _epoData;
+  int                    _lastOrbCorrIOD[t_prn::MAXPRN+1];
+  double                 _lastClkCorrValue[t_prn::MAXPRN+1];
 };
 
