Changeset 2924 in ntrip
- Timestamp:
- Jan 29, 2011, 12:01:16 PM (14 years ago)
- Location:
- trunk/BNC/combination
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/combination/bnccomb.cpp
r2921 r2924 75 75 } 76 76 77 // Reject delayed corrections 78 // -------------------------- 79 if (_processedBeforeTime.valid() && newCorr->tt < _processedBeforeTime) { 80 delete newCorr; 81 return; 82 } 83 84 // Process all older Epochs (if there are any) 85 // ------------------------------------------- 86 const double waitTime = 5.0; // wait 5 sec 87 _processedBeforeTime = newCorr->tt - waitTime; 88 processEpochs(); 89 77 90 // Check Modulo Time 78 91 // ----------------- … … 99 112 AC->epochs.append(newEpoch); 100 113 } 101 114 115 // Merge or add the correction 116 // --------------------------- 102 117 if (newEpoch->corr.find(newCorr->prn) != newEpoch->corr.end()) { 103 118 newEpoch->corr[newCorr->prn]->readLine(line); // merge (multiple messages) … … 106 121 newEpoch->corr[newCorr->prn] = newCorr; 107 122 } 108 109 processEpochsBefore(newCorr->tt);110 123 } 111 124 112 125 // 113 126 //////////////////////////////////////////////////////////////////////////// 114 void bncComb::processEpochsBefore(const bncTime& time) { 115 116 const double waitTime = 10.0; // wait 10 seconds 127 void bncComb::processEpochs() { 117 128 118 129 bool corrProcessed = false; … … 123 134 cmbAC* AC = itAC.value(); 124 135 125 126 136 QMutableListIterator<cmbEpoch*> itEpo(AC->epochs); 127 137 while (itEpo.hasNext()) { 128 138 cmbEpoch* epoch = itEpo.next(); 129 double dt = time - epoch->time; 130 131 if (dt == waitTime) { 139 if (epoch->time < _processedBeforeTime) { 132 140 QMapIterator<QString, t_corr*> itCorr(epoch->corr); 133 141 while (itCorr.hasNext()) { … … 136 144 processSingleCorr(AC, corr); 137 145 corrProcessed = true; 138 }139 }140 141 if (dt >= waitTime) {142 if (dt > waitTime) {143 cout << "delete " << AC->name.toAscii().data() << " "144 << epoch->time.timestr() << " " << endl;145 146 } 146 147 delete epoch; -
trunk/BNC/combination/bnccomb.h
r2919 r2924 48 48 }; 49 49 50 void processEpochs Before(const bncTime& time);50 void processEpochs(); 51 51 void processSingleCorr(const cmbAC* AC, const t_corr* corr); 52 52 void printResults() const; 53 53 54 54 QMap<QString, cmbAC*> _ACs; // Analytical Centers (key is mountpoint) 55 bncTime _processedBeforeTime; 55 56 }; 56 57
Note:
See TracChangeset
for help on using the changeset viewer.