Index: /trunk/BNC/rinex/rnxnavfile.cpp
===================================================================
--- /trunk/BNC/rinex/rnxnavfile.cpp	(revision 3763)
+++ /trunk/BNC/rinex/rnxnavfile.cpp	(revision 3764)
@@ -162,4 +162,6 @@
                                 const QMap<QString, int>* corrIODs) {
 
+  // Get Ephemeris according to IOD
+  // ------------------------------
   if (corrIODs) {
     QMapIterator<QString, int> itIOD(*corrIODs);
@@ -180,16 +182,21 @@
   }
 
-//  while (!_ephs.empty()) {
-//    t_eph* eph = _ephs.front();
-//    bncTime ephTime(eph->GPSweek(), eph->GPSweeks());
-//    double dt = ephTime - tt;
-//    if (dt < 2*3600.0) {
-//      _ephs.pop();
-//      return eph;
-//    }
-//    else {
-//      return 0;
-//    }
-//  }
+  // Get Ephemeris according to time
+  // -------------------------------
+  else {
+    vector<t_eph*>::iterator it = _ephs.begin();
+    while (it != _ephs.end()) {
+      t_eph* eph = *it;
+
+      bncTime ephTime(eph->GPSweek(), eph->GPSweeks());
+      double dt = ephTime - tt;
+
+      if (dt < 2*3600.0) {
+        it = _ephs.erase(it);
+        return eph;
+      }
+      ++it;
+    }
+  }
 
   return 0;
