Index: trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 8510)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 8542)
@@ -507,9 +507,10 @@
         }
         else {
-          in >> numVal;
-          for (int ii = 0; ii < numVal; ii++) {
-            double dummy;
-            in >> dummy;
-          }
+          emit(newMessage("                      RTNET format error: "
+                          +  lines[ii].toLatin1(), false));
+          qDebug() << "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str())
+                      + " " + QByteArray(epoTime.timestr().c_str()) + " "
+                      + _casterID.toLatin1();
+          qDebug() << "                      RTNET format error: " + lines[ii].toLatin1();
         }
       }
@@ -549,6 +550,9 @@
       if (sd) {
         QString outLine;
-        processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, rtnUra,
-            rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
+        t_irc irc = processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC,
+                                     rtnUra, rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
+        if (irc != success) {
+          continue;
+        }
       }
 
@@ -2264,5 +2268,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
+t_irc bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
     double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
     double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel,
@@ -2272,11 +2276,19 @@
   // Broadcast Position and Velocity
   // -------------------------------
-  ColumnVector xB(7);
+  ColumnVector xB(6);
   ColumnVector vB(3);
-  eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
+  t_irc irc = eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
+
+  if (irc != success) {
+    return irc;
+  }
 
   // Precise Position
   // ----------------
   ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
+
+  if (xP.size() == 0) {
+    return failure;
+  }
 
   double dc = 0.0;
@@ -2301,13 +2313,6 @@
   // ----------------
   double dClkA0 = rtnClk(1) - (xB(4) - dc) * t_CST::c;
-  double dClkA1 = 0.0;
-  double dClkA2 = 0.0;
-  if (rtnClk(2)) {
-    dClkA0 = rtnClk(1) - (xB(5) - dc) * t_CST::c;
-    dClkA1 = rtnClk(2) -  xB(6) * t_CST::c;
-  }
-  if (rtnClk(3)) {
-    dClkA2 = rtnClk(3) - xB(7) * t_CST::c;
-  }
+  double dClkA1 = rtnClk(2) -  xB(5) * t_CST::c;
+  double dClkA2 = rtnClk(3) -  xB(6) * t_CST::c;
 
   if (sd) {
@@ -2363,4 +2368,5 @@
     _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate);
   }
+  return success;
 }
 
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.h
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 8510)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 8542)
@@ -30,5 +30,5 @@
   virtual ~bncRtnetUploadCaster();
  private:
-  void processSatellite(const t_eph* eph, int GPSweek,
+  t_irc processSatellite(const t_eph* eph, int GPSweek,
                         double GPSweeks, const QString& prn,
                         const ColumnVector& rtnAPC,
