Index: trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- trunk/BNC/src/PPP/pppFilter.cpp	(revision 9554)
+++ trunk/BNC/src/PPP/pppFilter.cpp	(revision 9556)
@@ -260,4 +260,19 @@
         }
       }
+    }
+
+    // Check number of observations
+    // ----------------------------
+    if (iObs == -1) {LOG << "iObs == -1\n";
+      return failure;
+    }
+    if (OPT->_obsModelType == OPT->DCMcodeBias  ||
+        OPT->_obsModelType == OPT->DCMphaseBias ||
+        OPT->_pseudoObsIono) {
+        double numSat = floor(iObs/2.0);
+        if (numSat < 2.0) {
+          LOG << sys <<  ": numsat " << numSat << " but at least 2 satellites would be required" << endl;
+          return failure;
+        }
     }
 
@@ -294,9 +309,6 @@
     }
 
-    // Check number of observations, truncate matrices
-    // -----------------------------------------------
-    if (iObs == -1) {LOG << "iObs == -1\n";
-      return failure;
-    }
+    // Truncate matrices
+    // -----------------
     AA = AA.Rows(1, iObs+1);
     ll = ll.Rows(1, iObs+1);
@@ -330,8 +342,4 @@
       t_pppSatObs* obs = usedObs[maxOutlierIndex];
       t_pppParam* par = 0;
-      LOG << epoTimeStr << " Outlier ("
-          << ((preProcessing) ? "pre-processing) " : "fin-processing) ") << t_lc::toString(maxOutlierLC) << ' '
-          << obs->prn().toString()                        << ' '
-          << setw(8) << setprecision(4) << maxOutlier << endl;
       for (unsigned iPar = 0; iPar < nPar; iPar++) {
         t_pppParam* hlp = params[iPar];
@@ -348,4 +356,7 @@
               t_lc::toString(maxOutlierLC) == "l2") ) {
            _obsPool->setRefSatChangeRequired(sys, true);
+           LOG << epoTimeStr << " Outlier ("
+               << ((preProcessing) ? "pre-processing) " : "fin-processing) ") << t_lc::toString(maxOutlierLC) << ' '
+               << obs->prn().toString()  << ' ' << setw(8) << setprecision(4) << maxOutlier << endl;
            break;
          }
@@ -353,12 +364,10 @@
           if (par) {
             par->setAmbResetCandidate();
-            obs->setOutlier();
-          }
-          else {
-            obs->setOutlier();
           }
         }
       }
       else {// fin-processing
+        LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' '
+            << obs->prn().toString()  << ' ' << setw(8) << setprecision(4) << maxOutlier << endl;
         if (par) {
           if (par->ambResetCandidate()) {
Index: trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.cpp	(revision 9554)
+++ trunk/BNC/src/PPP/pppSatObs.cpp	(revision 9556)
@@ -348,5 +348,15 @@
   retVal = sqrt(retVal);
 
-  return retVal;
+  // Elevation-Dependent Weighting
+  // -----------------------------
+  double cEle = 1.0;
+  if ( (OPT->_eleWgtCode  && t_lc::includesCode(tLC)) ||
+       (OPT->_eleWgtPhase && t_lc::includesPhase(tLC)) ) {
+    double eleD = eleSat()*180.0/M_PI;
+    double hlp  = fabs(90.0 - eleD);
+    cEle = (1.0 + hlp*hlp*hlp*0.000004);
+  }
+
+  return cEle * retVal;
 }
 
