Index: /trunk/BNC/src/PPP/pppClient.h
===================================================================
--- /trunk/BNC/src/PPP/pppClient.h	(revision 10598)
+++ /trunk/BNC/src/PPP/pppClient.h	(revision 10599)
@@ -70,8 +70,4 @@
   bncAntex*                 _antex;
   t_pppFilter*              _filter;
-  double                    _offGps;
-  double                    _offGlo;
-  double                    _offGal;
-  double                    _offBds;
   std::vector<t_pppSatObs*> _obsRover;
   std::ostringstream*       _log;
Index: /trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10598)
+++ /trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10599)
@@ -141,10 +141,4 @@
     _channel = 0;
   }
-  if (_prn.system() == 'E') {
-    // force I/NAV usage
-    _prn.setFlags(1);
-  }
-
-
 
   // Compute Satellite Coordinates at Time of Transmission
Index: /trunk/BNC/src/PPP_SSR_I/pppClient.cpp
===================================================================
--- /trunk/BNC/src/PPP_SSR_I/pppClient.cpp	(revision 10598)
+++ /trunk/BNC/src/PPP_SSR_I/pppClient.cpp	(revision 10599)
@@ -86,5 +86,4 @@
     const t_satObs* obs     = satObs[ii];
     t_prn prn = obs->_prn;
-    if (prn.system() == 'E') {prn.setFlags(1);} // force I/NAV usage
     t_satData*   satData = new t_satData();
 
Index: /trunk/BNC/src/RTCM/RTCM2Decoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 10598)
+++ /trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 10599)
@@ -134,10 +134,16 @@
         for (int iSat = 0; iSat < _ObsBlock.nSat; iSat++) {
           t_satObs obs;
+          char sys;
+          int num, flag;
           if (_ObsBlock.PRN[iSat] > 100) {
-            obs._prn.set('R', _ObsBlock.PRN[iSat] % 100);
-          } else {
-            obs._prn.set('G', _ObsBlock.PRN[iSat]);
+            sys = 'R';
+            num = _ObsBlock.PRN[iSat] % 100;
           }
-          char sys = obs._prn.system();
+          else {
+            sys = 'G';
+            num = _ObsBlock.PRN[iSat];
+          }
+          flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+          obs._prn.set(sys, num, flag);
           obs._time.set(epochWeek, epochSecs);
 
@@ -283,13 +289,17 @@
     // end test
 
-    QString prn;
+    t_prn prn;
     char sys;
+    int num, flag;
     if (corr->PRN < 200) {
       sys = 'G';
-      prn = sys + QString("%1_0").arg(corr->PRN, 2, 10, QChar('0'));
-    } else {
+      num = corr->PRN;
+    }
+    else {
       sys = 'R';
-      prn = sys + QString("%1_0").arg(corr->PRN - 200, 2, 10, QChar('0'));
-    }
+      num = corr->PRN - 200;
+    }
+    flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    prn.set(sys, num, flag);
 
     double L1 = 0;
@@ -353,6 +363,7 @@
 
       // Select corresponding ephemerides
-      const t_eph* ephLast = _ephUser.ephLast(prn);
-      const t_eph* ephPrev = _ephUser.ephPrev(prn);
+      QString prnInternalStr(prn.toInternalString().c_str());
+      const t_eph* ephLast = _ephUser.ephLast(prnInternalStr);
+      const t_eph* ephPrev = _ephUser.ephPrev(prnInternalStr);
       if (ephLast && ephLast->IOD() == IODcorr) {
         eph = ephLast;
@@ -376,10 +387,16 @@
         if (*obsVal == 0)
           *obsVal = ZEROVALUE;
-
+        char sys;
+        int num, flag;
         if (corr->PRN < 200) {
-          new_obs._prn.set('G', corr->PRN);
-        } else {
-          new_obs._prn.set('R', corr->PRN - 200);
+          sys = 'G';
+          num = corr->PRN;
         }
+        else {
+          sys = 'R';
+          num = corr->PRN - 200;
+        }
+        flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+        new_obs._prn.set(sys, num, flag);
         new_obs._time.set(GPSWeek_rcv, GPSWeeks_rcv);
 
@@ -432,5 +449,5 @@
 
       errmsg.push_back(
-          "missing eph for " + string(prn.toLatin1().data()) + " , IODs "
+          "missing eph for " + prn.toString() + " , IODs "
               + missingIODstr.str());
     }
Index: /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 10598)
+++ /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 10599)
@@ -71,14 +71,9 @@
   _rawFile = rawFile;
 
-  connect(this, SIGNAL(newGPSEph(t_ephGPS)), BNC_CORE,
-      SLOT(slotNewGPSEph(t_ephGPS)));
-  connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE,
-      SLOT(slotNewGlonassEph(t_ephGlo)));
-  connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE,
-      SLOT(slotNewGalileoEph(t_ephGal)));
-  connect(this, SIGNAL(newSBASEph(t_ephSBAS)), BNC_CORE,
-      SLOT(slotNewSBASEph(t_ephSBAS)));
-  connect(this, SIGNAL(newBDSEph(t_ephBDS)), BNC_CORE,
-      SLOT(slotNewBDSEph(t_ephBDS)));
+  connect(this, SIGNAL(newGPSEph(t_ephGPS)),     BNC_CORE, SLOT(slotNewGPSEph(t_ephGPS)));
+  connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE, SLOT(slotNewGlonassEph(t_ephGlo)));
+  connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE, SLOT(slotNewGalileoEph(t_ephGal)));
+  connect(this, SIGNAL(newSBASEph(t_ephSBAS)),   BNC_CORE, SLOT(slotNewSBASEph(t_ephSBAS)));
+  connect(this, SIGNAL(newBDSEph(t_ephBDS)),     BNC_CORE, SLOT(slotNewBDSEph(t_ephBDS)));
 
   _MessageSize = _SkipBytes = _BlockSize = _NeedBytes = 0;
