Index: /branches/BNC_2.12/src/bncephuser.cpp
===================================================================
--- /branches/BNC_2.12/src/bncephuser.cpp	(revision 8845)
+++ /branches/BNC_2.12/src/bncephuser.cpp	(revision 8846)
@@ -221,31 +221,45 @@
     QDateTime now = currentDateAndTimeGPS();
     bncTime currentTime(now.toString(Qt::ISODate).toStdString());
-    double timeDiff = fabs(toc - currentTime);
-
-    if      (eph->type() == t_eph::GPS     && timeDiff > 4*3600) { // update interval: 2h, data sets are valid for 4 hours
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::Galileo && timeDiff > 4*3600) { // update interval: 2h, data sets are valid for 4 hours
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::GLONASS && timeDiff > 2*3600) { // updated every 30 minutes
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::QZSS    && timeDiff > 4*3600) { // orbit parameters are valid for 7200 seconds (at minimum)
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::SBAS    && timeDiff > 600) { // maximum update interval: 300 sec
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::BDS     && timeDiff > 6*3600) { // updates (GEO) up to 6 hours
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::IRNSS   && timeDiff > 24*3600) { // update interval: up to 24 hours
+    double timeDiff = currentTime - toc;
+
+    // update interval: 2h, data sets are valid for 4 hours
+    if      ((eph->type() == t_eph::GPS)     &&
+             (timeDiff < -2*3600 || timeDiff > 4*3600)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // update interval: 3h, data sets are valid for 4 hours
+    else if ((eph->type() == t_eph::Galileo) &&
+             (timeDiff < -3*3600 || timeDiff > 4*3600)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // updated every 30 minutes
+    else if ((eph->type() == t_eph::GLONASS) &&
+             (timeDiff < -1800   || timeDiff > 2*3600)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // orbit parameters are valid for 7200 seconds (minimum)
+    else if ((eph->type() == t_eph::QZSS)    &&
+             (timeDiff < -1*3600 || timeDiff > 3*3600)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // maximum update interval: 300 sec
+    else if ((eph->type() == t_eph::SBAS)    &&
+             (timeDiff < -300    || timeDiff > 1*3600)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // updates 1h (GEO) up to 6 hours non-GEO
+    else if ((eph->type() == t_eph::BDS)     &&
+             (timeDiff < -1*3600 || timeDiff > 6*3600)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // update interval: up to 24 hours
+    else if ((eph->type() == t_eph::IRNSS)   &&
+             (timeDiff < -1*3600 || timeDiff > 24*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -269,25 +283,25 @@
 
     // some lines to allow update of ephemeris data sets after outage
-    if      (eph->type() == t_eph::GPS     && dt > 4*3600) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::Galileo && dt > 4*3600) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::GLONASS && dt > 2*3600) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if (eph->type() == t_eph::QZSS    && dt > 4*3600) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if  (eph->type() == t_eph::SBAS   && dt > 600)    {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    else if  (eph->type() == t_eph::BDS    && dt > 6*3600) {
+    if      (eph->type() == t_eph::GPS     && dt >  4*3600) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    else if (eph->type() == t_eph::Galileo && dt >  4*3600) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    else if (eph->type() == t_eph::GLONASS && dt >  2*3600) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    else if (eph->type() == t_eph::QZSS    && dt >  3*3600) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    else if  (eph->type() == t_eph::SBAS   && dt >    3600) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    else if  (eph->type() == t_eph::BDS    && dt >  6*3600) {
       ephL->setCheckState(t_eph::outdated);
       return;
