Index: trunk/BNC/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/combination/bnccomb.cpp	(revision 3482)
+++ trunk/BNC/combination/bnccomb.cpp	(revision 3483)
@@ -39,5 +39,6 @@
 const double sigObs        =   0.05;
 
-const int MAXPRN_GPS = 32;
+const int MAXPRN_GPS     = 32;
+const int MAXPRN_GLONASS = 24;
 
 using namespace std;
@@ -178,8 +179,21 @@
                                        AC->name, prn));
       }
+      if (_useGlonass) {
+        for (int iGlo = 1; iGlo <= MAXPRN_GLONASS; iGlo++) {
+          QString prn = QString("R%1").arg(iGlo, 2, 10, QChar('0'));
+          _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar, 
+                                         AC->name, prn));
+        }
+      }
     }
     for (int iGps = 1; iGps <= MAXPRN_GPS; iGps++) {
       QString prn = QString("G%1").arg(iGps, 2, 10, QChar('0'));
       _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
+    }
+    if (_useGlonass) {
+      for (int iGlo = 1; iGlo <= MAXPRN_GLONASS; iGlo++) {
+        QString prn = QString("R%1").arg(iGlo, 2, 10, QChar('0'));
+        _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
+      }
     }
     
@@ -213,4 +227,13 @@
     _MAXRES = 999.0;
   }
+
+  // Use Glonass
+  // -----------
+  if ( Qt::CheckState(settings.value("pppGLONASS").toInt()) == Qt::Checked) {
+    _useGlonass = true;
+  }
+  else {
+    _useGlonass = false;
+  }
 }
 
@@ -260,4 +283,13 @@
     delete newCorr;
     return;
+  }
+
+  // Check Glonass
+  // -------------
+  if (!_useGlonass) {
+    if (newCorr->prn[0] == 'R') {
+      delete newCorr;
+      return;
+    }
   }
 
@@ -719,5 +751,10 @@
   }
 
-  const int nCon = (_method == filter) ? 1 + MAXPRN_GPS : 0;
+  int MAXPRN = MAXPRN_GPS;
+  if (_useGlonass) {
+    MAXPRN = MAXPRN_GPS + MAXPRN_GLONASS;
+  }
+
+  const int nCon = (_method == filter) ? 1 + MAXPRN : 0;
 
   AA.ReSize(nObs+nCon, nPar);  AA = 0.0;
@@ -769,4 +806,19 @@
              pp->prn == prn) {
           AA(nObs+iCond, iPar) = 1.0;
+        }
+      }
+    }
+    if (_useGlonass) {
+      for (int iGlo = 1; iGlo <= MAXPRN_GLONASS; iGlo++) {
+        QString prn = QString("R%1").arg(iGlo, 2, 10, QChar('0'));
+        ++iCond;
+        PP(nObs+iCond) = Ph;
+        for (int iPar = 1; iPar <= _params.size(); iPar++) {
+          cmbParam* pp = _params[iPar-1];
+          if ( AA.Column(iPar).maximum_absolute_value() > 0.0 &&
+               pp->type == cmbParam::offACSat                 && 
+               pp->prn == prn) {
+            AA(nObs+iCond, iPar) = 1.0;
+          }
         }
       }
Index: trunk/BNC/combination/bnccomb.h
===================================================================
--- trunk/BNC/combination/bnccomb.h	(revision 3482)
+++ trunk/BNC/combination/bnccomb.h	(revision 3483)
@@ -102,4 +102,5 @@
   unsigned                _masterMissingEpochs;
   e_method                _method;
+  bool                    _useGlonass;
 };
 
