Index: trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP/pppClient.cpp	(revision 9560)
+++ trunk/BNC/src/PPP/pppClient.cpp	(revision 9561)
@@ -356,162 +356,4 @@
 }
 
-// Compute A Priori GPS-Glonass Offset
-//////////////////////////////////////////////////////////////////////////////
-double t_pppClient::cmpOffGR(vector<t_pppSatObs*>& obsVector) {
-
-  t_lc::type tLC   = t_lc::dummy;
-  double     offGR = 0.0;
-
-  if (_opt->useSystem('R')) {
-    while (obsVector.size() > 0) {
-      offGR = 0.0;
-      double   maxRes      = 0.0;
-      int      maxResIndex = -1;
-      t_prn    maxResPrn;
-      unsigned nObs        = 0;
-      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
-        const t_pppSatObs* satObs = obsVector.at(ii);
-        if (satObs->prn().system() == 'R') {
-          if (tLC == t_lc::dummy) {
-            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
-          }
-          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
-            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
-            ++nObs;
-            offGR += ll;
-            if (fabs(ll) > fabs(maxRes)) {
-              maxRes      = ll;
-              maxResIndex = ii;
-              maxResPrn   = satObs->prn();
-            }
-          }
-        }
-      }
-
-      if (nObs > 0) {
-        offGR = offGR / nObs;
-      }
-      else {
-        offGR = 0.0;
-      }
-      if (fabs(maxRes) > OPT->_aprSigOGC) {
-        LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl;
-        delete obsVector.at(maxResIndex);
-        obsVector.erase(obsVector.begin() + maxResIndex);
-      }
-      else {
-        break;
-      }
-    }
-  }
-  return offGR;
-}
-
-// Compute A Priori GPS-Galileo Offset
-//////////////////////////////////////////////////////////////////////////////
-double t_pppClient::cmpOffGE(vector<t_pppSatObs*>& obsVector) {
-
-  t_lc::type tLC   = t_lc::dummy;
-  double     offGE = 0.0;
-
-  if (_opt->useSystem('E')) {
-    while (obsVector.size() > 0) {
-      offGE = 0.0;
-      double   maxRes      = 0.0;
-      int      maxResIndex = -1;
-      t_prn    maxResPrn;
-      unsigned nObs        = 0;
-      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
-        const t_pppSatObs* satObs = obsVector.at(ii);
-        if (satObs->prn().system() == 'E') {
-          if (tLC == t_lc::dummy) {
-            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
-          }
-          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
-            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
-            ++nObs;
-            offGE += ll;
-            if (fabs(ll) > fabs(maxRes)) {
-              maxRes      = ll;
-              maxResIndex = ii;
-              maxResPrn   = satObs->prn();
-            }
-          }
-        }
-      }
-
-      if (nObs > 0) {
-        offGE = offGE / nObs;
-      }
-      else {
-        offGE = 0.0;
-      }
-
-      if (fabs(maxRes) > OPT->_aprSigOGE) {
-        LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl;
-        delete obsVector.at(maxResIndex);
-        obsVector.erase(obsVector.begin() + maxResIndex);
-      }
-      else {
-        break;
-      }
-    }
-  }
-  return offGE;
-}
-
-// Compute A Priori GPS-BDS Offset
-//////////////////////////////////////////////////////////////////////////////
-double t_pppClient::cmpOffGC(vector<t_pppSatObs*>& obsVector) {
-
-  t_lc::type tLC   = t_lc::dummy;
-  double     offGC = 0.0;
-
-  if (_opt->useSystem('C')) {
-    while (obsVector.size() > 0) {
-      offGC = 0.0;
-      double   maxRes      = 0.0;
-      int      maxResIndex = -1;
-      t_prn    maxResPrn;
-      unsigned nObs        = 0;
-      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
-        const t_pppSatObs* satObs = obsVector.at(ii);
-        if (satObs->prn().system() == 'C') {
-          if (tLC == t_lc::dummy) {
-            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
-          }
-          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
-            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
-            ++nObs;
-            offGC += ll;
-            if (fabs(ll) > fabs(maxRes)) {
-              maxRes      = ll;
-              maxResIndex = ii;
-              maxResPrn   = satObs->prn();
-            }
-          }
-        }
-      }
-
-      if (nObs > 0) {
-        offGC = offGC / nObs;
-      }
-      else {
-        offGC = 0.0;
-      }
-
-      if (fabs(maxRes) > OPT->_aprSigOGC) {
-        LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl;
-        delete obsVector.at(maxResIndex);
-        obsVector.erase(obsVector.begin() + maxResIndex);
-      }
-      else {
-        break;
-      }
-    }
-  }
-  return offGC;
-}
-
 //
 //////////////////////////////////////////////////////////////////////////////
Index: trunk/BNC/src/PPP/pppClient.h
===================================================================
--- trunk/BNC/src/PPP/pppClient.h	(revision 9560)
+++ trunk/BNC/src/PPP/pppClient.h	(revision 9561)
@@ -62,7 +62,4 @@
   t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
                     ColumnVector& xyzc, bool print);
-  double cmpOffGR(std::vector<t_pppSatObs*>& obsVector);
-  double cmpOffGE(std::vector<t_pppSatObs*>& obsVector);
-  double cmpOffGC(std::vector<t_pppSatObs*>& obsVector);
   t_irc handleRefSatellites(std::vector<t_pppSatObs*>& obsVector);
   void setRefSatellites(std::vector<t_pppSatObs*>& obsVector);
Index: trunk/BNC/src/PPP/pppParlist.cpp
===================================================================
--- trunk/BNC/src/PPP/pppParlist.cpp	(revision 9560)
+++ trunk/BNC/src/PPP/pppParlist.cpp	(revision 9561)
@@ -102,12 +102,12 @@
       _noise   = OPT->_noiseIon;
      break;
-   case cBiasG1:   case cBiasE1:   case cBiasC1:
-   case cBiasG2:   case cBiasE2:   case cBiasC2:
+   case cBiasG1:   case cBiasR1:   case cBiasE1:   case cBiasC1:
+   case cBiasG2:   case cBiasR2:   case cBiasE2:   case cBiasC2:
      _epoSpec = false;
      _sigma0  = OPT->_aprSigCodeBias;
      _noise   = OPT->_noiseCodeBias;
      break;
-   case pBiasG1:   case pBiasE1:   case pBiasC1:
-   case pBiasG2:   case pBiasE2:   case pBiasC2:
+   case pBiasG1:   case pBiasR1:   case pBiasE1:   case pBiasC1:
+   case pBiasG2:   case pBiasR2:   case pBiasE2:   case pBiasC2:
      _epoSpec = false;
      _sigma0  = OPT->_aprSigPhaseBias;
@@ -246,4 +246,7 @@
     if ((obs->prn().system() == 'G') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
     break;
+  case cBiasR1:
+    if ((obs->prn().system() == 'R') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
+    break;
   case cBiasE1:
     if ((obs->prn().system() == 'E') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
@@ -254,4 +257,7 @@
   case cBiasG2:
     if ((obs->prn().system() == 'G') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
+    break;
+  case cBiasR2:
+    if ((obs->prn().system() == 'R') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
     break;
   case cBiasE2:
@@ -264,4 +270,7 @@
     if ((obs->prn().system() == 'G') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
     break;
+  case pBiasR1:
+    if ((obs->prn().system() == 'R') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
+    break;
   case pBiasE1:
     if ((obs->prn().system() == 'E') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
@@ -272,4 +281,7 @@
   case pBiasG2:
     if ((obs->prn().system() == 'G') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
+    break;
+  case pBiasR2:
+    if ((obs->prn().system() == 'R') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
     break;
   case pBiasE2:
@@ -322,4 +334,8 @@
   case cBiasG2:  case pBiasG2:
     ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " G  ";
+    break;
+  case cBiasR1:  case pBiasR1:
+  case cBiasR2:  case pBiasR2:
+    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " R  ";
     break;
   case cBiasE1:  case pBiasE1:
@@ -509,4 +525,14 @@
         it = _params.erase(it);
       }
+      else if ((par->type() == t_pppParam::cBiasR1 ||
+                par->type() == t_pppParam::cBiasR2 ||
+                par->type() == t_pppParam::pBiasR1 ||
+                par->type() == t_pppParam::pBiasR2) && !usedSystems().contains('R')) {
+#ifdef BNC_DEBUG_PPP
+        LOG << "remove1 " << par->toString() << std::endl;
+#endif
+        delete par;
+        it = _params.erase(it);
+      }
       else if ((par->type() == t_pppParam::cBiasE1 ||
                 par->type() == t_pppParam::cBiasE2 ||
@@ -576,4 +602,13 @@
       }
     }
+    if (_usedSystems.contains('R')) {
+      lc = OPT->LCs('R');
+      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
+        required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1));
+      }
+      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
+        required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2));
+      }
+    }
     if (_usedSystems.contains('E')) {
       lc = OPT->LCs('E');
@@ -608,4 +643,13 @@
       if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
         required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2));
+      }
+    }
+    if (_usedSystems.contains('R')) {
+      lc = OPT->LCs('R');
+      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
+        required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1));
+      }
+      if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
+        required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2));
       }
     }
Index: trunk/BNC/src/PPP/pppParlist.h
===================================================================
--- trunk/BNC/src/PPP/pppParlist.h	(revision 9560)
+++ trunk/BNC/src/PPP/pppParlist.h	(revision 9561)
@@ -16,6 +16,6 @@
  public:
   enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb,
-               cBiasG1, cBiasE1, cBiasC1, pBiasG1, pBiasE1, pBiasC1,
-               cBiasG2, cBiasE2, cBiasC2, pBiasG2, pBiasE2, pBiasC2};
+               cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1,
+               cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
 
   t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0);
Index: trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.cpp	(revision 9560)
+++ trunk/BNC/src/PPP/pppSatObs.cpp	(revision 9561)
@@ -353,15 +353,5 @@
   retVal = sqrt(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;
+  return retVal;
 }
 
Index: trunk/BNC/src/pppMain.cpp
===================================================================
--- trunk/BNC/src/pppMain.cpp	(revision 9560)
+++ trunk/BNC/src/pppMain.cpp	(revision 9561)
@@ -216,5 +216,5 @@
       opt->_obsModelType = t_pppOptions::DCMcodeBias;
       opt->_refSatRequired = true;
-      opt->_noiseCodeBias  = 1000.0;
+      opt->_noiseCodeBias  = 100.0;
       opt->_noiseIon = 0.1;
     }
@@ -222,5 +222,5 @@
       opt->_obsModelType = t_pppOptions::DCMphaseBias;
       opt->_refSatRequired = true;
-      opt->_noisePhaseBias = 1000.0;
+      opt->_noisePhaseBias = 100.0;
       opt->_noiseIon = 0.1;
     }
@@ -420,11 +420,8 @@
     // -------------------
     opt->_aprSigAmb       = 1000.0;
-    opt->_aprSigIon       = 1000.0;
     opt->_aprSigClk       = 1000.0;
-    opt->_aprSigOGR       = 1000.0;
-    opt->_aprSigOGE       = 1000.0;
-    opt->_aprSigOGC       = 1000.0;
-    opt->_aprSigCodeBias  = 1000.0;
-    opt->_aprSigPhaseBias = 1000.0;
+    opt->_aprSigIon       = 100.0;
+    opt->_aprSigCodeBias  = 100.0;
+    opt->_aprSigPhaseBias = 100.0;
 
     _options << opt;
Index: trunk/BNC/src/pppOptions.h
===================================================================
--- trunk/BNC/src/pppOptions.h	(revision 9560)
+++ trunk/BNC/src/pppOptions.h	(revision 9561)
@@ -63,7 +63,4 @@
   double                  _aprSigTrp;
   double                  _aprSigIon;
-  double                  _aprSigOGR;
-  double                  _aprSigOGE;
-  double                  _aprSigOGC;
   double                  _aprSigAmb;
   double                  _aprSigCodeBias;
