Index: /trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppClient.cpp	(revision 9526)
+++ /trunk/BNC/src/PPP/pppClient.cpp	(revision 9527)
@@ -617,4 +617,5 @@
         else {
           LOG << "t_pppFilter::datumTransformation() == success" << endl;
+          _filter->rememberState(1);
         }
       }
@@ -648,6 +649,6 @@
         if (_obsPool->refSatChanged()) {
           LOG << "t_pppFilter: refSatChanged()" << endl;
-            epochReProcessing = true;
-            continue;
+          epochReProcessing = true;
+          continue;
         }
       }
@@ -682,8 +683,10 @@
         epochReProcessing = true;
         _obsPool->deleteLastEpoch();
+        _filter->restoreState(0);
         setHistoricalRefSats();
       }
       else {
         epochReProcessing = false;
+        _filter->rememberState(0);
       }
 
@@ -879,5 +882,5 @@
   t_pppObsPool::t_epoch* epoch = _obsPool->lastEpoch();
   const QMap<char, t_pppRefSat*>& refSatMapLastEpoch = epoch->refSatMap();
-  
+
   QMapIterator<char, t_pppRefSat*> it(_refSatMap);
   while (it.hasNext()) {
Index: /trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.cpp	(revision 9526)
+++ /trunk/BNC/src/PPP/pppFilter.cpp	(revision 9527)
@@ -73,10 +73,4 @@
 
   const QMap<char, t_pppRefSat*>& refSatMap = epoch->refSatMap();
-
-  if (OPT->_obsModelType == OPT->DCMcodeBias ||
-      OPT->_obsModelType == OPT->DCMphaseBias) {
-    rememberState();
-  }
-
   //--
   // Set Parameters
@@ -85,8 +79,11 @@
   }
 
+  if (OPT->_obsModelType == OPT->DCMcodeBias ||
+      OPT->_obsModelType == OPT->DCMphaseBias) {
 #ifdef BNC_DEBUG_PPP
-  _parlist.printParams();
+  LOG << "processEpoch: printParams after set" << endl;
+  _parlist.printParams(_epoTime);
 #endif
-
+  }
   // Status Vector, Variance-Covariance Matrix
   // -----------------------------------------
@@ -94,5 +91,4 @@
   SymmetricMatrix QFltOld = _QFlt;
   setStateVectorAndVarCovMatrix(xFltOld, QFltOld);
-
 
   // Pre-Process Satellite Systems separately
@@ -122,4 +118,5 @@
         _xFlt = xFltOld;
         _QFlt = QFltOld;
+        restoreState(2);
         return failure;
       }
@@ -130,5 +127,4 @@
       _xFlt = xFltOld;
       _QFlt = QFltOld;
-      restoreState();
       return success;
     }
@@ -709,5 +705,5 @@
   // =============================================================
   if (resetRefSatellitesLastEpoch(allObs, refSatMap, refSatMapLastEpoch) != true) {
-    LOG  << "refsatChange required" << endl;
+    LOG  << "datumTransformation: refsatChange required" << endl;
     return success;
   }
@@ -724,5 +720,6 @@
 
 #ifdef BNC_DEBUG_PPP
-  _parlist.printParams();
+  LOG << "datumTransformation: printParams after set" << endl;
+  _parlist.printParams(_epoTime);
 #endif
 
@@ -812,6 +809,6 @@
   // ====================
 #ifdef BNC_DEBUG_PPP
-      LOG << "AA1\n"; _datumTrafo->printMatrix(_datumTrafo->AA1(), _datumTrafo->numObs(), _datumTrafo->numPar());
-      LOG << "AA2\n"; _datumTrafo->printMatrix(_datumTrafo->AA2(), _datumTrafo->numObs(), _datumTrafo->numPar());
+      //LOG << "AA1\n"; _datumTrafo->printMatrix(_datumTrafo->AA1(), _datumTrafo->numObs(), _datumTrafo->numPar());
+      //LOG << "AA2\n"; _datumTrafo->printMatrix(_datumTrafo->AA2(), _datumTrafo->numObs(), _datumTrafo->numPar());
 #endif
   if(_datumTrafo->computeTrafoMatrix() != success) {
@@ -828,6 +825,6 @@
 
 #ifdef BNC_DEBUG_PPP
-  LOG << "xFltOld:\n" << xFltOld << endl;
-  LOG << "xFlt   :\n" << _xFlt   << endl;
+  //LOG << "xFltOld:\n" << xFltOld << endl;
+  //LOG << "xFlt   :\n" << _xFlt   << endl;
 #endif
 
@@ -853,6 +850,4 @@
 
   _obsPool->putEpoch(_epoTime, allObs, peseudoObsIono, refSatMap);
-
-  rememberState();
 
   return success;
Index: /trunk/BNC/src/PPP/pppFilter.h
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.h	(revision 9526)
+++ /trunk/BNC/src/PPP/pppFilter.h	(revision 9527)
@@ -29,9 +29,9 @@
   void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs, bool pseudoObsIono);
   unsigned setTrafoObs();
