Index: trunk/BNC/src/bncephuser.cpp
===================================================================
--- trunk/BNC/src/bncephuser.cpp	(revision 11057)
+++ trunk/BNC/src/bncephuser.cpp	(revision 11137)
@@ -48,5 +48,5 @@
 // Constructor
 ////////////////////////////////////////////////////////////////////////////
-bncEphUser::bncEphUser(bool connectSlots) {
+bncEphUser::bncEphUser(bool connectSlots, unsigned maxQueueSize) : _maxQueueSize(maxQueueSize) {
   if (connectSlots) {
     connect(BNC_CORE, SIGNAL(newGPSEph(t_ephGPS)),
@@ -148,4 +148,15 @@
 
   QString prn(newEph->prn().toInternalString().c_str());
+
+  // data set received before, e.g. from a slower stream after a newer one
+  if (_eph.contains(prn)) {
+    const deque<t_eph*>& qq = _eph[prn];
+    for (unsigned ii = 0; ii < qq.size(); ii++) {
+      if (qq[ii]->sameDataSet(eph)) {
+        delete newEph;
+        return failure;
+      }
+    }
+  }
 
   const t_eph* ephOld = ephLast(prn);
@@ -224,4 +235,12 @@
   if (eph->isUnhealthy()) {
     eph->setCheckState(t_eph::unhealthy);
+    return;
+  }
+
+  // GPS/QZSS: IODE and IODC of the same upload
+  // -------------------------------------------
+  const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph);
+  if (ephGPS && !ephGPS->iodeIodcConsistent()) {
+    eph->setCheckState(t_eph::bad);
     return;
   }
