Changeset 9021 in ntrip for branches/BNC_2.12/src/bnccaster.cpp
- Timestamp:
- Aug 18, 2020, 10:20:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/bnccaster.cpp
r9018 r9021 164 164 obs._staID = staID.data(); 165 165 166 // Update/Set Slip Counters167 // ------------------------168 setSlipCounters(obs);169 170 166 // Output into the socket 171 167 // ---------------------- … … 203 199 _lastDumpTime = obs._time - 1.0; 204 200 } 205 201 206 202 // An old observation - throw it away 207 203 // ---------------------------------- … … 564 560 .arg(_miscSockets->size()).toAscii(), true) ); 565 561 } 566 567 // Set/Update Slip Counters568 ////////////////////////////////////////////////////////////////////////////569 void bncCaster::setSlipCounters(t_satObs& obs) {570 571 double minLockTime = -1.0;572 for (unsigned ii = 0; ii < obs._obs.size(); ii++) {573 const t_frqObs* frqObs = obs._obs[ii];574 if (frqObs->_lockTimeValid) {575 if (minLockTime == -1.0 || minLockTime < frqObs->_lockTime) {576 minLockTime = frqObs->_lockTime;577 }578 }579 }580 581 if (minLockTime == -1.0) {582 return;583 }584 585 QMap<t_prn, double>& hlpMap = _lockTimeMap[obs._staID];586 QMap<t_prn, double>::const_iterator it = hlpMap.find(obs._prn);587 if (it == hlpMap.end()) {588 hlpMap[obs._prn] = minLockTime;589 for (unsigned ii = 0; ii < obs._obs.size(); ii++) {590 t_frqObs* frqObs = obs._obs[ii];591 frqObs->_slipCounter = 0;592 }593 }594 else {595 if (hlpMap[obs._prn] < minLockTime) {596 hlpMap[obs._prn] = minLockTime;597 for (unsigned ii = 0; ii < obs._obs.size(); ii++) {598 t_frqObs* frqObs = obs._obs[ii];599 frqObs->_slipCounter += 1;600 if (frqObs->_slipCounter > 9999) {601 frqObs->_slipCounter = 0;602 }603 }604 }605 }606 }
Note:
See TracChangeset
for help on using the changeset viewer.