Index: /trunk/BNC/bncpppclient.cpp
===================================================================
--- /trunk/BNC/bncpppclient.cpp	(revision 2785)
+++ /trunk/BNC/bncpppclient.cpp	(revision 2786)
@@ -69,5 +69,10 @@
   }
 
-  _useGalileo = true; // TODO
+  if ( Qt::CheckState(settings.value("pppGalileo").toInt()) == Qt::Checked) {
+    _useGalileo = true;
+  }
+  else {
+    _useGalileo = false;
+  }
 
   if (settings.value("pppSPP").toString() == "PPP") {
@@ -164,49 +169,4 @@
   }
 
-  // Set Code Observations - P1 or C1
-  // --------------------------------
-  bool haveP1 = false;
-  if      (obs.P1) {
-    satData->P1         = obs.P1 + (bb ? bb->p1 : 0.0);
-    satData->codeTypeF1 = t_satData::P_CODE;
-    haveP1 = true;
-  }
-  else if (obs.C1) {
-    satData->P1         = obs.C1 + (bb ? bb->c1 : 0.0);
-    satData->codeTypeF1 = t_satData::C_CODE;
-    haveP1 = true;
-  }
-
-  if (!haveP1) {
-    delete satData;
-    return;
-  }
-
-  // P2 or C2, and C5
-  // ----------------   
-  bool haveP2 = false;
-  if      (obs.P2) {
-    satData->P2         = obs.P2 + (bb ? bb->p2 : 0.0);
-    satData->codeTypeF2 = t_satData::P_CODE;
-    haveP2 = true;
-  }
-  else if (obs.C2) {
-    satData->P2         = obs.C2;
-    satData->codeTypeF2 = t_satData::C_CODE;
-    haveP2 = true;
-  }
-
-  bool haveP5 = false;
-  if      (obs.C5) {
-    satData->P5         = obs.C5;
-    satData->codeTypeF2 = t_satData::P_CODE;
-    haveP5 = true;
-  }
-
-  if (!haveP2 && !haveP5) {
-    delete satData;
-    return;
-  }
-
   // Add new Satellite to the epoch
   // ------------------------------
@@ -224,68 +184,91 @@
   }
 
