Changeset 6896 in ntrip


Ignore:
Timestamp:
Jun 12, 2015, 4:18:11 PM (9 years ago)
Author:
stuerze
Message:

minor changes to prevent the loss of epochs if there are 2 epoch lines in the rtnetuploadbuffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r6893 r6896  
    247247    return;
    248248  }
    249   _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);
     249  int iEpoBegEarlier = _rtnetStreamBuffer.indexOf('*');
     250  if (iEpoBegEarlier != -1 && iEpoBegEarlier < iEpoBeg) { // are there two epoch lines in buffer?
     251          _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBegEarlier);
     252  }
     253  else {
     254    _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);
     255  }
    250256
    251257  int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end   of last epoch
     
    261267  if (lines.size() < 2) {
    262268    return;
    263   }
    264 
    265   // Keep the last unfinished line in buffer
    266   // ---------------------------------------
    267   int iLastEOL = _rtnetStreamBuffer.lastIndexOf('\n');
    268   if (iLastEOL != -1) {
    269     _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iLastEOL + 1);
    270269  }
    271270
     
    354353
    355354  for (int ii = 1; ii < lines.size(); ii++) {
    356 
    357355    QString key;  // prn or key VTEC, IND (phase bias indicators)
    358356    ColumnVector rtnAPC;
Note: See TracChangeset for help on using the changeset viewer.