Changeset 5527 in ntrip for trunk/BNC


Ignore:
Timestamp:
Nov 6, 2013, 2:26:42 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r5526 r5527  
    179179  QMutexLocker locker(&_mutex);
    180180
    181   long newTime = 0;
     181  unsigned index = 0;
    182182  QMutableListIterator<t_obs> it(obsList);
    183183  while (it.hasNext()) {
    184 
     184    ++index;
    185185    t_obs& obs = it.next();
    186186
    187187    long iSec    = long(floor(obs.GPSWeeks+0.5));
    188     newTime = obs.GPSWeek * 7*24*3600 + iSec;
     188    long newTime = obs.GPSWeek * 7*24*3600 + iSec;
    189189   
    190190    // Rename the Station
     
    232232    // ----------------------------------
    233233    if (newTime <= _lastDumpSec) {
    234       bncSettings settings;
    235       if ( !settings.value("outFile").toString().isEmpty() ||
    236            !settings.value("outPort").toString().isEmpty() ) {
    237    
    238         QTime enomtime = QTime(0,0,0).addSecs(iSec);
    239    
    240         emit( newMessage(QString("%1: Old epoch %2 (%3) thrown away")
    241                          .arg(staID.data()).arg(iSec)
    242                          .arg(enomtime.toString("HH:mm:ss"))
    243                          .toAscii(), true) );
    244       }
    245       return;
     234      if (index == 1) {
     235        bncSettings settings;
     236        if ( !settings.value("outFile").toString().isEmpty() ||
     237             !settings.value("outPort").toString().isEmpty() ) {
     238   
     239          QTime enomtime = QTime(0,0,0).addSecs(iSec);
     240   
     241          emit( newMessage(QString("%1: Old epoch %2 (%3) thrown away")
     242                           .arg(staID.data()).arg(iSec)
     243                           .arg(enomtime.toString("HH:mm:ss"))
     244                           .toAscii(), true) );
     245        }
     246      }
     247      continue;
    246248    }
    247249   
     
    249251    // --------------------
    250252    _epochs->insert(newTime, obs);
    251   }
    252 
    253   // Dump Epochs
    254   // -----------
    255   if (newTime - _waitTime > _lastDumpSec) {
    256     dumpEpochs(_lastDumpSec + 1, newTime - _waitTime);
    257     _lastDumpSec = newTime - _waitTime;
     253
     254    // Dump Epochs
     255    // -----------
     256    if (newTime - _waitTime > _lastDumpSec) {
     257      dumpEpochs(_lastDumpSec + 1, newTime - _waitTime);
     258      _lastDumpSec = newTime - _waitTime;
     259    }
    258260  }
    259261}
Note: See TracChangeset for help on using the changeset viewer.