Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 10548)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 10599)
@@ -238,9 +238,5 @@
       int nextPar = 0;
       char sys = itSys.key();
-      unsigned maxPrn = itSys.value();
-      unsigned flag = 0;
-      if (sys == 'E') {
-        flag = 1;
-      }
+      int maxPrn = itSys.value();
       // AC
       QListIterator<cmbAC*> itAc(_ACs);
@@ -248,10 +244,12 @@
         cmbAC* AC = itAc.next();
         _params[sys].push_back(new cmbParam(cmbParam::offACgnss, ++nextPar, AC->name, ""));
-        for (unsigned iGnss = 1; iGnss <= maxPrn; iGnss++) {
+        for (int iGnss = 1; iGnss <= maxPrn; iGnss++) {
+          int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
           QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
           _params[sys].push_back(new cmbParam(cmbParam::offACSat, ++nextPar, AC->name, prn));
         }
       }
-      for (unsigned iGnss = 1; iGnss <= maxPrn; iGnss++) {
+      for (int iGnss = 1; iGnss <= maxPrn; iGnss++) {
+        int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
         QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
         _params[sys].push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
@@ -680,5 +678,5 @@
     const t_clkCorr& clkCorr = clkCorrVec[ii];
     QString    staID(clkCorr._staID.c_str());
-    QString    prn(clkCorr._prn.toInternalString().c_str());
+    QString    prnStr(clkCorr._prn.toInternalString().c_str());
     char       sys = clkCorr._prn.system();
 
@@ -700,5 +698,5 @@
     // ---------------------
     _newCorr                = new cmbCorr();
-    _newCorr->_prn          = prn;
+    _newCorr->_prn          = prnStr;
     _newCorr->_time         = clkCorr._time;
     _newCorr->_iod          = clkCorr._iod;
@@ -727,9 +725,9 @@
     // Check the Ephemeris
     //--------------------
-    t_eph* ephLast = _ephUser.ephLast(prn);
-    t_eph* ephPrev = _ephUser.ephPrev(prn);
+    t_eph* ephLast = _ephUser.ephLast(prnStr);
+    t_eph* ephPrev = _ephUser.ephPrev(prnStr);
     if (ephLast == 0) {
 #ifdef BNC_DEBUG_CMB
-      emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1(), true);
+      emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1(), true);
 #endif
       delete _newCorr; _newCorr = 0;
@@ -741,5 +739,5 @@
              ephLast->checkState() == t_eph::unhealthy) {
 #ifdef BNC_DEBUG_CMB
-      emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prn.mid(0,3).toLatin1(), true);
+      emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prnStr.mid(0,3).toLatin1(), true);
 #endif
       delete _newCorr; _newCorr = 0;
@@ -759,5 +757,5 @@
       else {
 #ifdef BNC_DEBUG_CMB
-        emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1() +
+        emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1() +
                         QString(" with IOD %1").arg(_newCorr->_iod).toLatin1(), true);
 #endif
@@ -806,9 +804,9 @@
     bool available = false;
     while (itCorr.hasNext()) {
-      cmbCorr* corr = itCorr.next();
-      QString  prn  = corr->_prn;
+      cmbCorr* corr   = itCorr.next();
+      QString  prnStr = corr->_prn;
       QString  acName = corr->_acName;
       if (_newCorr->_acName == acName &&
-          _newCorr->_prn == prn) {
+          _newCorr->_prn == prnStr) {
         available = true;
       }
@@ -1263,8 +1261,4 @@
       }
     }
-    unsigned flag = 0;
-    if (sys == 'E') {
-      flag = 1;
-    }
 //    if (sys == 'R') {
 //      return success;
@@ -1273,4 +1267,5 @@
     // GNSS
     for (unsigned iGnss = 1; iGnss <= _cmbSysPrn[sys]; iGnss++) {
+      int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
       QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
       ++iCond;
@@ -1311,6 +1306,6 @@
     QMutableVectorIterator<cmbCorr*> it(corrs(sys));
     while (it.hasNext()) {
-      cmbCorr* corr = it.next();
-      QString  prn  = corr->_prn;
+      cmbCorr* corr    = it.next();
+      QString  prnStr  = corr->_prn;
       bool foundMaster = false;
       QVectorIterator<cmbCorr*> itHlp(corrs(sys));
@@ -1319,5 +1314,5 @@
         QString  prnHlp  = corrHlp->_prn;
         QString  ACHlp   = corrHlp->_acName;
-        if (ACHlp == _masterOrbitAC[sys] && prn == prnHlp) {
+        if (ACHlp == _masterOrbitAC[sys] && prnStr == prnHlp) {
           foundMaster = true;
           break;
@@ -1638,5 +1633,6 @@
   while (it.hasNext()) {
     string prnStr = it.next().toLatin1().data();
-    if (prnStr == prn.toString() || prnStr == prn.toString().substr(0,1)) {
+    if (prnStr == prn.toString() ||              // prn
+        prnStr == prn.toString().substr(0,1)) {  // sys
       return true;
     }
