Index: trunk/BNC/src/bncephuser.cpp
===================================================================
--- trunk/BNC/src/bncephuser.cpp	(revision 9356)
+++ trunk/BNC/src/bncephuser.cpp	(revision 9361)
@@ -224,36 +224,36 @@
     double dt = currentTime - toc;
 
-    // update interval: 2h, data sets are valid for 4 hours
-    if      (eph->type() == t_eph::GPS     && (dt > 4*3600.0 || dt < -2*3600.0)) {
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    // update interval: 3h, data sets are valid for 4 hours
-    else if (eph->type() == t_eph::Galileo && (dt > 4*3600.0 || dt <       0.0)) {
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    // updated every 30 minutes
-    else if (eph->type() == t_eph::GLONASS && (dt > 1*3600.0 || dt <   -1800.0)) {
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    // orbit parameters are valid for 7200 seconds (minimum)
-    else if (eph->type() == t_eph::QZSS    && (dt > 2*3600.0 || dt < -1*3600.0)) {
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    // maximum update interval: 300 sec
-    else if (eph->type() == t_eph::SBAS    && (dt >     600 || dt <     -300.0)) {
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    // updates 1h (GEO) up to 6 hours non-GEO
-    else if (eph->type() == t_eph::BDS     && (dt > 6*3600  || dt <        0.0)) {
-      eph->setCheckState(t_eph::outdated);
-      return;
-    }
-    // update interval: up to 24 hours
-    else if (eph->type() == t_eph::IRNSS   && fabs(dt > 24*3600.0)) {
+    // update interval: 2h, data sets are valid for 4 hours + 5 min
+    if      (eph->type() == t_eph::GPS     && (dt > 14700.0 || dt < -7500.0)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // update interval: 3h, data sets are valid for 4 hours + 5 min
+    else if (eph->type() == t_eph::Galileo && (dt > 14700.0 || dt < 0.0)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // updated every 30 minutes + 5 min
+    else if (eph->type() == t_eph::GLONASS && (dt > 3900.0 || dt < -2100.0)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // orbit parameters are valid for 7200 seconds (minimum) + 5 min
+    else if (eph->type() == t_eph::QZSS    && (dt > 7500.0 || dt < 3900.0)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // maximum update interval: 300 sec + 5 min
+    else if (eph->type() == t_eph::SBAS    && (dt > 600.0 || dt < -600.0)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // updates 1h + 5 min
+    else if (eph->type() == t_eph::BDS     && (dt > 3900.0 || dt < 0.0)) {
+      eph->setCheckState(t_eph::outdated);
+      return;
+    }
+    // update interval: up to 24 hours + 5 min
+    else if (eph->type() == t_eph::IRNSS   && fabs(dt > 86700.0)) {
       eph->setCheckState(t_eph::outdated);
       return;
@@ -263,8 +263,16 @@
   // Check consistency with older ephemeris
   // --------------------------------------
-  const double MAXDIFF = 10.0;
-  const double MINDIFF = 0.005;
-  QString      prn     = QString(eph->prn().toInternalString().c_str());
-  t_eph*       ephL    = ephLast(prn);
+  const double MAXDIFF_INIT = 10.0;
+  const double MINDIFF      = 0.005;
+  QString      prn          = QString(eph->prn().toInternalString().c_str());
+  t_eph*       ephL         = ephLast(prn);
+
+  // maxdiff adapted to individual systems
+  char   sys     = eph->prn().system();
+  double MAXDIFF = MAXDIFF_INIT;
+  if (sys == 'C' ||
+      sys == 'S'    ) {
+    MAXDIFF *= 10.0;
+  }
 
   if (ephL) {
@@ -293,41 +301,40 @@
     }
 
-    double dt = eph->TOC() - ephL->TOC();
     // some lines to allow update of ephemeris data sets after an outage
     // -----------------------------------------------------------------
-    // update interval: 2h,
-    // sometimes corrected BRDC sets are sent with TOC values 16 seconds
-    // before the nominal TOC (integer time)
-    if      (eph->type() == t_eph::GPS     && dt > (2*3600.0 + 60.0)) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    // update interval: 3h,
-    else if (eph->type() == t_eph::Galileo && dt > (3*3600.0 + 60.0)) {
+    double dt = eph->TOC() - ephL->TOC();
+
+    // update interval: 2h, + 5 min
+    if      (eph->type() == t_eph::GPS     && dt > 3900.0) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    // update interval: 3h, + 5 min
+    else if (eph->type() == t_eph::Galileo && dt > 11100.0) {
       ephL->setCheckState(t_eph::outdated);
       return;
     }
     // updated every 30 minutes
-    else if (eph->type() == t_eph::GLONASS && dt > (  1800.0 + 60.0)) {
+    else if (eph->type() == t_eph::GLONASS && dt > 2100.0) {
       ephL->setCheckState(t_eph::outdated);
       return;
     }
     // updated every ?
-    else if (eph->type() == t_eph::QZSS    && dt > (2*3600.0 + 60.0)) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    // maximum update interval: 300 sec
-    else if  (eph->type() == t_eph::SBAS   && dt > (   300.0)) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    // updates 1h (GEO) up to 6 hours non-GEO
-    else if  (eph->type() == t_eph::BDS    && dt >  6*3600.0) {
-      ephL->setCheckState(t_eph::outdated);
-      return;
-    }
-    // update interval: up to 24 hours
-    else if  (eph->type() == t_eph::IRNSS  && dt > 24*3600.0) {
+    else if (eph->type() == t_eph::QZSS    && dt > 3900.0) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    // maximum update interval: 300 sec + 5 min
+    else if  (eph->type() == t_eph::SBAS   && dt > 600.0) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    // updates 1h + 5 min
+    else if  (eph->type() == t_eph::BDS    && dt > 3900.0) {
+      ephL->setCheckState(t_eph::outdated);
+      return;
+    }
+    // update interval: up to 24 hours + 5 min
+    else if  (eph->type() == t_eph::IRNSS  && dt > 86700.0) {
       ephL->setCheckState(t_eph::outdated);
       return;