-  void restoreState()  {    LOG << "restore parameter from last epoch: _parlist = _parlist_old" << endl;
+  void restoreState(int num)  {    LOG << "Restore parameter from last epoch    : _parlist = _parlist_sav ("<<  num << ")\n";
     _QFlt    = _QFlt_sav;
     _parlist = _parlist_sav;
   }
-  void rememberState() {    LOG << "Remember parameters from epoch before: _parlist_old = _parlist" << endl;
+  void rememberState(int num) {    LOG << "Remember parameters from epoch before: _parlist_sav = _parlist ("<<  num << ")\n";
     _QFlt_sav    = _QFlt;
     _parlist_sav = _parlist;
@@ -128,5 +128,5 @@
       _D21.ReSize(_numPar, _numPar); _D21 = 0.0;
     }
-    t_irc prepareAA(const Matrix& AA, int ind) {
+    t_irc prepareAA(const Matrix& AA, int ind) {//LOG << "prepare AA" << ind << "\n";
       Matrix* Prep = &_AA2;
       if (ind == 1) {
Index: /trunk/BNC/src/PPP/pppParlist.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppParlist.cpp	(revision 9526)
+++ /trunk/BNC/src/PPP/pppParlist.cpp	(revision 9527)
@@ -452,6 +452,5 @@
         char sys = par->prn().system();
         t_prn refPrn = (refSatMap[sys])->prn();
-        if (par->lastObsTime().valid() &&
-            ((epoTime - par->lastObsTime() > 1.0) || (par->prn() == refPrn))) {
+        if (par->lastObsTime().valid() && par->prn() == refPrn) {
             remove = true;
         }
@@ -465,19 +464,11 @@
 
     else if (par->type() == t_pppParam::ion) {
-      if (OPT->_obsModelType == OPT->DCMcodeBias ||
-          OPT->_obsModelType == OPT->DCMphaseBias) {
-        if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 1.0)) {
-            remove = true;
-        }
-      }
-      else {
-        if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {
-            remove = true;
-        }
+      if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {
+          remove = true;
       }
     }
     if (remove) {
 #ifdef BNC_DEBUG_PPP
-      LOG << "remove " << par->toString() << std::endl;
+      LOG << "remove0 " << par->toString() << std::endl;
 #endif
       delete par;
@@ -513,19 +504,36 @@
   }
 
-  // Check if ambiguity parameters have observations
-  // -----------------------------------------------
+
   if (OPT->_obsModelType == OPT->DCMcodeBias ||
       OPT->_obsModelType == OPT->DCMphaseBias) {
+    // Check if ambiguity parameters have observations
+    // -----------------------------------------------
     vector<t_pppParam*>::iterator it = _params.begin();
+    QList<t_prn> lostSats;
     while (it != _params.end()) {
       t_pppParam* par = *it;
-      bool remove = false;
-      if (par->type() == t_pppParam::amb && !par->lastObsTime().valid()) {
-        remove = true;
-      }
-      if (remove) {
+      if ((par->type() == t_pppParam::amb) &&
+          (!par->lastObsTime().valid() || epoTime - par->lastObsTime() == 1.0)) {
 #ifdef BNC_DEBUG_PPP
-        LOG << "remove " << par->toString() << std::endl;
+        LOG << "remove1 " << par->toString() << std::endl;
 #endif
+        lostSats.append(par->prn());
+        delete par;
+        it = _params.erase(it);
+      }
+      else {
+        ++it;
+      }
+    }
+    // remove respective iono parameters
+    // ---------------------------------
+    it = _params.begin();
+    while (it != _params.end()) {
+      t_pppParam* par = *it;
+      if ((par->type() == t_pppParam::ion) &&
+          (lostSats.contains(par->prn()) || epoTime - par->lastObsTime() == 1.0)) {
+    #ifdef BNC_DEBUG_PPP
+        LOG << "remove1 " << par->toString() << std::endl;
+    #endif
         delete par;
         it = _params.erase(it);
@@ -828,10 +836,12 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppParlist::printParams() {
+void t_pppParlist::printParams(const bncTime& epoTime) {
 
   for (unsigned iPar = 0; iPar < _params.size(); iPar++) {
-    LOG << "t_pppFilter::processEpoch par_cur " << _params[iPar]->toString()
-        << "  lastObsTime().valid() " << _params[iPar]->lastObsTime().valid() << endl;
-  }
-}
-
+    LOG << _params[iPar]->toString()
+        << "\t  lastObsTime().valid() \t" << _params[iPar]->lastObsTime().valid()
+        << "\t  epoTime - par->lastObsTime() \t" << (epoTime - _params[iPar]->lastObsTime())
+        << endl;
+  }
+}
+
Index: /trunk/BNC/src/PPP/pppParlist.h
===================================================================
--- /trunk/BNC/src/PPP/pppParlist.h	(revision 9526)
+++ /trunk/BNC/src/PPP/pppParlist.h	(revision 9527)
@@ -113,5 +113,5 @@
   void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
                    const ColumnVector& xx) const;
-  void printParams();
+  void printParams(const bncTime& epoTime);
 
  private:
