Index: trunk/BNC/src/PPP/pppParlist.cpp
===================================================================
--- trunk/BNC/src/PPP/pppParlist.cpp	(revision 9303)
+++ trunk/BNC/src/PPP/pppParlist.cpp	(revision 9386)
@@ -94,15 +94,15 @@
    case offGR:
      _epoSpec = true;
-     _sigma0  = 1000.0;
+     _sigma0  = OPT->_aprSigOGR;
      _x0      = PPP_CLIENT->offGR();
      break;
    case offGE:
      _epoSpec = true;
-     _sigma0  = 1000.0;
+     _sigma0  = OPT->_aprSigOGE;
      _x0      = PPP_CLIENT->offGE();
      break;
    case offGC:
      _epoSpec = true;
-     _sigma0  = 1000.0;
+     _sigma0  = OPT->_aprSigOGC;
      _x0      = PPP_CLIENT->offGC();
      break;
@@ -113,19 +113,16 @@
      break;
     case ion:
-     _epoSpec = false;
-     _sigma0  = OPT->_aprSigIon;
-     _noise   = OPT->_noiseIon;
-     break;
-   case cBias1:
-   case cBias2:
-     _epoSpec = false;
+      _epoSpec = true;
+      _sigma0  = OPT->_aprSigIon;
+     break;
+   case cBiasG1:   case cBiasR1:   case cBiasE1:   case cBiasC1:
+   case cBiasG2:   case cBiasR2:   case cBiasE2:   case cBiasC2:
+     _epoSpec = true;
      _sigma0  = OPT->_aprSigCodeBias;
-     _noise   = OPT->_noiseCodeBias;
-     break;
-   case pBias1:
-   case pBias2:
-     _epoSpec = false;
+     break;
+   case pBiasG1:   case pBiasR1:   case pBiasE1:   case pBiasC1:
+   case pBiasG2:   case pBiasR2:   case pBiasE2:   case pBiasC2:
+     _epoSpec = true;
      _sigma0  = OPT->_aprSigPhaseBias;
-     _noise   = OPT->_noisePhaseBias;
      break;
   }
@@ -186,4 +183,5 @@
              (OPT->_obsModelType == OPT->DCMcodeBias  && !obs->isReference()) ||
              (OPT->_obsModelType == OPT->DCMphaseBias && !obs->isReference())   ) {
+
       if (obs->prn() == _prn) {
         if      (tLC == _tLC) {
@@ -236,35 +234,53 @@
     }
     break;
-  case cBias1:
-    if  (tLC == t_lc::c1) {
-      return 1.0;
-    }
-    else {
-      return 0.0;
-    }
-    break;
-  case cBias2:
-     if (tLC == t_lc::c2) {
-      return 1.0;
-    }
-    else {
-      return 0.0;
-    }
-    break;
-  case pBias1:
-    if  (tLC == t_lc::l1) {
-      return 1.0;
-    }
-    else {
-      return 0.0;
-    }
-    break;
-  case pBias2:
-    if  (tLC == t_lc::l2) {
-      return 1.0;
-    }
-    else {
-      return 0.0;
-    }
+  case cBiasG1:
+    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;}
+    break;
+  case cBiasC1:
+    if ((obs->prn().system() == 'C') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
+    break;
+  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:
+    if ((obs->prn().system() == 'E') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
+        break;
+  case cBiasC2:
+    if ((obs->prn().system() == 'C') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
+    break;
+  case pBiasG1:
+    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;}
+    break;
+  case pBiasC1:
+    if ((obs->prn().system() == 'C') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
+    break;
+  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:
+    if ((obs->prn().system() == 'E') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
+    break;
+  case pBiasC2:
+    if ((obs->prn().system() == 'C') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
+    break;
+
   }
   return 0.0;
@@ -286,17 +302,17 @@
     break;
   case clkR:
-    ss << "REC_CLK    ";
+    ss << "REC_CLK     ";
     break;
   case offGR:
-    ss << "OGR        ";
+    ss << "OGR         ";
     break;
   case offGE:
-    ss << "OGE        ";
+    ss << "OGE         ";
     break;
   case offGC:
-    ss << "OGC        ";
+    ss << "OGC         ";
     break;
   case trp:
-    ss << "TRP        ";
+    ss << "TRP         ";
     break;
   case amb:
@@ -306,9 +322,19 @@
     ss << "ION  " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
     break;
-  case cBias1:
-  case cBias2:
-  case pBias1:
-  case pBias2:
-    ss << "BIAS " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << "REC";
+  case cBiasG1:  case pBiasG1:
+  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:
+  case cBiasE2:  case pBiasE2:
+    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " E  ";
+    break;
+  case cBiasC1:  case pBiasC1:
+  case cBiasC2:  case pBiasC2:
+    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " C  ";
     break;
   }
@@ -360,6 +386,7 @@
         refPrn = (refSatMap[system])->prn();
       }
-      if ((par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) ||
-          ( refPrn == par->prn())) {
+      if ((par->lastObsTime().valid() &&
+          (epoTime - par->lastObsTime() > 60.0)) ||
+          (refPrn == par->prn())) {
         remove = true;
       }
@@ -409,4 +436,46 @@
   required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy));
 
+  // Receiver Code Biases
+  // --------------------
+  if (OPT->_obsModelType == OPT->DCMcodeBias) {
+    if (OPT->useSystem('G')) {
+      required.push_back(new t_pppParam(t_pppParam::cBiasG1, t_prn(), t_lc::c1));
+      required.push_back(new t_pppParam(t_pppParam::cBiasG2, t_prn(), t_lc::c2));
+    }
+    if (OPT->useSystem('R')) {
+      required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1));
+      required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2));
+    }
+    if (OPT->useSystem('E')) {
+      required.push_back(new t_pppParam(t_pppParam::cBiasE1, t_prn(), t_lc::c1));
+      required.push_back(new t_pppParam(t_pppParam::cBiasE2, t_prn(), t_lc::c2));
+    }
+    if (OPT->useSystem('C')) {
+      required.push_back(new t_pppParam(t_pppParam::cBiasC1, t_prn(), t_lc::c1));
+      required.push_back(new t_pppParam(t_pppParam::cBiasC2, t_prn(), t_lc::c2));
+    }
+  }
+
+  // Receiver Phase Biases
+  // ---------------------
+  if ((OPT->_obsModelType == OPT->DCMphaseBias) ||
+      (OPT->_obsModelType == OPT->PPPRTK)     ) {
+    if (OPT->useSystem('G')) {
+      required.push_back(new t_pppParam(t_pppParam::pBiasG1, t_prn(), t_lc::l1));
+      required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2));
+    }
+    if (OPT->useSystem('R')) {
+      required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1));
+      required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2));
+    }
+    if (OPT->useSystem('E')) {
+      required.push_back(new t_pppParam(t_pppParam::pBiasE1, t_prn(), t_lc::l1));
+      required.push_back(new t_pppParam(t_pppParam::pBiasE2, t_prn(), t_lc::l2));
+    }
+    if (OPT->useSystem('C')) {
+      required.push_back(new t_pppParam(t_pppParam::pBiasC1, t_prn(), t_lc::l1));
+      required.push_back(new t_pppParam(t_pppParam::pBiasC2, t_prn(), t_lc::l2));
+    }
+  }
   // Receiver Clock
   // --------------