@@ -134,8 +129,16 @@
 
     GETBITS(sv, 6)
-    if (sv < 40)
-      CurrentObs._prn.set('G', sv);
-    else
-      CurrentObs._prn.set('S', sv - 20);
+    char sys;
+    int num, flag;
+    if (sv < 40) {
+      sys = 'G';
+      num = sv;
+    }
+    else {
+      sys = 'S';
+      num = sv - 20;
+    }
+    flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    CurrentObs._prn.set(sys, num, flag);
 
     t_frqObs *frqObs = new t_frqObs;
@@ -706,6 +709,11 @@
             /* next satellite */
             ;
-          if (CurrentObs._obs.size() > 0)
+          if (CurrentObs._obs.size() > 0) {
+            char sys = CurrentObs._prn.system();
+            int  num = CurrentObs._prn.number();
+            int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+            CurrentObs._prn.setFlag(flag);
             _CurrentObsList.push_back(CurrentObs);
+          }
           CurrentObs.clear();
           CurrentObs._time = CurrentObsTime;
@@ -882,4 +890,8 @@
       }
       if (CurrentObs._obs.size() > 0) {
+        char sys = CurrentObs._prn.system();
+        int  num = CurrentObs._prn.number();
+        int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+        CurrentObs._prn.setFlag(flag);
         _CurrentObsList.push_back(CurrentObs);
       }
@@ -939,5 +951,7 @@
 
     GETBITS(sv, 6)
-    CurrentObs._prn.set('R', sv);
+    char sys = 'R';
+    int flag = t_corrSSR::getSsrNavTypeFlag(sys, sv);
+    CurrentObs._prn.set(sys, sv, flag);
     GETBITS(code, 1)
     GETBITS(freq, 5)
@@ -1135,4 +1149,5 @@
     eph._TOT = 0.9999e9;
     eph._type = t_eph::LNAV;
+    eph._prn.setFlag(eph._type);
 
     emit newGPSEph(eph);
@@ -1313,5 +1328,11 @@
     _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(eph._frq_num, 2, 'f', 0);
 
-    eph._type = t_eph::FDMA;
+    if (eph.validMdata()) {
+      eph._type = t_eph::FDMA_M;
+    }
+    else {
+      eph._type = t_eph::FDMA;
+    }
+    eph._prn.setFlag(eph._type);
     eph._healthflags_unknown = false;
     eph._statusflags_unknown = false;
@@ -1568,4 +1589,5 @@
     eph._TOT = 0.9999e9;
     eph._type = t_eph::LNAV;
+    eph._prn.setFlag(eph._type);
 
     emit newGPSEph(eph);
@@ -1643,4 +1665,5 @@
     eph._health = 0;
     eph._type = t_eph::SBASL1;
+    eph._prn.setFlag(eph._type);
 
     emit newSBASEph(eph);
@@ -1661,5 +1684,6 @@
   GETBITS(i, 12)
 
-  if ((i == 1046 && size == 61) || (i == 1045 && size == 60)) {
+  if ((i == 1046 && size == 61) ||
+      (i == 1045 && size == 60)) {
     t_ephGal eph;
     eph._receptDateTime = currentDateAndTimeGPS();
@@ -1679,5 +1703,5 @@
       return false;
     }
-    eph._prn.set('E', i, eph._inav ? 1 : 0);
+    eph._prn.set('E', i, eph._inav ? t_eph::INAV : t_eph::FNAV);
 
     GETBITS(week, 12) //FIXME: roll-over after week 4095!!
@@ -1741,4 +1765,5 @@
     GETFLOATSIGN(eph._BGD_1_5A, 10, 1.0 / (double )(1 << 30) / (double )(1 << 2))
     if (eph._inav) {
+      eph._type = t_eph::INAV;
       /* set unused F/NAV values */
       eph._E5a_HS = 0.0;
@@ -1767,7 +1792,7 @@
         return false;
       }
-      eph._type = t_eph::INAV;
     }
     else {
+      eph._type = t_eph::FNAV;
       /* set unused I/NAV values */
       eph._BGD_1_5B = 0.0;
@@ -1779,5 +1804,4 @@
       GETBITS(eph._E5a_HS, 2)
       GETBITS(eph._E5a_DataInvalid, 1)
-      eph._type = t_eph::FNAV;
     }
     eph._TOT = 0.9999e9;
@@ -1908,4 +1932,5 @@
       eph._type = t_eph::D2;
     }
+    eph._prn.setFlag(eph._type);
 
     emit newBDSEph(eph);
Index: /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 10598)
+++ /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 10599)
@@ -243,29 +243,43 @@
       continue;
     }
