Index: trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP/pppClient.cpp	(revision 10250)
+++ trunk/BNC/src/PPP/pppClient.cpp	(revision 10251)
@@ -231,11 +231,8 @@
   while (it != obsVector.end()) {
     t_pppSatObs* pppSatObs = *it;
-    char sys = pppSatObs->prn().system();
     bool codeBiasesAvailable = false;
-    t_frequency::type fType1 = t_lc::toFreq(sys,t_lc::c1);
-    t_frequency::type fType2 = t_lc::toFreq(sys,t_lc::c2);
-    if (pppSatObs->getCodeBias(fType1) &&
-        pppSatObs->getCodeBias(fType2)) {
-      codeBiasesAvailable = true;
+    if (pppSatObs->getCodeBias(pppSatObs->fType1()) &&
+        pppSatObs->getCodeBias(pppSatObs->fType2())) {
+        codeBiasesAvailable = true;
     }
     if (codeBiasesAvailable) {
@@ -247,5 +244,5 @@
     }
   }
-
+  return;
 }
 
Index: trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- trunk/BNC/src/PPP/pppFilter.cpp	(revision 10250)
+++ trunk/BNC/src/PPP/pppFilter.cpp	(revision 10251)
@@ -307,5 +307,5 @@
                                     const vector<t_pppSatObs*> &obsVector) {
 
-  const double SLIP = 20.0;
+  const double SLIP = 200.0;
   string epoTimeStr = string(_epoTime);
   const vector<t_pppParam*> &params = _parlist->params();
Index: trunk/BNC/src/PPP/pppParlist.cpp
===================================================================
--- trunk/BNC/src/PPP/pppParlist.cpp	(revision 10250)
+++ trunk/BNC/src/PPP/pppParlist.cpp	(revision 10251)
@@ -179,8 +179,8 @@
         else {
           if      (_tLC == t_lc::l1) {
-            return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
+            return obs->lambda(t_lc::l1) * phaseCoeff[obs->fType1()];
           }
           else if (_tLC == t_lc::l2) {
-            return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
+            return obs->lambda(t_lc::l2) * phaseCoeff[obs->fType2()];
           }
         }
@@ -198,14 +198,14 @@
     if (obs->prn() == _prn) {
       if      (tLC == t_lc::c1) {
-        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c1)];
+        return ionoCoeff[obs->fType1()];
       }
       else if (tLC == t_lc::c2) {
-        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c2)];
+        return ionoCoeff[obs->fType2()];
       }
       else if (tLC == t_lc::l1) {
-        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
+        return ionoCoeff[obs->fType1()];
       }
       else if (tLC == t_lc::l2) {
-        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
+        return ionoCoeff[obs->fType2()];
       }
       else if (tLC == t_lc::GIM) {
@@ -414,5 +414,5 @@
   }
 
