Index: trunk/BNC/src/bncephuser.cpp
===================================================================
--- trunk/BNC/src/bncephuser.cpp	(revision 9929)
+++ trunk/BNC/src/bncephuser.cpp	(revision 9930)
@@ -187,12 +187,7 @@
 void bncEphUser::checkEphemeris(t_eph* eph, bool realTime) {
 
-  if (eph->prn().system() != 'R' || eph->prn().system() != 'G')
+  if (!eph) {
     return;
-  cout << "\ncheckEphemeris ";
-
-  if (!eph) {
-    return; cout << "no eph ";
-  }
-  cout << eph->prn().toString().c_str() << " ";
+  }
 
   // Check whether the epoch is too far away the current time
@@ -217,5 +212,5 @@
   ColumnVector vv(3);
   if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
-    eph->setCheckState(t_eph::bad); cout << "eph->getCrd() != success: bad ";
+    eph->setCheckState(t_eph::bad);
     return;
   }
@@ -225,5 +220,5 @@
   const double MAXDIST = 6.e7;
   if (rr < MINDIST || rr > MAXDIST || std::isnan(rr)) {
-    eph->setCheckState(t_eph::bad); cout << " eph MIN/MAXDIST: bad ";
+    eph->setCheckState(t_eph::bad);
     return;
   }
@@ -244,9 +239,9 @@
   }
 
-  if (ephL) {
+  if (ephL && ephL->checkState() != t_eph::bad) {
     ColumnVector xcL(6);
     ColumnVector vvL(3);
     if (ephL->getCrd(eph->TOC(), xcL, vvL, false) != success) {
-      eph->setCheckState(t_eph::bad); cout << " ephL->getCrd()  != success: bad " ;
+      ephL->setCheckState(t_eph::bad);
       return;
     }
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 9929)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 9930)
@@ -322,6 +322,4 @@
   // If there is there more than 1 epoch line in the buffer
   while (_rtnetStreamBuffer.count('*') > 1) {
-    //cout << "more than 1 epoch in buffer: " << _rtnetStreamBuffer.count('*') << endl;
-    //cout <<"XX MORE THAN 1 EPOCH XXX\n" << _rtnetStreamBuffer.toStdString().c_str()  << "\nXXXXXXXXXXXXXXXXX" <<endl;
     emit(newMessage(QString("bncRtnetUploadCaster: more than 1 epoch in buffer: %1").arg(_rtnetStreamBuffer.count('*')).toLatin1(), false));
     QString rtnetStreamBuffer = _rtnetStreamBuffer;
@@ -330,8 +328,7 @@
     _rtnetStreamBuffer = _rtnetStreamBuffer.mid(1);
     if      (nextEpoch != -1 && nextEpoch < iEpoEnd) {
-      rtnetStreamBuffer = rtnetStreamBuffer.mid(nextEpoch, nextEpochEnd);//cout <<"== ONE EPOCH=\n" << rtnetStreamBuffer.toStdString().c_str()  << "\n=ONE EPOCH =="<<endl;
+      rtnetStreamBuffer = rtnetStreamBuffer.mid(nextEpoch, nextEpochEnd);
       lines = rtnetStreamBuffer.split('\n', QString::SkipEmptyParts);
       if (lines.size() > 2) {
-        //cout << "----------LINES 2 DECODE (IN WHILE)-------------\n" << rtnetStreamBuffer.toStdString().c_str() << "\n------------------" << endl;
         decodeRtnetEpoch(lines);
       }
@@ -339,5 +336,5 @@
       _rtnetStreamBuffer = _rtnetStreamBuffer.mid(nextEpochEnd+3);
     }
-    else if (nextEpoch != -1 && nextEpoch >= iEpoEnd) {//cout << "bin hier" << endl;
+    else if (nextEpoch != -1 && nextEpoch >= iEpoEnd) {
       break;
     }
@@ -345,7 +342,7 @@
 
   lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts);
-  //cout << "----------LINES 2 DECODE (OUTSIDE)-------------\n" << _rtnetStreamBuffer.left(iEpoEnd).toStdString().c_str() << "\n------------------" << endl;
+
   _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd + 3);
-  //cout <<"YYYY REST OF BUFFER YYYY\n" << _rtnetStreamBuffer.toStdString().c_str()  << "\nYYYYYY" <<endl;
+
   if (lines.size() < 2) {
     emit(newMessage(QString("bncRtnetUploadCaster: less than 2 lines to decode : %1").arg(_casterID).toLatin1(), false));
@@ -361,5 +358,5 @@
   // Read first line (with epoch time)
   // ---------------------------------
-  QTextStream in(epochLines[0].toLatin1()); //cout << epochLines[0].toLatin1().toStdString() << " : ";
+  QTextStream in(epochLines[0].toLatin1());
   QString hlp;
   int year, month, day, hour, min;
@@ -367,5 +364,5 @@
   in >> hlp >> year >> month >> day >> hour >> min >> sec;
   bncTime epoTime;
-  epoTime.set(year, month, day, hour, min, sec); //cout << "decodeEpoch: " << epoTime.timestr().c_str() << endl;
+  epoTime.set(year, month, day, hour, min, sec);
 
   emit(newMessage(
@@ -544,5 +541,5 @@
       }
     }
-    if (eph) {    cout << eph->prn().toString().c_str() << " checkstate: " << eph->checkState() << endl;}
+
     if (eph &&
         !outDatedBcep(eph)                    &&  // detected from storage because of no update
@@ -1082,5 +1079,5 @@
     sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
 
-    if (corrIsOutOfRange(sd)) { cout << "\n      corrIsOutOfRange" << endl;
+    if (corrIsOutOfRange(sd)) {
       return failure;
     }
