Changeset 5121 in ntrip for trunk


Ignore:
Timestamp:
Apr 14, 2013, 6:44:43 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
3 edited

Legend:

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

    r5120 r5121  
    651651  // First time, set the _lastDumpSec immediately
    652652  // --------------------------------------------
    653   if (!_lastDumpCoSec.valid()) {
    654     _lastDumpCoSec = coTime - 1.0;
     653  if (!_lastCorrDumpTime.valid()) {
     654    _lastCorrDumpTime = coTime - 1.0;
    655655  }
    656656
    657657  // An old correction - throw it away
    658658  // ---------------------------------
    659   if (_waitCoTime > 0.0 && coTime <= _lastDumpCoSec) {
     659  if (_waitCoTime > 0.0 && coTime <= _lastCorrDumpTime) {
    660660    ///    if (!_bncComb) {
    661661      QString line = staID + ": Correction for one sat neglected because overaged by " +
    662662                      QString().sprintf(" %f sec",
    663                       _lastDumpCoSec - coTime + _waitCoTime);
     663                      _lastCorrDumpTime - coTime + _waitCoTime);
    664664      messagePrivate(line.toAscii());
    665665      emit( newMessage(line.toAscii(), true) );
     
    675675    dumpCorrs();
    676676  }
    677   else if (coTime - _waitCoTime > _lastDumpCoSec) {
    678     dumpCorrs(_lastDumpCoSec + 1, coTime - _waitCoTime);
    679     _lastDumpCoSec = coTime - _waitCoTime;
     677  else if (coTime - _waitCoTime > _lastCorrDumpTime) {
     678    dumpCorrs(_lastCorrDumpTime + 1, coTime - _waitCoTime);
     679    _lastCorrDumpTime = coTime - _waitCoTime;
    680680  }
    681681}
     
    684684////////////////////////////////////////////////////////////////////////////
    685685void t_bncCore::dumpCorrs(bncTime minTime, bncTime maxTime) {
    686   for (bncTime sec = minTime; sec <= maxTime; sec = sec + 1.0) {
    687     QList<QString> allCorrs = _corrs->values(sec);
    688     dumpCorrs(allCorrs);
    689     _corrs->remove(sec);
     686  QList<QString> allCorrs;
     687  QMutableMapIterator<bncTime, QString> it(*_corrs);
     688  while (it.hasNext()) {
     689    it.next();
     690    const bncTime& corrTime = it.key();
     691    if (minTime <= corrTime && corrTime <= maxTime) {
     692      allCorrs << it.value();
     693      it.remove();
     694    }
    690695  }
    691696}
  • trunk/BNC/src/bnccore.h

    r5120 r5121  
    127127    QList<QTcpSocket*>* _socketsNMEA;
    128128    bncCaster*          _caster;
    129     bncTime             _lastDumpCoSec;
     129    bncTime             _lastCorrDumpTime;
    130130    double              _waitCoTime;
    131131    QMultiMap<bncTime, QString>* _corrs;
  • trunk/BNC/src/combination/bnccomb.cpp

    r5119 r5121  
    339339  // ----------------------
    340340  if (_resTime.valid() && newCorr->tClk <= _resTime) {
     341    emit newMessage("bncComb: old correction: " + newCorr->prn.toAscii(), true);
    341342    delete newCorr;
    342343    return;
Note: See TracChangeset for help on using the changeset viewer.