-    char sysCh = ' ';
-    int flag = 0;
+    char sys = ' ';
+    int  num  = _clkOrb.Sat[ii].ID;
+    int  flag = 0;  // to force NAV type usage according SSR standard
     if      (ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATGPS]) {
-      sysCh = 'G';
+      sys = 'G';
+      flag = t_eph::LNAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETGLONASS &&
         ii < CLOCKORBIT_OFFSETGLONASS + _clkOrb.NumberOfSat[CLOCKORBIT_SATGLONASS]) {
-      sysCh = 'R';
+      sys = 'R';
+      flag = t_eph::FDMA_M;
     }
     else if (ii >= CLOCKORBIT_OFFSETGALILEO &&
         ii < CLOCKORBIT_OFFSETGALILEO + _clkOrb.NumberOfSat[CLOCKORBIT_SATGALILEO]) {
-      sysCh = 'E';
-      flag = 1; // I/NAV clock has been chosen as reference clock for Galileo SSR corrections
+      sys = 'E';
+      flag = t_eph::INAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETQZSS &&
         ii < CLOCKORBIT_OFFSETQZSS + _clkOrb.NumberOfSat[CLOCKORBIT_SATQZSS]) {
-      sysCh = 'J';
+      sys = 'J';
+      flag = t_eph::LNAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETSBAS &&
         ii < CLOCKORBIT_OFFSETSBAS + _clkOrb.NumberOfSat[CLOCKORBIT_SATSBAS]) {
-      sysCh = 'S';
+      sys = 'S';
+      flag = t_eph::SBASL1;
     }
     else if (ii >= CLOCKORBIT_OFFSETBDS &&
         ii < CLOCKORBIT_OFFSETBDS + _clkOrb.NumberOfSat[CLOCKORBIT_SATBDS]) {
-      sysCh = 'C';
+      sys = 'C';
+      if (num < 6) {// GEO
+        flag = t_eph::D2;
+      }
+      else if (num > 58 && num < 63) { // GEO
+        flag = t_eph::D2;
+      }
+      else {
+        flag = t_eph::D1;
+      }
     }
     else {
@@ -289,10 +303,10 @@
 
       t_orbCorr orbCorr;
-      orbCorr._prn.set(sysCh, _clkOrb.Sat[ii].ID, flag);
+      orbCorr._prn.set(sys, num, flag);
       orbCorr._staID     = _staID.toStdString();
       orbCorr._iod       = _clkOrb.Sat[ii].IOD;
       orbCorr._time      = _lastTime;
       orbCorr._updateInt = _clkOrb.UpdateInterval;
-      orbCorr._system    = sysCh;
+      orbCorr._system    = sys;
       orbCorr._xr[0]     = _clkOrb.Sat[ii].Orbit.DeltaRadial;
       orbCorr._xr[1]     = _clkOrb.Sat[ii].Orbit.DeltaAlongTrack;
@@ -323,5 +337,5 @@
 
       t_clkCorr clkCorr;
-      clkCorr._prn.set(sysCh, _clkOrb.Sat[ii].ID, flag);
+      clkCorr._prn.set(sys, _clkOrb.Sat[ii].ID, flag);
       clkCorr._staID      = _staID.toStdString();
       clkCorr._time       = _lastTime;
@@ -347,5 +361,5 @@
          _clkOrb.messageType == _ssrCorr->COTYPE_SBASHR ||
          _clkOrb.messageType == _ssrCorr->COTYPE_BDSHR) {
-      t_prn prn(sysCh, _clkOrb.Sat[ii].ID, flag);
+      t_prn prn(sys, _clkOrb.Sat[ii].ID, flag);
       if (_lastClkCorrections.contains(prn)) {
         t_clkCorr clkCorr;
@@ -371,27 +385,43 @@
                             + _codeBias.NumberOfSat[CLOCKORBIT_SATBDS];
     ii++) {
-    char sysCh = ' ';
+    char sys = ' ';
+    int  num =  _codeBias.Sat[ii].ID;
+    int flag = 0;
     if      (ii < _codeBias.NumberOfSat[CLOCKORBIT_SATGPS]) {
-      sysCh = 'G';
+      sys = 'G';
+      flag = t_eph::LNAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETGLONASS &&
         ii < CLOCKORBIT_OFFSETGLONASS + _codeBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) {
-      sysCh = 'R';
+      sys = 'R';
+      flag = t_eph::FDMA_M;
     }
     else if (ii >= CLOCKORBIT_OFFSETGALILEO &&
         ii < CLOCKORBIT_OFFSETGALILEO + _codeBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) {
-      sysCh = 'E';
+      sys = 'E';
+      flag = t_eph::INAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETQZSS &&
         ii < CLOCKORBIT_OFFSETQZSS + _codeBias.NumberOfSat[CLOCKORBIT_SATQZSS]) {
-      sysCh = 'J';
+      sys = 'J';
+      flag = t_eph::LNAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETSBAS &&
         ii < CLOCKORBIT_OFFSETSBAS + _codeBias.NumberOfSat[CLOCKORBIT_SATSBAS]) {
-      sysCh = 'S';
+      sys = 'S';
+      flag = t_eph::SBASL1;
     }
     else if (ii >= CLOCKORBIT_OFFSETBDS &&
         ii < CLOCKORBIT_OFFSETBDS + _codeBias.NumberOfSat[CLOCKORBIT_SATBDS]) {
-      sysCh = 'C';
+      sys = 'C';
+      if (num < 6) {// GEO
+        flag = t_eph::D2;
+      }
+      else if (num > 58 && num < 63) { // GEO
+        flag = t_eph::D2;
+      }
+      else {
+        flag = t_eph::D1;
+      }
     }
     else {
@@ -399,5 +429,5 @@
     }
     t_satCodeBias satCodeBias;
-    satCodeBias._prn.set(sysCh, _codeBias.Sat[ii].ID);
+    satCodeBias._prn.set(sys, num, flag);
     satCodeBias._staID     = _staID.toStdString();
     satCodeBias._time      = _lastTime;
@@ -406,5 +436,5 @@
       const SsrCorr::CodeBias::BiasSat::CodeBiasEntry& biasEntry = _codeBias.Sat[ii].Biases[jj];
       t_frqCodeBias frqCodeBias;
-      frqCodeBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sysCh, biasEntry.Type));
+      frqCodeBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys, biasEntry.Type));
       frqCodeBias._value      = biasEntry.Bias;
       if (!frqCodeBias._rnxType2ch.empty()) {
@@ -424,27 +454,43 @@
                             + _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS];
     ii++) {
-    char sysCh = ' ';
+    char sys = ' ';
+    int num = _phaseBias.Sat[ii].ID;
+    int flag = 0;
     if      (ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATGPS]) {
-      sysCh = 'G';
+      sys = 'G';
+      flag = t_eph::LNAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETGLONASS &&
         ii < CLOCKORBIT_OFFSETGLONASS + _phaseBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) {
-      sysCh = 'R';
+      sys = 'R';
+      flag = t_eph::FDMA_M;
     }
     else if (ii >= CLOCKORBIT_OFFSETGALILEO &&
         ii < CLOCKORBIT_OFFSETGALILEO + _phaseBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) {
-      sysCh = 'E';
+      sys = 'E';
+      flag = t_eph::INAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETQZSS &&
         ii < CLOCKORBIT_OFFSETQZSS + _phaseBias.NumberOfSat[CLOCKORBIT_SATQZSS]) {
-      sysCh = 'J';
+      sys = 'J';
+      flag = t_eph::LNAV;
     }
     else if (ii >= CLOCKORBIT_OFFSETSBAS &&
         ii < CLOCKORBIT_OFFSETSBAS + _phaseBias.NumberOfSat[CLOCKORBIT_SATSBAS]) {
-      sysCh = 'S';
+      sys = 'S';
+      flag = t_eph::SBASL1;
     }
     else if (ii >= CLOCKORBIT_OFFSETBDS &&
         ii < CLOCKORBIT_OFFSETBDS + _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS]) {
-      sysCh = 'C';
+      sys = 'C';
+      if (num < 6) {// GEO
+        flag = t_eph::D2;
+      }
+      else if (num > 58 && num < 63) { // GEO
+        flag = t_eph::D2;
+      }
+      else {
+        flag = t_eph::D1;
+      }
     }
     else {
@@ -452,5 +498,5 @@
     }
     t_satPhaseBias satPhaseBias;