-  // Set Ionosphere-Free Combinations
-  // --------------------------------
+  // Set Observations GPS
+  // --------------------
   if      (obs.satSys == 'G') {
-    double f1 = t_CST::freq1;
-    double f2 = t_CST::freq2;
-    double c1 =   f1 * f1 / (f1 * f1 - f2 * f2);
-    double c2 = - f2 * f2 / (f1 * f1 - f2 * f2);
-
-    if (obs.L1() && obs.L2()) {
-      satData->L1 = obs.L1() * t_CST::c / f1;
-      satData->L2 = obs.L2() * t_CST::c / f2;
+    if ( (obs.P1 || obs.C1) && (obs.P2 || obs.C2) && obs.L1() && obs.L2() ) {
+      double f1 = t_CST::freq1;
+      double f2 = t_CST::freq2;
+      double c1 =   f1 * f1 / (f1 * f1 - f2 * f2);
+      double c2 = - f2 * f2 / (f1 * f1 - f2 * f2);
+      if (obs.P1) {
+        satData->P1 = obs.P1 + (bb ? bb->p1 : 0.0);
+      }
+      else {
+        satData->P1 = obs.C1 + (bb ? bb->c1 : 0.0);
+      }
+      if (obs.P2) {
+        satData->P2 = obs.P2 + (bb ? bb->p2 : 0.0);
+      }
+      else {
+        satData->P2 = obs.C2;
+      }
+      satData->L1      = obs.L1() * t_CST::c / f1;
+      satData->L2      = obs.L2() * t_CST::c / f2;
+      satData->P3      = c1 * satData->P1 + c2 * satData->P2;
+      satData->L3      = c1 * satData->L1 + c2 * satData->L2;
+      satData->lambda3 = c1 * t_CST::c / f1 + c2 * t_CST::c / f2;
+
+      _epoData->satDataGPS[satData->prn] = satData;
     }
     else {
       delete satData;
-      return;
-    }
-
-    satData->P3      = c1 * satData->P1 + c2 * satData->P2;
-    satData->L3      = c1 * satData->L1 + c2 * satData->L2;
-    satData->lambda3 = c1 * t_CST::c / f1 + c2 * t_CST::c / f2;
-
-    _epoData->satDataGPS[satData->prn] = satData;
-  }
+    }
+  }
+
+  // Set Observations GLONASS
+  // ------------------------
   else if (obs.satSys == 'R') {
-    double f1 = 1602000000.0 + 562500.0 * obs.slotNum; 
-    double f2 = 1246000000.0 + 437500.0 * obs.slotNum;
-    double c1 =   f1 * f1 / (f1 * f1 - f2 * f2);
-    double c2 = - f2 * f2 / (f1 * f1 - f2 * f2);
-
-    if (obs.L1() && obs.L2()) {
-      satData->L1 = obs.L1() * t_CST::c / f1;
-      satData->L2 = obs.L2() * t_CST::c / f2;
+    if ( (obs.P1 || obs.C1) && (obs.P2 || obs.C2) && obs.L1() && obs.L2() ) {
+      double f1 = 1602000000.0 + 562500.0 * obs.slotNum; 
+      double f2 = 1246000000.0 + 437500.0 * obs.slotNum;
+      double c1 =   f1 * f1 / (f1 * f1 - f2 * f2);
+      double c2 = - f2 * f2 / (f1 * f1 - f2 * f2);
+      if (obs.P1) {
+        satData->P1 = obs.P1 + (bb ? bb->p1 : 0.0);
+      }
+      else {
+        satData->P1 = obs.C1 + (bb ? bb->c1 : 0.0);
+      }
+      if (obs.P2) {
+        satData->P2 = obs.P2 + (bb ? bb->p2 : 0.0);
+      }
+      else {
+        satData->P2 = obs.C2;
+      }
+      satData->L1      = obs.L1() * t_CST::c / f1;
+      satData->L2      = obs.L2() * t_CST::c / f2;
+      satData->P3      = c1 * satData->P1 + c2 * satData->P2;
+      satData->L3      = c1 * satData->L1 + c2 * satData->L2;
+      satData->lambda3 = c1 * t_CST::c / f1 + c2 * t_CST::c / f2;
+
+      _epoData->satDataGlo[satData->prn] = satData;
     }
     else {
       delete satData;
-      return;
-    }
-
-    satData->P3      = c1 * satData->P1 + c2 * satData->P2;
-    satData->L3      = c1 * satData->L1 + c2 * satData->L2;
-    satData->lambda3 = c1 * t_CST::c / f1 + c2 * t_CST::c / f2;
-
-    _epoData->satDataGlo[satData->prn] = satData;
-  }
+    }
+  }
+
+  // Set Observations Galileo
+  // ------------------------
   else if (obs.satSys == 'E') {
-    double f1 = t_CST::freq1;
-    double f5 = t_CST::freq5;
-    double c1 =   f1 * f1 / (f1 * f1 - f5 * f5);
-    double c5 = - f5 * f5 / (f1 * f1 - f5 * f5);
-
-    if (obs.L1() && obs.L5) {
-      satData->L1 = obs.L1() * t_CST::c / f1;
-      satData->L5 = obs.L5   * t_CST::c / f5;
+    if ( obs.C1 && obs.C2 && obs.L1() && obs.L5) {
+      double f1 = t_CST::freq1;
+      double f5 = t_CST::freq5;
+      double c1 =   f1 * f1 / (f1 * f1 - f5 * f5);
+      double c5 = - f5 * f5 / (f1 * f1 - f5 * f5);
+
+      satData->P1      = obs.C1;
+      satData->P5      = obs.C5;
+      satData->L1      = obs.L1() * t_CST::c / f1;
+      satData->L5      = obs.L5 * t_CST::c / f5;
+      satData->P3      = c1 * satData->P1 + c5 * satData->P5;
+      satData->L3      = c1 * satData->L1 + c5 * satData->L5;
+      satData->lambda3 = c1 * t_CST::c / f1 + c5 * t_CST::c / f5;
+      _epoData->satDataGal[satData->prn] = satData;
     }
     else {
       delete satData;
-      return;
-    }
-
-    satData->P3      = c1 * satData->P1 + c5 * satData->P5;
-    satData->L3      = c1 * satData->L1 + c5 * satData->L5;
-    satData->lambda3 = c1 * t_CST::c / f1 + c5 * t_CST::c / f5;
-
-    _epoData->satDataGal[satData->prn] = satData;
+    }
   }
 }
Index: /trunk/BNC/bncpppclient.h
===================================================================
--- /trunk/BNC/bncpppclient.h	(revision 2785)
+++ /trunk/BNC/bncpppclient.h	(revision 2786)
@@ -39,5 +39,4 @@
 class t_satData {
  public:
-  enum codeType {P_CODE, C_CODE};
   QString      prn;
   double       P1;
@@ -49,7 +48,4 @@
   double       L5;
   double       L3;
-  codeType     codeTypeF1;
-  codeType     codeTypeF2;
-  codeType     codeTypeF5;
   ColumnVector xx;
   ColumnVector vv;