@@ -415,5 +484,5 @@
   // GPS-GLONASS Clock Offset
   // ------------------------
-  if (OPT->useSystem('R')) {
+  if (OPT->useSystem('R') && OPT->useSystem('G')) {
     required.push_back(new t_pppParam(t_pppParam::offGR, t_prn(), t_lc::dummy));
   }
@@ -421,5 +490,5 @@
   // GPS-Galileo Clock Offset
   // ------------------------
-  if (OPT->useSystem('E')) {
+  if (OPT->useSystem('E') && OPT->useSystem('G')) {
     required.push_back(new t_pppParam(t_pppParam::offGE, t_prn(), t_lc::dummy));
   }
@@ -427,5 +496,5 @@
   // GPS-BDS Clock Offset
   // ------------------------
-  if (OPT->useSystem('C')) {
+  if (OPT->useSystem('C') && OPT->useSystem('G')) {
     required.push_back(new t_pppParam(t_pppParam::offGC, t_prn(), t_lc::dummy));
   }
@@ -443,9 +512,8 @@
       OPT->_obsModelType == OPT->DCMphaseBias   ) {
     for (unsigned jj = 0; jj < obsVector.size(); jj++) {
-      const t_pppSatObs*        satObs = obsVector[jj];
+      const t_pppSatObs* satObs = obsVector[jj];
       required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
     }
   }
-
   // Ambiguities
   // -----------
@@ -464,19 +532,4 @@
   }
 
-  // Receiver Code Biases
-  // --------------------
-  if (OPT->_obsModelType == OPT->DCMcodeBias) {
-    required.push_back(new t_pppParam(t_pppParam::cBias1, t_prn(), t_lc::c1));
-    required.push_back(new t_pppParam(t_pppParam::cBias2, t_prn(), t_lc::c2));
-  }
-
-  // Receiver Phase Biases
-  // ---------------------
-  if ((OPT->_obsModelType == OPT->DCMphaseBias) ||
-      (OPT->_obsModelType == OPT->PPPRTK)     ) {
-    required.push_back(new t_pppParam(t_pppParam::pBias1, t_prn(), t_lc::l1));
-    required.push_back(new t_pppParam(t_pppParam::pBias2, t_prn(), t_lc::l2));
-  }
-
   // Check if all required parameters are present
   // --------------------------------------------
