Changeset 9930 in ntrip


Ignore:
Timestamp:
Nov 30, 2022, 1:55:40 PM (17 months ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncephuser.cpp

    r9929 r9930  
    187187void bncEphUser::checkEphemeris(t_eph* eph, bool realTime) {
    188188
    189   if (eph->prn().system() != 'R' || eph->prn().system() != 'G')
     189  if (!eph) {
    190190    return;
    191   cout << "\ncheckEphemeris ";
    192 
    193   if (!eph) {
    194     return; cout << "no eph ";
    195   }
    196   cout << eph->prn().toString().c_str() << " ";
     191  }
    197192
    198193  // Check whether the epoch is too far away the current time
     
    217212  ColumnVector vv(3);
    218213  if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
    219     eph->setCheckState(t_eph::bad); cout << "eph->getCrd() != success: bad ";
     214    eph->setCheckState(t_eph::bad);
    220215    return;
    221216  }
     
    225220  const double MAXDIST = 6.e7;
    226221  if (rr < MINDIST || rr > MAXDIST || std::isnan(rr)) {
    227     eph->setCheckState(t_eph::bad); cout << " eph MIN/MAXDIST: bad ";
     222    eph->setCheckState(t_eph::bad);
    228223    return;
    229224  }
     
    244239  }
    245240
    246   if (ephL) {
     241  if (ephL && ephL->checkState() != t_eph::bad) {
    247242    ColumnVector xcL(6);
    248243    ColumnVector vvL(3);
    249244    if (ephL->getCrd(eph->TOC(), xcL, vvL, false) != success) {
    250       eph->setCheckState(t_eph::bad); cout << " ephL->getCrd()  != success: bad " ;
     245      ephL->setCheckState(t_eph::bad);
    251246      return;
    252247    }
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r9928 r9930  
    322322  // If there is there more than 1 epoch line in the buffer
    323323  while (_rtnetStreamBuffer.count('*') > 1) {
    324     //cout << "more than 1 epoch in buffer: " << _rtnetStreamBuffer.count('*') << endl;
    325     //cout <<"XX MORE THAN 1 EPOCH XXX\n" << _rtnetStreamBuffer.toStdString().c_str()  << "\nXXXXXXXXXXXXXXXXX" <<endl;
    326324    emit(newMessage(QString("bncRtnetUploadCaster: more than 1 epoch in buffer: %1").arg(_rtnetStreamBuffer.count('*')).toLatin1(), false));
    327325    QString rtnetStreamBuffer = _rtnetStreamBuffer;
     
    330328    _rtnetStreamBuffer = _rtnetStreamBuffer.mid(1);
    331329    if      (nextEpoch != -1 && nextEpoch < iEpoEnd) {
    332       rtnetStreamBuffer = rtnetStreamBuffer.mid(nextEpoch, nextEpochEnd);//cout <<"== ONE EPOCH=\n" << rtnetStreamBuffer.toStdString().c_str()  << "\n=ONE EPOCH =="<<endl;
     330      rtnetStreamBuffer = rtnetStreamBuffer.mid(nextEpoch, nextEpochEnd);
    333331      lines = rtnetStreamBuffer.split('\n', QString::SkipEmptyParts);
    334332      if (lines.size() > 2) {
    335         //cout << "----------LINES 2 DECODE (IN WHILE)-------------\n" << rtnetStreamBuffer.toStdString().c_str() << "\n------------------" << endl;
    336333        decodeRtnetEpoch(lines);
    337334      }
     
    339336      _rtnetStreamBuffer = _rtnetStreamBuffer.mid(nextEpochEnd+3);
    340337    }
    341     else if (nextEpoch != -1 && nextEpoch >= iEpoEnd) {//cout << "bin hier" << endl;
     338    else if (nextEpoch != -1 && nextEpoch >= iEpoEnd) {
    342339      break;
    343340    }
     
    345342
    346343  lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts);
    347   //cout << "----------LINES 2 DECODE (OUTSIDE)-------------\n" << _rtnetStreamBuffer.left(iEpoEnd).toStdString().c_str() << "\n------------------" << endl;
     344
    348345  _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd + 3);
    349   //cout <<"YYYY REST OF BUFFER YYYY\n" << _rtnetStreamBuffer.toStdString().c_str()  << "\nYYYYYY" <<endl;
     346
    350347  if (lines.size() < 2) {
    351348    emit(newMessage(QString("bncRtnetUploadCaster: less than 2 lines to decode : %1").arg(_casterID).toLatin1(), false));
     
    361358  // Read first line (with epoch time)
    362359  // ---------------------------------
    363   QTextStream in(epochLines[0].toLatin1()); //cout << epochLines[0].toLatin1().toStdString() << " : ";
     360  QTextStream in(epochLines[0].toLatin1());
    364361  QString hlp;
    365362  int year, month, day, hour, min;
     
    367364  in >> hlp >> year >> month >> day >> hour >> min >> sec;
    368365  bncTime epoTime;
    369   epoTime.set(year, month, day, hour, min, sec); //cout << "decodeEpoch: " << epoTime.timestr().c_str() << endl;
     366  epoTime.set(year, month, day, hour, min, sec);
    370367
    371368  emit(newMessage(
     
    544541      }
    545542    }
    546     if (eph) {    cout << eph->prn().toString().c_str() << " checkstate: " << eph->checkState() << endl;}
     543
    547544    if (eph &&
    548545        !outDatedBcep(eph)                    &&  // detected from storage because of no update
     
    10821079    sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
    10831080
    1084     if (corrIsOutOfRange(sd)) { cout << "\n      corrIsOutOfRange" << endl;
     1081    if (corrIsOutOfRange(sd)) {
    10851082      return failure;
    10861083    }
Note: See TracChangeset for help on using the changeset viewer.