Index: trunk/BNC/src/bncephuser.cpp
===================================================================
--- trunk/BNC/src/bncephuser.cpp	(revision 6796)
+++ trunk/BNC/src/bncephuser.cpp	(revision 6798)
@@ -154,5 +154,7 @@
   const t_eph* ephOld = ephLast(prn);
 
-  if (ephOld == 0 || newEph->isNewerThan(ephOld)) {
+  if (ephOld == 0 ||
+      newEph->isNewerThan(ephOld) ||
+      newEph->hasOtherFlagsThan(ephOld)) {
     deque<t_eph*>& qq = _eph[prn];
     qq.push_back(newEph);
@@ -210,5 +212,5 @@
 
     if (diff < MAXDIFF) {
-      if (dt != 0.0) {
+      if(dt != 0.0 || eph->hasOtherFlagsThan(ephL)) {
         eph->setCheckState(t_eph::ok);
         ephL->setCheckState(t_eph::ok);
Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 6796)
+++ trunk/BNC/src/ephemeris.cpp	(revision 6798)
@@ -23,4 +23,5 @@
   _orbCorr    = 0;
   _clkCorr    = 0;
+  _flags      = 0;
 }
 
@@ -426,6 +427,4 @@
 void t_ephGal::set(const galileoephemeris* ee) {
 
-  _SISA     = -1.0; // set RINEX entry to invalid
-
   _receptDateTime = currentDateAndTimeGPS();
 
@@ -448,4 +447,5 @@
 
   _TOEsec   = _TOC.gpssec();
+  //  _TOEsec   = ee->TOE;  // TODO:
 
   _Cic      = ee->Cic;
@@ -461,5 +461,19 @@
   _TOEweek  = ee->Week;
   
-  _SISAI    = ee->SISA; // index from RTCM
+  if ((ee->SISA >= 0) && (ee->SISA <= 49)) {
+    _SISA = ee->SISA / 100.0;
+  }
+  else if((ee->SISA >= 50) && (ee->SISA <= 74)) {
+    _SISA = (50 + (ee->SISA - 50.0) * 2.0) / 100.0;
+  }
+  else if((ee->SISA >= 75) && (ee->SISA <= 99)) {
+    _SISA = 1.0 + (ee->SISA - 75.0) * 0.04;
+  }
+  else if((ee->SISA >= 100) && (ee->SISA <= 125)) {
+    _SISA = 2.0 + (ee->SISA - 100.0) * 0.16;
+  }
+  else if (ee->SISA >= 126 ) {
+    _SISA = -1.0;
+  }
   _E5aHS    = ee->E5aHS;
   _E5bHS    = ee->E5bHS;
@@ -813,6 +827,6 @@
   double SVhealth = 0.0;
   double datasource = 0.0;
+
   int pos[4];
-  _SISAI = -1; // set index from RTCM invalid
   pos[0] = (rnxVersion <= 2.12) ?  3 :  4;
   pos[1] = pos[0] + fieldLen;
@@ -1196,24 +1210,6 @@
     .arg(0.0,                19, 'e', 12);
 
-  // RINEX file input
-  double SISA = _SISA; // [m]
-  // RTCM stream input
-  if ((_SISAI >= 0) && (_SISAI <= 49)) {
-    SISA = _SISAI / 100.0;
-  }
-  if((_SISAI >= 50) && (_SISAI <= 74)) {
-    SISA = (50 + (_SISAI - 50.0) * 2.0) / 100.0;
-  }
-  if((_SISAI >= 75) && (_SISAI <= 99)) {
-    SISA = 1.0 + (_SISAI - 75.0) * 0.04;
-  }
-  if((_SISAI >= 100) && (_SISAI <= 125)) {
-    SISA = 2.0 + (_SISAI - 100.0) * 0.16;
-  }
-  if (_SISAI >= 126 ) {
-    SISA = -1.0;
-  }
-  out << QString(fmt)
-    .arg(SISA,             19, 'e', 12)
+  out << QString(fmt)
+    .arg(_SISA,            19, 'e', 12)
     .arg(double(SVhealth), 19, 'e', 12)
     .arg(BGD_1_5A,         19, 'e', 12)
@@ -1436,5 +1432,4 @@
   int fieldLen = 19;
   double TOEw;
-  _URAI = -1; // RINEX usage: set RTCM entry to be undefined
 
   int pos[4];
@@ -1618,5 +1613,10 @@
   _TGD2     = ee->TGD_B2_B3;
 
-  _URAI     = ee->URAI;
+  if ((ee->URAI <  6) && (ee->URAI >= 0)) {
+    _URA = ceil(10.0 * pow(2.0, ((double)ee->URAI/2.0) + 1.0)) / 10.0;
+  }
+  if ((ee->URAI >= 6) && (ee->URAI < 15)) {
+    _URA = ceil(10.0 * pow(2.0, ((double)ee->URAI/2.0)      )) / 10.0;
+  }
   _SatH1    = (ee->flags & BDSEPHF_SATH1) ? 1: 0;
 
@@ -1796,5 +1796,4 @@
     .arg(_OMEGADOT, 19, 'e', 12);
 
-
   out << QString(fmt)
     .arg(_IDOT,                             19, 'e', 12)
@@ -1803,15 +1802,6 @@
     .arg(0.0,                               19, 'e', 12);
 
-  // RINEX file input
-  double ura = _URA;
-  // RTCM stream input
-  if ((_URAI <  6) && (_URAI >= 0)) {
-    ura = ceil(10.0 * pow(2.0, ((double)_URAI/2.0) + 1.0)) / 10.0;
-  }
-  if ((_URAI >= 6) && (_URAI < 15)) {
-    ura = ceil(10.0 * pow(2.0, ((double)_URAI/2.0)      )) / 10.0;
-  }
-  out << QString(fmt)
-    .arg(ura,            19, 'e', 12)
+  out << QString(fmt)
+    .arg(_URA,           19, 'e', 12)
     .arg(double(_SatH1), 19, 'e', 12)
     .arg(_TGD1,          19, 'e', 12)
Index: trunk/BNC/src/ephemeris.h
===================================================================
--- trunk/BNC/src/ephemeris.h	(revision 6796)
+++ trunk/BNC/src/ephemeris.h	(revision 6798)
@@ -34,4 +34,6 @@
   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);
@@ -41,4 +43,5 @@
   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:  
@@ -46,4 +49,5 @@
   t_prn        _prn;
   bncTime      _TOC;
+  int          _flags;
   QDateTime    _receptDateTime;
   e_checkState _checkState;
@@ -98,5 +102,5 @@
   double  _L2PFlag;         // L2 P data flag
 
-  mutable double  _ura;             // SV accuracy
+  mutable double  _ura;     // SV accuracy
   double  _health;          // SV health
   double  _TGD;             // [s]    
@@ -191,9 +195,5 @@
   // spare
 
-  int     _SISAI;            //  [0..255] Signal In Space Accuracy Index from RTCM stream
-  double  _SISA;             //  [m]      Signal In Space Accuracy from RINEX file
-  // Health Status
-  //   0: signal OK, 1: signal out of service, 2: signal will be out of service
-  //   3: signal component currently in test
+  mutable double  _SISA;     // Signal In Space Accuracy
   double  _E5aHS;            //  [0..3] E5a Health Status
   double  _E5bHS;            //  [0..3] E5b Health Status
@@ -203,5 +203,4 @@
 
   double _TOT;               // [s]
-  int    _flags;
 };
 
@@ -238,5 +237,5 @@
   double _z_acceleration; // [m/s^2] 
 
-  double _ura;
+  mutable double _ura;
   double _health;
 };
@@ -263,6 +262,5 @@
   int     _AODE;
   int     _AODC;
-  int     _URAI;             //  [0..15] index from RTCM stream
-  double  _URA;              //  [m]     from RINEX file
+  mutable double  _URA;      //  user range accuracy
   double  _clock_bias;       //  [s]    
   double  _clock_drift;      //  [s/s]  
