Index: /branches/BNC_2.12/src/bncephuser.cpp
===================================================================
--- /branches/BNC_2.12/src/bncephuser.cpp	(revision 8849)
+++ /branches/BNC_2.12/src/bncephuser.cpp	(revision 8850)
@@ -221,9 +221,9 @@
     QDateTime now = currentDateAndTimeGPS();
     bncTime currentTime(now.toString(Qt::ISODate).toStdString());
-    double timeDiff = currentTime - toc;
+    double dt = currentTime - toc;
 
     // update interval: 2h, data sets are valid for 4 hours
     if      ((eph->type() == t_eph::GPS)     &&
-             (timeDiff < -2*3600 || timeDiff > 4*3600)) {
+             (dt < -2*3600 || dt > 4*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -231,5 +231,5 @@
     // update interval: 3h, data sets are valid for 4 hours
     else if ((eph->type() == t_eph::Galileo) &&
-             (timeDiff < -3*3600 || timeDiff > 4*3600)) {
+             (dt < -3*3600 || dt > 4*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -237,5 +237,5 @@
     // updated every 30 minutes
     else if ((eph->type() == t_eph::GLONASS) &&
-             (timeDiff < -1800   || timeDiff > 2*3600)) {
+             (dt < -1800   || dt > 2*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -243,5 +243,5 @@
     // orbit parameters are valid for 7200 seconds (minimum)
     else if ((eph->type() == t_eph::QZSS)    &&
-             (timeDiff < -1*3600 || timeDiff > 3*3600)) {
+             (dt < -1*3600 || dt > 3*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -249,5 +249,5 @@
     // maximum update interval: 300 sec
     else if ((eph->type() == t_eph::SBAS)    &&
-             (timeDiff < -300    || timeDiff > 1*3600)) {
+             (dt < -300    || dt > 1*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -255,5 +255,5 @@
     // updates 1h (GEO) up to 6 hours non-GEO
     else if ((eph->type() == t_eph::BDS)     &&
-             (timeDiff < -1*3600 || timeDiff > 6*3600)) {
+             (dt < -1*3600 || dt > 6*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -261,5 +261,5 @@
     // update interval: up to 24 hours
     else if ((eph->type() == t_eph::IRNSS)   &&
-             (timeDiff < -1*3600 || timeDiff > 24*3600)) {
+             (dt < -1*3600 || dt > 24*3600)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -277,6 +277,8 @@
     ColumnVector vvL(3);
     ephL->getCrd(eph->TOC(), xcL, vvL, false);
-
-    double dt    = fabs(eph->TOC() - ephL->TOC());
+    double dt = eph->TOC() - ephL->TOC();
+    if (dt < 0.0) {
+      dt += 604800.0;
+    }
     double diff  = (xc.Rows(1,3) - xcL.Rows(1,3)).norm_Frobenius();
     double diffC = fabs(xc(4) - xcL(4)) * t_CST::c;
Index: /branches/BNC_2.12/src/bncversion.h
===================================================================
--- /branches/BNC_2.12/src/bncversion.h	(revision 8849)
+++ /branches/BNC_2.12/src/bncversion.h	(revision 8850)
@@ -3,5 +3,5 @@
 #define BNCVERSION_H
 
-#define BNCVERSION "2.12.11"
+#define BNCVERSION "2.12.12"
 #define BNCPGMNAME "BNC " BNCVERSION
 
