Index: trunk/BNC/src/PPP/pppOptions.cpp
===================================================================
--- trunk/BNC/src/PPP/pppOptions.cpp	(revision 5911)
+++ trunk/BNC/src/PPP/pppOptions.cpp	(revision 5912)
@@ -49,6 +49,7 @@
 t_pppOptions::t_pppOptions() {
   _xyzAprRover.ReSize(3); _xyzAprRover = 0.0;
-  _ellAprRover.ReSize(3); _ellAprRover = 0.0;
   _neuEccRover.ReSize(3); _neuEccRover = 0.0;
+  _aprSigCrd.ReSize(3);   _aprSigCrd   = 0.0;
+  _noiseCrd.ReSize(3);    _noiseCrd    = 0.0;
 }
 
@@ -58,24 +59,16 @@
 }
 
-// 
-//////////////////////////////////////////////////////////////////////////////
-bool t_pppOptions::dualFreqRequired() const {
-  return true;
-}
 
 // 
 //////////////////////////////////////////////////////////////////////////////
-bool t_pppOptions::biasRequired() const {
-  return false;
-}
-
-// 
-//////////////////////////////////////////////////////////////////////////////
-bool t_pppOptions::corrRequired() const {
-  if (_corrMount.empty()) {
-    return false;
+const std::vector<t_lc::type>& t_pppOptions::LCs(char system) const {
+  if      (system == 'R') {
+    return _LCsGLONASS;
+  }
+  else if (system == 'E') {
+    return _LCsGalileo;
   }
   else {
-    return true;
+    return _LCsGPS;
   }
 }
@@ -83,64 +76,55 @@
 // 
 //////////////////////////////////////////////////////////////////////////////
-bool t_pppOptions::useGlonass() const  {
-  return (_lcGLONASS.size() > 0);
+bool t_pppOptions::dualFreqRequired(char system) const {
+  const std::vector<t_lc::type>& lcs = LCs(system);
+  for (unsigned ii = 0; ii < lcs.size(); ii++) {
+    if (t_lc::need2ndFreq(lcs[ii])) {
+      return true;
+    }
+  }
+  return false;
+}  
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+bool t_pppOptions::useOrbClkCorr() const {
+  if (_realTime) {
+    return !_corrMount.empty();
+  }
+  else {
+    return !_corrFile.empty();
+  }
+}
+
+// Processed satellite systems
+/////////////////////////////////////////////////////////////////////////////
+vector<char> t_pppOptions::systems() const {
+  vector<char> answ;
+  if (_LCsGPS.size()     > 0) answ.push_back('G');
+  if (_LCsGLONASS.size() > 0) answ.push_back('R');
+  return answ;
 }
 
 // 
-//////////////////////////////////////////////////////////////////////////////
-bool t_pppOptions::xyzAprRoverSet() const {
-  return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0);
-}
-
-// 
-//////////////////////////////////////////////////////////////////////////////
-bool t_pppOptions::estTropo() const  {
-  return (_sigTropo > 0.0 || _noiseTropo > 0.0);
-}
-
-// 
-//////////////////////////////////////////////////////////////////////////////
-vector<t_lc::type> t_pppOptions::LCs() const {
-
-  vector<t_lc::type> allLCs = _lcGPS;
-
-  for (unsigned ii = 0; ii < _lcGLONASS.size(); ii++) {
-    bool found = false;
-    for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
-      if (allLCs[iAll] == _lcGLONASS[ii]) {
-        found = true;
-        break;
-      }
-    }
-    if (!found) {
-      allLCs.push_back(_lcGLONASS[ii]);
+/////////////////////////////////////////////////////////////////////////////
+vector<t_lc::type> t_pppOptions::ambLCs(char system) const {
+  
+  const vector<t_lc::type>& allLCs = LCs(system);
+  vector<t_lc::type>        phaseLCs;
+  for (unsigned ii = 0; ii < allLCs.size(); ii++) {
+    if (t_lc::includesPhase(allLCs[ii])) {
+      phaseLCs.push_back(allLCs[ii]);
     }
   }
 
-  for (unsigned ii = 0; ii < _lcGalileo.size(); ii++) {
-    bool found = false;
-    for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
-      if (allLCs[iAll] == _lcGalileo[ii]) {
-        found = true;
-        break;
-      }
-    }
-    if (!found) {
-      allLCs.push_back(_lcGalileo[ii]);
-    }
+  vector<t_lc::type> answ;
+  if      (phaseLCs.size() == 1) {
+    answ.push_back(phaseLCs[0]);
+  }
+  else if (phaseLCs.size() >  1) {
+    answ.push_back(t_lc::l1);
+    answ.push_back(t_lc::l2);
   }
 
-  return allLCs;  
+  return answ;
 }
-
-// 
-//////////////////////////////////////////////////////////////////////////////
-double t_pppOptions::maxRes(t_lc::type tLC) const {
-
-  if (t_lc::includesCode(tLC)) {
-    return _maxResC1;
-  }
-  else {
-    return _maxResL1;
-  }
-}
Index: trunk/BNC/src/PPP/pppOptions.h
===================================================================
--- trunk/BNC/src/PPP/pppOptions.h	(revision 5911)
+++ trunk/BNC/src/PPP/pppOptions.h	(revision 5912)
@@ -11,53 +11,46 @@
 class t_pppOptions {
  public:
-  class t_optBias {
-   public:
-    t_optBias(char system, t_lc::type tLC) : _system(system), _tLC(tLC) {}
-    char       _system;
-    t_lc::type _tLC;
-  };
-
   t_pppOptions();
   ~t_pppOptions();
-  bool dualFreqRequired() const;
-  bool biasRequired() const;
-  bool corrRequired() const;
-  bool useGlonass() const ;
-  bool xyzAprRoverSet() const;
-  bool estTropo() const ; 
-  std::vector<t_lc::type> LCs() const;
-  double maxRes(t_lc::type tLC) const;
 
-  bool         _realTime;
-  std::string  _roverName;     
-  std::string  _crdFile;
-  std::string  _antexFile;
-  std::string  _corrMount;
-  std::string  _rinexObs;
-  std::string  _rinexNav;
-  std::string  _corrFile;
+  const std::vector<t_lc::type>& LCs(char system) const;
+  bool dualFreqRequired(char system) const;
+  bool useOrbClkCorr() const;
+  std::vector<char> systems() const;
+  std::vector<t_lc::type> ambLCs(char system) const;
+  bool useGlonass() const  {return _LCsGLONASS.size() > 0;}
+  bool estTrp() const {return _aprSigTrp > 0.0 || _noiseTrp > 0.0;}
+  bool xyzAprRoverSet() const {
+    return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0);
+  }
 
-  double       _sigCrd[3];
-  double       _noiseCrd[3];
-  double       _sigTropo;
-  double       _noiseTropo;
-  double       _sigmaC1;
-  double       _sigmaL1;
-  double       _corrWaitTime;
-  std::vector<t_lc::type> _lcGPS;
-  std::vector<t_lc::type> _lcGLONASS;
-  std::vector<t_lc::type> _lcGalileo;
-  std::vector<t_optBias>  _estBias;
-
-  ColumnVector _xyzAprRover;
-  ColumnVector _ellAprRover;
-  ColumnVector _neuEccRover;
-  std::string  _antNameRover;  
-  int          _minObs;
-  double       _minEle;
-  double       _maxResC1;
-  double       _maxResL1;
-  bool         _eleWgtCode;
-  bool         _eleWgtPhase;
+  bool                    _realTime;
+  std::string             _crdFile;
+  std::string             _corrMount;
+  std::string             _rinexObs;
+  std::string             _rinexNav;
+  std::string             _corrFile;
+  std::string             _roverName;     
+  ColumnVector            _xyzAprRover;
+  ColumnVector            _neuEccRover;
+  std::string             _antNameRover;  
+  std::string             _antexFileName; 
+  double                  _sigmaC1;
+  double                  _sigmaL1;
+  double                  _maxResC1;
+  double                  _maxResL1;
+  bool                    _eleWgtCode;
+  bool                    _eleWgtPhase;
+  double                  _minEle;
+  int                     _minObs;
+  ColumnVector            _aprSigCrd;
+  ColumnVector            _noiseCrd;
+  double                  _noiseClk;
+  double                  _aprSigTrp;
+  double                  _noiseTrp;
+  double                  _aprSigAmb;
+  std::vector<t_lc::type> _LCsGPS;
+  std::vector<t_lc::type> _LCsGLONASS;
+  std::vector<t_lc::type> _LCsGalileo;
 };
 