-    satPhaseBias._prn.set(sysCh, _phaseBias.Sat[ii].ID);
+    satPhaseBias._prn.set(sys, num, flag);
     satPhaseBias._staID      = _staID.toStdString();
     satPhaseBias._time       = _lastTime;
@@ -463,5 +509,5 @@
       const SsrCorr::PhaseBias::PhaseBiasSat::PhaseBiasEntry& biasEntry = _phaseBias.Sat[ii].Biases[jj];
       t_frqPhaseBias frqPhaseBias;
-      frqPhaseBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sysCh, biasEntry.Type));
+      frqPhaseBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys, biasEntry.Type));
       frqPhaseBias._value                = biasEntry.Bias;
       frqPhaseBias._fixIndicator         = biasEntry.SignalIntegerIndicator;
Index: /trunk/BNC/src/RTCM3/RTCM3coDecoder.h
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3coDecoder.h	(revision 10598)
+++ /trunk/BNC/src/RTCM3/RTCM3coDecoder.h	(revision 10599)
@@ -33,4 +33,5 @@
 #include "../RTCM3/clock_and_orbit/clock_orbit_igs.h"
 #include "../RTCM3/clock_and_orbit/clock_orbit_rtcm.h"
+#include "ephemeris.h"
 
   class RTCM3coDecoder : public QObject, public GPSDecoder {
Index: /trunk/BNC/src/bncutils.cpp
===================================================================
--- /trunk/BNC/src/bncutils.cpp	(revision 10598)
+++ /trunk/BNC/src/bncutils.cpp	(revision 10599)
@@ -1023,8 +1023,15 @@
 }
 
-// Extracts k bits from position p and returns the extracted value as integer
-////////////////////////////////////////////////////////////////////////////
-int bitExtracted(int number, int k, int p) {
-  return (((1 << k) - 1) & (number >> (p - 1)));
+// Extracts k bits from position pos and returns the extracted value as unsigned int
+////////////////////////////////////////////////////////////////////////////
+unsigned bitExtracted(unsigned number, unsigned k, unsigned pos) {
+  // Right shift 'num' by 'pos' bits
+  unsigned shifted = number >> pos;
+
+  // Create a mask with 'k' bits set to 1
+  unsigned mask = (1 << k) - 1;
+
+  // Apply the mask to the shifted number
+  return shifted & mask;
 }
 
Index: /trunk/BNC/src/bncutils.h
===================================================================
--- /trunk/BNC/src/bncutils.h	(revision 10598)
+++ /trunk/BNC/src/bncutils.h	(revision 10599)
@@ -169,5 +169,5 @@
 // Extracts k bits from position p and returns the extracted value as integer
 ///////////////////////////////////////////////////////////////////
-int bitExtracted(int number, int k, int p);
+unsigned bitExtracted(unsigned number, unsigned k, unsigned p);
 
 
Index: /trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- /trunk/BNC/src/combination/bnccomb.cpp	(revision 10598)
+++ /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;
     }
Index: /trunk/BNC/src/ephemeris.cpp
===================================================================
--- /trunk/BNC/src/ephemeris.cpp	(revision 10598)
+++ /trunk/BNC/src/ephemeris.cpp	(revision 10599)
@@ -109,42 +109,4 @@
 //
 //////////////////////////////////////////////////////////////////////////////
