Index: trunk/BNS/bnseph.cpp
===================================================================
--- trunk/BNS/bnseph.cpp	(revision 884)
+++ trunk/BNS/bnseph.cpp	(revision 886)
@@ -115,4 +115,16 @@
 
   emit(newEph(eph));
+}
+
+// Compare Time
+////////////////////////////////////////////////////////////////////////////
+bool t_eph::isNewerThan(const t_eph* eph) const {
+  if (_GPSweek >  eph->_GPSweek ||
+      (_GPSweek == eph->_GPSweek && _GPSweeks > eph->_GPSweeks)) {
+    return true;
+  }
+  else {
+    return false;
+  }
 }
 
@@ -133,7 +145,7 @@
       QDateTime dateTime(QDate(int(year), int(month), int(day)), 
                          QTime(int(hour), int(minute), int(second)), Qt::UTC);
-      int week;
-      GPSweekFromDateAndTime(dateTime, week, _TOC); 
-      _GPSweek = week;
+
+      GPSweekFromDateAndTime(dateTime, _GPSweek, _GPSweeks); 
+      _TOC = _GPSweeks;
     }
     else if (ii == 2) {
@@ -251,22 +263,4 @@
 }
 
-// Compare Time
-////////////////////////////////////////////////////////////////////////////
-bool t_ephGPS::isNewerThan(const t_eph* ep) const {
-
-  const t_ephGPS* eph = dynamic_cast<const t_ephGPS*>(ep);
-  if (!eph) {
-    return false;
-  } 
-
-  if (_GPSweek >  eph->_GPSweek ||
-      (_GPSweek == eph->_GPSweek && _TOC > eph->_TOC)) {
-    return true;
-  }
-  else {
-    return false;
-  }
-}
-
 // 
 ////////////////////////////////////////////////////////////////////////////
@@ -280,4 +274,6 @@
       in >> _prn >> year >> month >> day >> hour >> minute >> second
          >> _tau >> _gamma;
+
+      _tau = -_tau;
       
       if (year < 100) year += 2000;
@@ -285,10 +281,9 @@
       QDateTime dateTime(QDate(int(year), int(month), int(day)), 
                          QTime(int(hour), int(minute), int(second)), Qt::UTC);
-      int week;
-      GPSweekFromDateAndTime(dateTime, week, _GPSTOW); 
-      _GPSweek = week;
+
+      GPSweekFromDateAndTime(dateTime, _GPSweek, _GPSweeks); 
     }
     else if (ii == 2) {
-      in >>_x_pos >> _x_velocity >> _x_acceleration >> _flags;
+      in >>_x_pos >> _x_velocity >> _x_acceleration >> _health;
     }
     else if (ii == 3) {
@@ -299,10 +294,4 @@
     }
   }
-}
-
-// 
-////////////////////////////////////////////////////////////////////////////
-bool t_ephGlo::isNewerThan(const t_eph* ep) const {
-  return false;
 }
 
Index: trunk/BNS/bnseph.h
===================================================================
--- trunk/BNS/bnseph.h	(revision 884)
+++ trunk/BNS/bnseph.h	(revision 886)
@@ -12,12 +12,16 @@
  public:
   virtual ~t_eph() {};
+
+  bool    isNewerThan(const t_eph* eph) const;
+  QString prn() const {return _prn;}
+
   virtual void position(int GPSweek, double GPSweeks, ColumnVector& xc,
                         ColumnVector& vv) const = 0;
   virtual void read(const QStringList& lines) = 0;
-  virtual bool isNewerThan(const t_eph* ep) const = 0;
   virtual int  IOD() const = 0;
-  QString prn() const {return _prn;}
  protected:  
   QString _prn;
+  int     _GPSweek;
+  double  _GPSweeks;
 };
 
@@ -31,5 +35,4 @@
   virtual void position(int GPSweek, double GPSweeks, ColumnVector& xc,
                         ColumnVector& vv) const;
-  virtual bool isNewerThan(const t_eph* ep) const;
   virtual int  IOD() const;
  private:
@@ -37,6 +40,4 @@
   ColumnVector _xv;
 
-  double _GPSweek;
-  double _GPSTOW;
   double _E;                  /* [days]   */
   double _tau;                /* [s]      */
@@ -51,6 +52,6 @@
   double _z_velocity;         /* [km/s]   */
   double _z_acceleration;     /* [km/s^2] */
-  int    _flags;              /* GLOEPHF_xxx */
-  int    _frequency_number;   /* ICD-GLONASS data position */
+  double _health;             /* 0 = O.K. */
+  double _frequency_number;   /* ICD-GLONASS data position */
 };
 
@@ -67,5 +68,4 @@
 
  private:
-  double  _GPSweek;          
   double  _TOW;              //  [s]    
   double  _TOC;              //  [s]    
