Index: trunk/BNC/src/bncephuser.cpp
===================================================================
--- trunk/BNC/src/bncephuser.cpp	(revision 6808)
+++ trunk/BNC/src/bncephuser.cpp	(revision 6809)
@@ -150,11 +150,9 @@
   }
 
-  QString prn(newEph->prn().toString().c_str());
+  QString prn(newEph->prn().toInternalString().c_str());
 
   const t_eph* ephOld = ephLast(prn);
 
-  if (ephOld == 0 ||
-      newEph->isNewerThan(ephOld) ||
-      newEph->hasOtherFlagsThan(ephOld)) {
+  if (ephOld == 0 || newEph->isNewerThan(ephOld)) {
     deque<t_eph*>& qq = _eph[prn];
     qq.push_back(newEph);
@@ -201,5 +199,5 @@
   // ----------------------------------------
   const double MAXDIFF = 1000.0;
-  QString      prn     = QString(eph->prn().toString().c_str());
+  QString      prn     = QString(eph->prn().toInternalString().c_str());
   t_eph*       ephL    = ephLast(prn);
   if (ephL) {
@@ -212,5 +210,5 @@
 
     if (diff < MAXDIFF) {
-      if(dt != 0.0 || eph->hasOtherFlagsThan(ephL)) {
+      if(dt != 0.0) {
         eph->setCheckState(t_eph::ok);
         ephL->setCheckState(t_eph::ok);
Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 6808)
+++ trunk/BNC/src/ephemeris.cpp	(revision 6809)
@@ -23,5 +23,4 @@
   _orbCorr    = 0;
   _clkCorr    = 0;
-  _flags      = 0;
 }
 
@@ -798,11 +797,13 @@
 //////////////////////////////////////////////////////////////////////////////
 t_ephGal::t_ephGal(float rnxVersion, const QStringList& lines) {
-
+  int       year, month, day, hour, min;
+  double    sec;
+  QString   prnStr;
   const int nLines = 8;
-
   if (lines.size() != nLines) {
     _checkState = bad;
     return;
   }
+  _flags = 0;
 
   // RINEX Format
@@ -826,16 +827,5 @@
       QTextStream in(line.left(pos[1]).toAscii());
 
-      int    year, month, day, hour, min;
-      double sec;
-      
-      QString prnStr;
       in >> prnStr >> year >> month >> day >> hour >> min >> sec;
-      if (prnStr.at(0) == 'E') {
-        _prn.set('E', prnStr.mid(1).toInt());
-      }
-      else {
-        _prn.set('E', prnStr.toInt());
-      }
-
       if      (year <  80) {
         year += 2000;
@@ -936,4 +926,11 @@
         // Bit 7-8
         _E5bHS = double((int(SVhealth) >> 7) & 0x3);
+
+        if (prnStr.at(0) == 'E') {
+          _prn.set('E', prnStr.mid(1,2).toInt(), _flags);
+        }
+        else {
+          _prn.set('E', prnStr.mid(1,2).toInt(), _flags);
+        }
       }
     }
@@ -954,5 +951,6 @@
   _receptDateTime = currentDateAndTimeGPS();
 
-  _prn.set('E', ee->satellite);
+  _flags    = ee->flags;
+  _prn.set('E', ee->satellite, _flags);
 
   _TOC.set(ee->Week, ee->TOC);
@@ -994,6 +992,4 @@
 
   _TOT      = 0.9999e9;
-
-  _flags    = ee->flags;
 }
 
Index: trunk/BNC/src/ephemeris.h
===================================================================
--- trunk/BNC/src/ephemeris.h	(revision 6808)
+++ trunk/BNC/src/ephemeris.h	(revision 6809)
@@ -34,6 +34,4 @@
   void    setCheckState(e_checkState checkState) {_checkState = checkState;}
   t_prn   prn() const {return _prn;}
-  int     flags() const {return _flags;}
-  bool    hasOtherFlagsThan(const t_eph* eph) {return differentFlags(eph, this);}
   t_irc   getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
   void    setOrbCorr(const t_orbCorr* orbCorr);
@@ -43,5 +41,4 @@
   static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version);
   static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;}
-  static bool differentFlags(const t_eph* eph1, const t_eph* eph2) {return eph1->_flags != eph2->_flags;}
 
  protected:  
@@ -49,5 +46,4 @@
   t_prn        _prn;
   bncTime      _TOC;
-  int          _flags;
   QDateTime    _receptDateTime;
   e_checkState _checkState;
@@ -155,5 +151,5 @@
  friend class t_ephEncoder;
  public:
-  t_ephGal() { }
+  t_ephGal() : _flags(0) { };
   t_ephGal(float rnxVersion, const QStringList& lines);
   virtual ~t_ephGal() {}
@@ -192,5 +188,5 @@
 
   double  _IDOT;             //  [rad/s]
-  double _TOEweek;
+  double  _TOEweek;
   // spare
 
@@ -202,5 +198,11 @@
   double  _BGD_1_5B;         //  group delay [s] 
 
-  double _TOT;               // [s]
+  double  _TOT;              // [s]
+
+  int     _flags;            // GALEPHF_E5ADINVALID   E5aDVS set invalid
+                             // GALEPHF_E5BDINVALID   E5bDVS set invalid
+                             // GALEPHF_INAV          INAV data
+                             // GALEPHF_FNAV          FNAV data
+                             // GALEPHF_E1DINVALID    E1DVS set invalid
 };
 