-void t_eph::setType(QString typeStr) {
-
-  if (typeStr == "LNAV") {
-    _type = t_eph::LNAV;
-  } else if (typeStr == "FDMA") {
-    _type = t_eph::FDMA;
-  } else if (typeStr == "FNAV") {
-    _type = t_eph::FNAV;
-  } else if (typeStr == "INAV") {
-    _type = t_eph::INAV;
-  } else if (typeStr == "D1") {
-    _type = t_eph::D1;
-  } else if (typeStr == "D2") {
-    _type = t_eph::D2;
-  } else if (typeStr == "SBAS") {
-    _type = t_eph::SBASL1;
-  } else if (typeStr == "CNAV") {
-    _type = t_eph::CNAV;
-  } else if (typeStr == "CNV1") {
-    _type = t_eph::CNV1;
-  } else if (typeStr == "CNV2") {
-    _type = t_eph::CNV2;
-  } else if (typeStr == "CNV3") {
-    _type = t_eph::CNV3;
-  } else if (typeStr == "L1NV") {
-    _type = t_eph::L1NV;
-  } else if (typeStr == "L1OC") {
-    _type = t_eph::L1OC;
-  } else if (typeStr == "L3OC") {
-    _type = t_eph::L3OC;
-  } else {
-    _type = t_eph::undefined;
-  }
-
-}
-
-//
-//////////////////////////////////////////////////////////////////////////////
 QString t_eph::typeStr(e_type type, const t_prn &prn, double version) {
   QString typeStr = "";
@@ -173,4 +135,5 @@
       break;
     case FDMA:
+    case FDMA_M:
       typeStr = epochStart + ephStr + "FDMA" + eolStr;
       break;
@@ -317,5 +280,4 @@
       }
 
-      in >> year >> month >> day >> hour >> min >> sec;
       if (       prnStr.at(0) == 'G') {
         _prn.set('G', prnStr.mid(1).toInt());
@@ -327,4 +289,7 @@
         _prn.set('G', prnStr.toInt());
       }
+      _prn.setFlag(type());
+
+      in >> year >> month >> day >> hour >> min >> sec;
 
       if (year < 80) {
@@ -577,9 +542,9 @@
           _flags_unknown = false;
           // Bit 0:
-          _intSF      = double(bitExtracted(int(statusflags), 1, 0));
+          _intSF      = double(bitExtracted(unsigned(statusflags), 1, 0));
           // Bit 1:
-          _L2Cphasing = double(bitExtracted(int(statusflags), 1, 1));
+          _L2Cphasing = double(bitExtracted(unsigned(statusflags), 1, 1));
           // Bit 2:
-          _alert      = double(bitExtracted(int(statusflags), 1, 2));
+          _alert      = double(bitExtracted(unsigned(statusflags), 1, 2));
         }
       }
@@ -1099,5 +1064,5 @@
         prnStr.append(n);
       }
-      in >> year >> month >> day >> hour >> min >> sec;
+
       if (prnStr.at(0) == 'R') {
         _prn.set('R', prnStr.mid(1).toInt());
@@ -1106,4 +1071,5 @@
       }
 
