Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 10768)
+++ trunk/BNC/src/ephemeris.cpp	(revision 10769)
@@ -2744,5 +2744,11 @@
 ////////////////////////////////////////////////////////////////////////////
 unsigned int t_ephBDS::IOD() const {
-  return (int(_TOC.gpssec()) / 720) % 240;   //return (int(_TOEsec)/720) % 240;
+  if (type() == t_eph::D1 ||
+      type() == t_eph::D2) {
+    return (int(_TOC.gpssec()) / 720) % 240;
+  }
+  else {
+    return _IODE;
+  }
 }
 
