Index: trunk/BNC/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/combination/bnccomb.cpp	(revision 3431)
+++ trunk/BNC/combination/bnccomb.cpp	(revision 3432)
@@ -196,5 +196,5 @@
     delete _params[iPar-1];
   }
-  QListIterator<cmbCorr*> itCorr(_corrs);
+  QVectorIterator<cmbCorr*> itCorr(_corrs);
   while (itCorr.hasNext()) {
     delete itCorr.next();
@@ -281,5 +281,5 @@
   // ---------------------------
   cmbCorr* existingCorr = 0;
-  QListIterator<cmbCorr*> itCorr(_corrs);
+  QVectorIterator<cmbCorr*> itCorr(_corrs);
   while (itCorr.hasNext()) {
     cmbCorr* hlp = itCorr.next();
@@ -379,5 +379,5 @@
   QMap<QString, t_corr*> resCorr;
 
-  QListIterator<cmbCorr*> itCorr(_corrs);
+  QVectorIterator<cmbCorr*> itCorr(_corrs);
   while (itCorr.hasNext()) {
     cmbCorr* corr = itCorr.next();
@@ -429,5 +429,7 @@
   SymmetricMatrix QQ_sav = _QQ;
 
-  //  for (int ii = 1; ii < 10; ii++) {
+  // Update and outlier detection loop
+  // ---------------------------------
+  for (int ii = 1; ii < 10; ii++) {
     bncModel::kalman(AA, ll, PP, _QQ, dx);
     ColumnVector vv = ll - AA * dx;
@@ -438,30 +440,32 @@
     out.setRealNumberPrecision(3);  
     out << _resTime.datestr().c_str() << " " << _resTime.timestr().c_str()
-        << " Maximum Residuum " << maxRes << ' ' << endl;
-//        << llInfo[maxResIndex-1].AC << ' ' << llInfo[maxResIndex-1].prn;
-//
-//    if (maxRes > _MAXRES) {
-//      for (int iPar = 1; iPar <= _params.size(); iPar++) {
-//        cmbParam* pp = _params[iPar-1];
-//        if (pp->type == cmbParam::offACSat     && 
-//            pp->AC   == llInfo[maxResIndex-1].AC &&
-//            pp->prn  == llInfo[maxResIndex-1].prn) { 
-//          QQ_sav.Row(iPar)    = 0.0;
-//          QQ_sav.Column(iPar) = 0.0;
-//          QQ_sav(iPar,iPar)   = pp->sig_0 * pp->sig_0;
-//        }
-//      }
-//
-//      out << "  Outlier" << endl;
-//      _QQ = QQ_sav;
-//      AA.Row(maxResIndex) = 0.0;
-//      ll.Row(maxResIndex) = 0.0;
-//    }
-//    else {
-//      out << "  OK" << endl;
-//      break;
-//    }
-//  }
-
+        << " Maximum Residuum " << maxRes << ' '
+        << _corrs[maxResIndex-1]->acName << ' ' << _corrs[maxResIndex-1]->prn;
+
+    if (maxRes > _MAXRES) {
+      for (int iPar = 1; iPar <= _params.size(); iPar++) {
+        cmbParam* pp = _params[iPar-1];
+        if (pp->type == cmbParam::offACSat            && 
+            pp->AC   == _corrs[maxResIndex-1]->acName &&
+            pp->prn  == _corrs[maxResIndex-1]->prn) { 
+          QQ_sav.Row(iPar)    = 0.0;
+          QQ_sav.Column(iPar) = 0.0;
+          QQ_sav(iPar,iPar)   = pp->sig_0 * pp->sig_0;
+        }
+      }
+
+      out << "  Outlier" << endl;
+      _QQ = QQ_sav;
+      AA.Row(maxResIndex) = 0.0;
+      ll.Row(maxResIndex) = 0.0;
+    }
+    else {
+      out << "  OK" << endl;
+      break;
+    }
+  }
+
+  // Update Parameter Values
+  // -----------------------
   for (int iPar = 1; iPar <= _params.size(); iPar++) {
     cmbParam* pp = _params[iPar-1];
@@ -482,4 +486,6 @@
   }
 
+  // Print Results
+  // -------------
   printResults(out, resCorr);
   dumpResults(resCorr);
@@ -487,5 +493,7 @@
   emit newMessage(_log, false);
 
-  QListIterator<cmbCorr*> it(_corrs);
+  // Delete Data
+  // -----------
+  QVectorIterator<cmbCorr*> it(_corrs);
   while (it.hasNext()) {
     delete it.next();
Index: trunk/BNC/combination/bnccomb.h
===================================================================
--- trunk/BNC/combination/bnccomb.h	(revision 3431)
+++ trunk/BNC/combination/bnccomb.h	(revision 3432)
@@ -63,5 +63,5 @@
   bncTime            _resTime;
   QVector<cmbParam*> _params;
-  QList<cmbCorr*>    _corrs;
+  QVector<cmbCorr*>  _corrs;
   bncRtnetDecoder*   _rtnetDecoder;
   SymmetricMatrix    _QQ;