+      in >> year >> month >> day >> hour >> min >> sec;
       if (year < 80) {
         year += 2000;
@@ -1142,6 +1108,5 @@
     // =====================
     else if (iLine == 2) {
-      if (type() == t_eph::FDMA ||
-          type() == t_eph::undefined) {
+      if (type() == t_eph::FDMA) {
         if (   readDbl(line, pos[0], fieldLen, _y_pos)
             || readDbl(line, pos[1], fieldLen, _y_vel)
@@ -1167,6 +1132,5 @@
     // =====================
     else if (iLine == 3) {
-      if (type() == t_eph::FDMA ||
-          type() == t_eph::undefined) {
+      if (type() == t_eph::FDMA) {
         if (   readDbl(line, pos[0], fieldLen, _z_pos)
             || readDbl(line, pos[1], fieldLen, _z_vel)
@@ -1200,6 +1164,5 @@
     // =====================
     else if (iLine == 4) {
-      if (type() == t_eph::FDMA ||
-          type() == t_eph::undefined){
+      if (type() == t_eph::FDMA) {
         if (readDbl(line, pos[0], fieldLen, statusflags)) {
           //status flags BLK, do nothing
@@ -1235,4 +1198,7 @@
             _M_delta_tau = 0.0;
           }
+          else {
+            _type = t_eph::FDMA_M;
+          }
         }
         if (   readDbl(line, pos[1], fieldLen, _M_delta_tau)
@@ -1335,4 +1301,6 @@
   }
 
+  _prn.setFlag(type());
+
   // Initialize status vector
   // ------------------------
@@ -1433,5 +1401,6 @@
   // BROADCAST ORBIT - 2
   // =====================
-  if (type() == t_eph::FDMA) {
+  if (type() == t_eph::FDMA ||
+      type() == t_eph::FDMA_M) {
     out
         << QString(fmt)
@@ -1452,5 +1421,6 @@
   // BROADCAST ORBIT - 3
   // =====================
-  if (type() == t_eph::FDMA) {
+  if (type() == t_eph::FDMA ||
+      type() == t_eph::FDMA_M) {
     out
         << QString(fmt)
@@ -1480,5 +1450,6 @@
     // BROADCAST ORBIT - 4
     // =====================
-    if (type() == t_eph::FDMA){
+    if (type() == t_eph::FDMA ||
+        type() == t_eph::FDMA_M){
       int statusflags = 0;
       int healthflags = 0;
@@ -1681,8 +1652,7 @@
 //////////////////////////////////////////////////////////////////////////////
 t_ephGal::t_ephGal(double rnxVersion, const QStringList &lines) {
-  int year, month, day, hour, min;
-  double sec;
-  QString prnStr;
+
   const int nLines = 8;
+
   if (lines.size() != nLines) {
     _checkState = bad;
@@ -1709,5 +1679,9 @@
     if (iLine == 0) {
       QTextStream in(line.left(pos[1]).toLatin1());
-      QString n;
+
+      int year, month, day, hour, min;
+      double sec;
+
+      QString prnStr, n;
       in >> prnStr;
       if (prnStr.size() == 1 && prnStr[0] == 'E') {
@@ -1715,4 +1689,10 @@
         prnStr.append(n);
       }
+      if (prnStr.at(0) == 'E') {
+        _prn.set('E', prnStr.mid(1).toInt());
+      } else {
+        _prn.set('E', prnStr.toInt());
+      }
+
       in >> year >> month >> day >> hour >> min >> sec;
       if (year < 80) {
@@ -1790,6 +1770,7 @@
       }
       else {
-        if (bitExtracted(int(datasource), 1, 8)) {
+        if (bitExtracted(unsigned(datasource), 1, 8)) {
           _fnav = true;
+          _type = t_eph::FNAV;
           _inav = false;
           /* set unused I/NAV values */
@@ -1798,19 +1779,12 @@
           _E1B_DataInvalid = false;
           _E5b_DataInvalid = false;
-          // Source RINEX version < 4
-          if (type() == t_eph::undefined) {
-            _type = t_eph::FNAV;
-          }
-        }
-        if (bitExtracted(int(datasource), 1, 9)) {
+        }
+        if (bitExtracted(unsigned(datasource), 1, 9)) {
           _fnav = false;
           _inav = true;
+          _type = t_eph::INAV;
           /* set unused F/NAV values */
           _E5a_HS = 0.0;
           _E5a_DataInvalid = false;
-          // Source RINEX version < 4
-          if (type() == t_eph::undefined) {
-            _type = t_eph::INAV;
-          }
         }
         // GAL week # in RINEX is aligned/identical to continuous GPS week # used in RINEX
@@ -1845,7 +1819,4 @@
           _BGD_1_5B = 0.0;
         }
-        if (prnStr.at(0) == 'E') {
-          _prn.set('E', prnStr.mid(1).toInt(), _inav ? 1 : 0);
-        }
       }
     }
@@ -1860,4 +1831,5 @@
     }
   }
+  _prn.setFlag(type());
 }
 
@@ -2174,5 +2146,4 @@
         prnStr.append(n);
       }
-      in >> year >> month >> day >> hour >> min >> sec;
       if (prnStr.at(0) == 'S') {
         _prn.set('S', prnStr.mid(1).toInt());
@@ -2180,4 +2151,7 @@
         _prn.set('S', prnStr.toInt());
       }
+      _prn.setFlag(type());
+
+      in >> year >> month >> day >> hour >> min >> sec;
 
       if (year < 80) {
@@ -2417,5 +2391,4 @@
         prnStr.append(n);
       }
-      in >> year >> month >> day >> hour >> min >> sec;
       if (prnStr.at(0) == 'C') {
         _prn.set('C', prnStr.mid(1).toInt());
@@ -2424,4 +2397,5 @@
       }
 
+      in >> year >> month >> day >> hour >> min >> sec;
       if (year < 80) {
         year += 2000;
@@ -2654,4 +2628,5 @@
     }
   }
+  _prn.setFlag(type());
 
   _TOE.setBDS(int(_BDTweek), _TOEsec);
Index: /trunk/BNC/src/ephemeris.h
===================================================================
--- /trunk/BNC/src/ephemeris.h	(revision 10598)
+++ /trunk/BNC/src/ephemeris.h	(revision 10599)
@@ -18,5 +18,5 @@
   enum e_system {unknown, GPS, QZSS, GLONASS, Galileo, SBAS, BDS, IRNSS};
   enum e_checkState {unchecked, ok, bad, outdated, unhealthy};
-  enum e_type {undefined, LNAV, FDMA, FNAV, INAV, D1, D2, SBASL1, CNAV, CNV1, CNV2, CNV3, L1NV, L1OC, L3OC};
+  enum e_type {undefined, LNAV, FDMA, FDMA_M, FNAV, INAV, D1, D2, SBASL1, CNAV, CNV1, CNV2, CNV3, L1NV, L1OC, L3OC};
 
   t_eph();
@@ -43,7 +43,5 @@
   }
   e_type type() const {return _type;}
-  void setType(QString typeStr);
-
-  t_prn prn() const {return _prn;}
+  t_prn  prn()  const {return _prn;}
   t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
   void setOrbCorr(const t_orbCorr* orbCorr);
@@ -292,11 +290,11 @@
   virtual unsigned int isUnhealthy() const;
   virtual int slotNum() const {return int(_frq_num);}
-
+  virtual bool validMdata() const {return (_M_M ? true : false);}
  private:
   virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
   static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc);
 
-  mutable bncTime      _tt;   // time
-  mutable ColumnVector _xv;   // status vector (position, velocity) at time _tt
+  mutable bncTime      _tt;    // time
+  mutable ColumnVector _xv;    // status vector (position, velocity) at time _tt
 
   double  _gps_utc;            // [s]
Index: /trunk/BNC/src/rinex/corrfile.cpp
===================================================================
--- /trunk/BNC/src/rinex/corrfile.cpp	(revision 10598)
+++ /trunk/BNC/src/rinex/corrfile.cpp	(revision 10599)
@@ -35,5 +35,5 @@
  * Created:    12-Feb-2012
  *
- * Changes:    
+ * Changes:
  *
  * -----------------------------------------------------------------------*/
@@ -98,5 +98,6 @@
       while (it.hasNext()) {
         const t_orbCorr& corr = it.next();
-        _corrIODs[QString(corr._prn.toInternalString().c_str())] = corr._iod;
+        QString corrPrn = QString(corr._prn.toInternalString().c_str());
+        _corrIODs[corrPrn] = corr._iod;
       }
       emit newOrbCorrections(orbCorrList);
Index: /trunk/BNC/src/rinex/rnxnavfile.cpp
===================================================================
--- /trunk/BNC/src/rinex/rnxnavfile.cpp	(revision 10598)
+++ /trunk/BNC/src/rinex/rnxnavfile.cpp	(revision 10599)
@@ -303,5 +303,4 @@
 
     if (eph) {
-      eph->setType(navType);
       _ephs.push_back(eph);
     }
@@ -321,11 +320,15 @@
     while (itIOD.hasNext()) {
       itIOD.next();
-      QString prn = itIOD.key();
-      unsigned int iod = itIOD.value();
+      QString      corrPrn = itIOD.key();
+      unsigned int corrIod = itIOD.value();
       vector<t_eph*>::iterator it = _ephs.begin();
       while (it != _ephs.end()) {
         t_eph* eph = *it;
         double dt = eph->TOC() - tt;
-        if (dt < 8*3600.0 && QString(eph->prn().toInternalString().c_str()) == prn && eph->IOD() == iod) {
+        QString      ephPrn = QString(eph->prn().toInternalString().c_str());
+        unsigned int ephIod = eph->IOD();
+        if (dt < 8*3600.0 &&
+            ephPrn == corrPrn &&
+            ephIod == corrIod) {
           it = _ephs.erase(it);
           return eph;
@@ -343,5 +346,8 @@
       t_eph* eph = *it;
       double dt = eph->TOC() - tt;
-      if (dt < 2*3600.0) {
+      char sys = eph->prn().system();
+      int  num = eph->prn().number();
+      int ssrNavType = t_corrSSR::getSsrNavTypeFlag(sys, num);
+      if (dt < 2*3600.0 && eph->type() == ssrNavType) {
         it = _ephs.erase(it);
         return eph;
Index: /trunk/BNC/src/rinex/rnxobsfile.cpp
===================================================================
--- /trunk/BNC/src/rinex/rnxobsfile.cpp	(revision 10598)
+++ /trunk/BNC/src/rinex/rnxobsfile.cpp	(revision 10599)
@@ -1224,6 +1224,9 @@
       line = _stream->readLine();
       t_prn prn; prn.set(line.left(3).toLatin1().data());
+      char sys = prn.system();
+      int num  = prn.number();
+      int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+      prn.setFlag(flag);
       _currEpo.rnxSat[iSat].prn = prn;
-      char sys = prn.system();
       for (int iType = 0; iType < _header.nTypes(sys); iType++) {
         int pos = 3 + 16*iType;
@@ -1309,6 +1312,9 @@
         sys = 'G';
       }
-      int satNum; readInt(line, pos + 1, 2, satNum);
-      _currEpo.rnxSat[iSat].prn.set(sys, satNum);
+      int num; readInt(line, pos + 1, 2, num);
+      int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+      t_prn prn;
+      prn.set(sys, num, flag);
+      _currEpo.rnxSat[iSat].prn = prn;
 
       pos += 3;
@@ -1593,8 +1599,11 @@
                                  const t_rnxObsFile::t_rnxSat& rnxSat, t_satObs& obs) {
   obs._staID = rnxObsFile->markerName().toLatin1().constData();
+  obs._time  = epo->tt;
   obs._prn   = rnxSat.prn;
-  obs._time  = epo->tt;
-
-  char sys   = rnxSat.prn.system();
+
+  char sys  = obs._prn.system();
+  int  num  = obs._prn.number();
+  int  flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+  obs._prn.setFlag(flag);
 
   QChar addToL2;
Index: /trunk/BNC/src/satObs.cpp
===================================================================
--- /trunk/BNC/src/satObs.cpp	(revision 10598)
+++ /trunk/BNC/src/satObs.cpp	(revision 10599)
@@ -64,7 +64,10 @@
 
     in >> corr._prn >> corr._iod >> corr._dClk >> corr._dotDClk >> corr._dotDotDClk;
-    if (corr._prn.system() == 'E') {
-      corr._prn.setFlags(1);// I/NAV
-    }
+
+    char sys = corr._prn.system();
+    int num  = corr._prn.number();
+    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    corr._prn.setFlag(flag);
+
     corr._dClk       /= (t_CST::c);
     corr._dotDClk    /= (t_CST::c * 1.e3);
@@ -137,11 +140,13 @@
        >> corr._dotXr[0] >> corr._dotXr[1] >> corr._dotXr[2];
 
+    char sys = corr._prn.system();
+    int num  = corr._prn.number();
+    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    corr._prn.setFlag(flag);
+
     corr._dotXr[0] /= 1.e3; // mm/s => m/s
     corr._dotXr[1] /= 1.e3; // mm/s => m/s
     corr._dotXr[2] /= 1.e3; // mm/s => m/s
 
-    if (corr._prn.system() == 'E') {
-      corr._prn.setFlags(1);// I/NAV
-    }
     corrList.push_back(corr);
   }
@@ -201,4 +206,9 @@
     in >> corr._prn >> corr._iod >> corr._ura;
 
+    char sys = corr._prn.system();
+    int num  = corr._prn.number();
+    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    corr._prn.setFlag(flag);
+
     corrList.push_back(corr);
   }
@@ -255,4 +265,9 @@
     int numBias;
     in >> satCodeBias._prn >> numBias;
+
+    char sys = satCodeBias._prn.system();
+    int num  = satCodeBias._prn.number();
+    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    satCodeBias._prn.setFlag(flag);
 
     while (in.good()) {
@@ -338,4 +353,9 @@
     satPhaseBias._yaw = yawDeg * M_PI / 180.0;
     satPhaseBias._yawRate = yawDegRate * M_PI / 180.0;
+
+    char sys = satPhaseBias._prn.system();
+    int num  = satPhaseBias._prn.number();
+    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    satPhaseBias._prn.setFlag(flag);
 
     while (in.good()) {
@@ -460,2 +480,38 @@
   return unknown;
 }
+
+// Set NAV type to force NAVtype usage according SSR standard
+/////////////////////////////////////////////////////////////
+t_eph::e_type  t_corrSSR::getSsrNavTypeFlag(char sys, int num) {
+
+  t_eph::e_type flag = t_eph::undefined;
+
+  switch (sys) {
+    case 'G':
+    case 'J':
+      flag = t_eph::LNAV;
+      break;
+    case 'R':
+      flag = t_eph::FDMA_M;
+      break;
+    case 'E':
+      flag = t_eph::INAV;
+      break;
+    case 'C':
+      if (num < 6) {// GEO
+        flag = t_eph::D2;
+      }
+      else if (num > 58 && num < 63) { // GEO
+        flag = t_eph::D2;
+      }
+      else {
+        flag = t_eph::D1;
+      }
+      break;
+    case 'S':
+      flag = t_eph::SBASL1;
+      break;
+  }
+
+  return flag;
+}
Index: /trunk/BNC/src/satObs.h
===================================================================
--- /trunk/BNC/src/satObs.h	(revision 10598)
+++ /trunk/BNC/src/satObs.h	(revision 10599)
@@ -11,4 +11,5 @@
 #include "bnctime.h"
 #include "t_prn.h"
+#include "ephemeris.h"
 
 class t_frqObs  {
@@ -85,5 +86,5 @@
   t_prn                  _prn;
   bncTime                _time;
-  int                    _type;
+  int                    _type; // MT
   std::vector<t_frqObs*> _obs;
 };
@@ -220,5 +221,5 @@
   static e_type readEpoLine(const std::string& line, bncTime& epoTime,
                             unsigned int& updateInt, int& numEntries, std::string& staID);
-};
-
+  static t_eph::e_type getSsrNavTypeFlag(char sys, int num);
+};
 #endif
Index: /trunk/BNC/src/t_prn.cpp
===================================================================
--- /trunk/BNC/src/t_prn.cpp	(revision 10598)
+++ /trunk/BNC/src/t_prn.cpp	(revision 10599)
@@ -46,5 +46,5 @@
 string t_prn::toInternalString() const {
   stringstream ss;
-  ss << _system << setfill('0') << setw(2) << _number << '_' << _flags;
+  ss << _system << setfill('0') << setw(2) << _number << '_' << _flag;
   return ss.str();
 }
Index: /trunk/BNC/src/t_prn.h
===================================================================
--- /trunk/BNC/src/t_prn.h	(revision 10598)
+++ /trunk/BNC/src/t_prn.h	(revision 10599)
@@ -17,12 +17,12 @@
 
   t_prn() :
-      _system('G'), _number(0), _flags(0) {
+      _system('G'), _number(0), _flag(0) {
   }
   t_prn(char system, int number) :
-      _system(system), _number(number), _flags(0) {
+      _system(system), _number(number), _flag(0) {
   }
 
-  t_prn(char system, int number, int flags) :
-      _system(system), _number(number), _flags(flags) {
+  t_prn(char system, int number, int flag) :
+      _system(system), _number(number), _flag(flag) {
   }
 
@@ -33,15 +33,15 @@
     _system = system;
     _number = number;
-    _flags  = 0;
+    _flag  = 0;
   }
 
-  void set(char system, int number, int flags) {
+  void set(char system, int number, int flag) {
     _system = system;
     _number = number;
-    _flags  = flags;
+    _flag  = flag;
   }
 
-  void setFlags(int flags) {
-    _flags  = flags;
+  void setFlag(int flag) {
+    _flag  = flag;
   }
 
@@ -54,6 +54,6 @@
     return _number;
   }
-  int flags() const {
-    return _flags;
+  int flag() const {
+    return _flag;
   }
   int toInt() const;
@@ -64,5 +64,5 @@
     if (_system == prn2._system &&
         _number == prn2._number &&
-        _flags  == prn2._flags) {
+        _flag   == prn2._flag) {
       return true;
     }
@@ -78,5 +78,5 @@
     _system = 'G';
     _number = 0;
-    _flags = 0;
+    _flag = 0;
   }
 
@@ -87,6 +87,6 @@
 private:
   char _system;
-  int _number;
-  int _flags;
+  int  _number;
+  int  _flag;
 };
 
Index: /trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- /trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 10598)
+++ /trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 10599)
@@ -461,5 +461,4 @@
   }
 
-
   struct SsrCorr::CodeBias bias;
   memset(&bias, 0, sizeof(bias));
@@ -526,5 +525,4 @@
     ColumnVector rtnClk; rtnClk.ReSize(3); rtnClk = 0.0;          // [m, m/s, m/s²]
     ColumnVector rtnClkSig; rtnClkSig.ReSize(3); rtnClkSig = 0.0; // [m, m/s, m/s²]
-    t_prn prn;
 
     QTextStream in(epochLines[ii].toLatin1());
@@ -560,16 +558,14 @@
     }
     // satellite specific parameters
+    t_prn prn;
     char sys = key.mid(0, 1).at(0).toLatin1();
-    int number = key.mid(1, 2).toInt();
-    int flags = 0;
-    if (sys == 'E') { // I/NAV
-      flags = 1;
-    }
-    if (number == 0) {
+    int  num = key.mid(1, 2).toInt();
+    int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
+    if (!num) {
       continue;
     }
-    prn.set(sys, number, flags);
+    prn.set(sys, num, flag);
     QString prnInternalStr = QString::fromStdString(prn.toInternalString());
-    QString prnStr = QString::fromStdString(prn.toString());
+    QString prnStr         = QString::fromStdString(prn.toString());
 
     const t_eph* ephLast = _ephUser->ephLast(prnInternalStr);
