Changeset 462 in ntrip
- Timestamp:
- May 26, 2007, 11:15:35 AM (17 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnccaster.cpp
r458 r462 93 93 _waitTime = 1; 94 94 } 95 96 // Start dump epoch loop97 // ---------------------98 _newObsRunning = false;99 _newTime = 0;100 dumpEpochSlot();101 95 } 102 96 … … 124 118 125 119 QMutexLocker locker(&_mutex); 126 _newObsRunning = true;127 120 128 121 long iSec = long(floor(obs->GPSWeeks+0.5)); 129 _newTime = obs->GPSWeek * 7*24*3600 + iSec;122 long newTime = obs->GPSWeek * 7*24*3600 + iSec; 130 123 131 124 // Rename the Station … … 137 130 // -------------------------------------------- 138 131 if (_lastDumpSec == 0) { 139 _lastDumpSec = _newTime - 1;132 _lastDumpSec = newTime - 1; 140 133 } 141 134 142 135 // An old observation - throw it away 143 136 // ---------------------------------- 144 if ( _newTime <= _lastDumpSec) {137 if (newTime <= _lastDumpSec) { 145 138 if (firstObs) { 146 139 QSettings settings; … … 157 150 // Save the observation 158 151 // -------------------- 159 _epochs->insert(_newTime, obs); 160 161 _newObsRunning = false; 162 } 163 164 // Dump Loop Event 165 //////////////////////////////////////////////////////////////////////////// 166 void bncCaster::dumpEpochSlot() { 167 if (!_newObsRunning) { 168 if (_newTime != 0 && _epochs->size() > 0) { 169 dumpEpochs(_lastDumpSec + 1, _newTime - _waitTime); 170 171 if (_lastDumpSec < _newTime - _waitTime) { 172 _lastDumpSec = _newTime - _waitTime; 173 } 174 } 175 } 176 QTimer::singleShot(100, this, SLOT(dumpEpochSlot())); 152 _epochs->insert(newTime, obs); 153 154 // Dump Epochs 155 // ----------- 156 if (newTime - _waitTime > _lastDumpSec) { 157 dumpEpochs(_lastDumpSec + 1, newTime - _waitTime); 158 _lastDumpSec = newTime - _waitTime; 159 } 177 160 } 178 161 -
trunk/BNC/bnccaster.h
r458 r462 52 52 void slotNewConnection(); 53 53 void slotGetThreadError(const QByteArray staID); 54 void dumpEpochSlot();55 54 56 55 private: … … 69 68 long _waitTime; 70 69 QMutex _mutex; 71 long _newTime;72 bool _newObsRunning;73 70 }; 74 71
Note:
See TracChangeset
for help on using the changeset viewer.