Index: trunk/BNC/src/rinex/reqcedit.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcedit.cpp	(revision 6808)
+++ trunk/BNC/src/rinex/reqcedit.cpp	(revision 6809)
@@ -546,6 +546,5 @@
       const t_eph* ephOld = ephs[iOld];
       if (ephOld->prn() == eph->prn() &&
-          ephOld->TOC() == eph->TOC() &&
-          ephOld->flags() == eph->flags()) {
+          ephOld->TOC() == eph->TOC()) {
         isNew = false;
         break;
Index: trunk/BNC/src/t_prn.cpp
===================================================================
--- trunk/BNC/src/t_prn.cpp	(revision 6808)
+++ trunk/BNC/src/t_prn.cpp	(revision 6809)
@@ -36,4 +36,12 @@
   stringstream ss;
   ss << _system << setfill('0') << setw(2) << _number;
+  return ss.str();
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
+string t_prn::toInternalString() const {
+  stringstream ss;
+  ss << _system << setfill('0') << setw(2) << _number << '_' << _flags;
   return ss.str();
 }
Index: trunk/BNC/src/t_prn.h
===================================================================
--- trunk/BNC/src/t_prn.h	(revision 6808)
+++ trunk/BNC/src/t_prn.h	(revision 6809)
@@ -5,29 +5,58 @@
 
 class t_prn {
- public:
-  static const unsigned MAXPRN_GPS     = 32;
+public:
+  static const unsigned MAXPRN_GPS = 32;
   static const unsigned MAXPRN_GLONASS = 26;
   static const unsigned MAXPRN_GALILEO = 36;
-  static const unsigned MAXPRN_QZSS    = 10;
-  static const unsigned MAXPRN_SBAS    = 38;
-  static const unsigned MAXPRN_BDS     = 37;
-  static const unsigned MAXPRN         = MAXPRN_GPS  + MAXPRN_GLONASS + MAXPRN_GALILEO
-		                               + MAXPRN_QZSS + MAXPRN_SBAS    + MAXPRN_BDS;
+  static const unsigned MAXPRN_QZSS = 10;
+  static const unsigned MAXPRN_SBAS = 38;
+  static const unsigned MAXPRN_BDS = 37;
+  static const unsigned MAXPRN = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO
+      + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS;
 
-  t_prn() : _system('G'), _number(0) {}
-  t_prn(char system, int number) : _system(system), _number(number) {}
+  t_prn() :
+      _system('G'), _number(0), _flags(0) {
+  }
+  t_prn(char system, int number) :
+      _system(system), _number(number), _flags(0) {
+  }
 
-  ~t_prn() {}; 
+  t_prn(char system, int number, int flags) :
+      _system(system), _number(number), _flags(flags) {
+  }
 
-  void        set(char system, int number) {_system = system; _number = number;} 
-  void        set(const std::string& str);
+  ~t_prn() {
+  }
 
-  char        system() const {return _system;}
-  int         number() const {return _number;}
-  int         toInt() const;
+  void set(char system, int number) {
+    _system = system;
+    _number = number;
+    _flags  = 0;
+  }
+
+  void set(char system, int number, int flags) {
+    _system = system;
+    _number = number;
+    _flags  = flags;
+  }
+
+  void set(const std::string& str);
+
+  char system() const {
+    return _system;
+  }
+  int number() const {
+    return _number;
+  }
+  int flags() const {
+    return _flags;
+  }
+  int toInt() const;
   std::string toString() const;
+  std::string toInternalString() const;
 
   bool operator==(const t_prn& prn2) const {
-    if (_system == prn2._system && _number == prn2._number) {
+    if (_system == prn2._system && _number == prn2._number
+        && _flags == prn2._flags) {
       return true;
     }
@@ -39,12 +68,13 @@
   operator unsigned() const;
 
-  friend std::istream& operator >> (std::istream& in, t_prn& prn);
+  friend std::istream& operator >>(std::istream& in, t_prn& prn);
 
- private:
+private:
   char _system;
-  int  _number;
+  int _number;
+  int _flags;
 };
 
-std::istream& operator >> (std::istream& in, t_prn& prn);
+std::istream& operator >>(std::istream& in, t_prn& prn);
 
 #endif