-  if (OPT->_obsModelType == OPT->PPPRTK || OPT->_pseudoObsIono) {
+  if (OPT->_ionoModelType == OPT->PPP_RTK || OPT->_pseudoObsIono) {
     vector<t_pppParam*>::iterator it = _params.begin();
     while (it != _params.end()) {
@@ -502,8 +502,13 @@
   // Ionosphere
   // ----------
-  if (OPT->_obsModelType == OPT->UncombPPP) {
+  if (OPT->_ionoModelType == OPT->est) {
     for (unsigned jj = 0; jj < obsVector.size(); jj++) {
       const t_pppSatObs* satObs = obsVector[jj];
-      required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
+      char sys = satObs->prn().system();
+      std::vector<t_lc::type> LCs = OPT->LCs(sys);
+      if (std::find(LCs.begin(), LCs.end(), t_lc::cIF) == LCs.end() &&
+          std::find(LCs.begin(), LCs.end(), t_lc::lIF) == LCs.end()) {
+        required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
+      }
     }
   }
@@ -512,5 +517,6 @@
   for (unsigned jj = 0; jj < obsVector.size(); jj++) {
     const t_pppSatObs*  satObs = obsVector[jj];
-    const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system());
+    char sys = satObs->prn().system();
+    const vector<t_lc::type>& ambLCs = OPT->ambLCs(sys);
     for (unsigned ii = 0; ii < ambLCs.size(); ii++) {
       required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector));
@@ -520,5 +526,5 @@
   // Receiver Code Biases
   // --------------------
-  if (OPT->_obsModelType == OPT->PPPRTK) {
+  if (OPT->_ionoModelType == OPT->PPP_RTK) {
     std::vector<t_lc::type> lc;
     if (_usedSystems.contains('G')) {
@@ -589,5 +595,5 @@
   // Receiver Phase Biases
   // ---------------------
-  if (OPT->_obsModelType == OPT->PPPRTK) {
+  if (OPT->_ionoModelType == OPT->PPP_RTK) {
     std::vector<t_lc::type> lc;
     if (_usedSystems.contains('G')) {
Index: trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10250)
+++ trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10251)
@@ -46,8 +46,4 @@
   _stecSat    = 0.0;
   _signalPriorities = QString::fromStdString(OPT->_signalPriorities);
-  if (!_signalPriorities.size()) {
-    _signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";
-  }
-
   for (unsigned ii = 0; ii < t_frequency::max; ii++) {
     _obs[ii] = 0;
@@ -66,7 +62,17 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) {
+void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) {//cout << "SATELLITE: " << _prn.toString() << endl;
 
   _model.reset();
+
+  std::vector<char> bb = OPT->frqBands(_prn.system());
+  char frqNum1 = '0';
+  if (bb.size() >= 1) {
+    frqNum1 = bb[0];
+  }
+  char frqNum2 = '0';
+  if (bb.size() == 2) {
+    frqNum2 = bb[1];
+  }
 
   // Select pseudo-ranges and phase observations
@@ -74,10 +80,13 @@
   QStringList priorList = _signalPriorities.split(" ", QString::SkipEmptyParts);
   string preferredAttrib;
-  char obsSys = pppSatObs._prn.system();  //cout << "SATELLITE: " << pppSatObs._prn.toString() << endl;
   for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
     t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
     char frqSys = t_frequency::toString(frqType)[0]; //cout << "frqSys: " << frqSys << endl;
     char frqNum = t_frequency::toString(frqType)[1]; //cout << "frqNum: " << frqNum << endl;
-    if (obsSys != frqSys) {
+    if (frqSys != _prn.system()) {
+      continue;
+    }
+    if (frqNum != frqNum1 &&
+        frqNum != frqNum2 ) {
       continue;
     }
@@ -100,5 +109,5 @@
             //cout << "observation2char: " << obs->_rnxType2ch << " vs. " << obsType.toStdString().c_str()<< endl;
             if (obs->_rnxType2ch == obsType.toStdString() &&
-                obs->_codeValid && obs->_code &&
+                obs->_codeValid  && obs->_code &&
                 obs->_phaseValid && obs->_phase) {
               _obs[iFreq] = new t_frqObs(*obs); //cout << "================> newObs: " << obs->_rnxType2ch <<endl;
@@ -112,6 +121,6 @@
   // Used frequency types
   // --------------------
-  _fType1 = t_lc::toFreq(_prn.system(),t_lc::l1);
-  _fType2 = t_lc::toFreq(_prn.system(),t_lc::l2);
+  _fType1 = t_frqBand::toFreq(_prn.system(), frqNum1);
+  _fType2 = t_frqBand::toFreq(_prn.system(), frqNum2);
 
   // Check whether all required frequencies available
@@ -524,5 +533,6 @@
         }
         const t_frqObs* obs = _obs[iFreq];
-        if (obs && obs->_rnxType2ch == bias._rnxType2ch) {
+        if (obs &&
+            obs->_rnxType2ch == bias._rnxType2ch) {
           _model._codeBias[iFreq]  = bias._value;
         }
@@ -551,5 +561,6 @@
         }
         const t_frqObs* obs = _obs[iFreq];
-        if (obs && obs->_rnxType2ch == bias._rnxType2ch) {
+        if (obs &&
+            obs->_rnxType2ch == bias._rnxType2ch) {
           _model._phaseBias[iFreq]  = bias._value;
         }
@@ -606,5 +617,5 @@
   _model._set = true;
 
-  //printModel();
+  printModel();
 
   return success;
@@ -619,5 +630,5 @@
 
       << "\n======================= " << endl
-     << "PPP STRATEGY  : " <<  OPT->_obsmodelTypeStr.at((int)OPT->_obsModelType).toLocal8Bit().constData()
+      << "PPP "
       <<  ((OPT->_pseudoObsIono) ? " with pseudo-observations for STEC" : "")          << endl
       << "RHO           : " << setw(12) << setprecision(3) << _model._rho              << endl
@@ -701,5 +712,5 @@
       t_frequency::type tFreq = it->first;
       dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq]);
-      if (OPT->PPPRTK) {
+      if (OPT->PPP_RTK) {
         dispPart += it->second * (_model._ionoCodeDelay[tFreq]);
       }
@@ -709,5 +720,5 @@
       dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] +
                                 _model._windUp * t_CST::lambda(tFreq, _channel));
-      if (OPT->PPPRTK) {
+      if (OPT->PPP_RTK) {
         dispPart += it->second * (- _model._ionoCodeDelay[tFreq]);
       }
Index: trunk/BNC/src/PPP/pppSatObs.h
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.h	(revision 10250)
+++ trunk/BNC/src/PPP/pppSatObs.h	(revision 10251)
@@ -50,4 +50,6 @@
   double              getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];}
   double              getCodeBias(t_frequency::type freq) {return _model._codeBias[freq];}
+  t_frequency::type   fType1() const {return _fType1;}
+  t_frequency::type   fType2() const {return _fType2;} 
 
   // RINEX
