- Timestamp:
- Aug 16, 2020, 11:56:26 AM (4 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccaster.cpp
r8921 r9016 176 176 obs._staID = staID.data(); 177 177 178 // Update/Set Slip Counters 179 // ------------------------ 180 setSlipCounters(obs); 181 178 182 // Output into the socket 179 183 // ---------------------- … … 573 577 .arg(_miscSockets->size()).toLatin1(), true) ); 574 578 } 579 580 // Set/Update Slip Counters 581 //////////////////////////////////////////////////////////////////////////// 582 void bncCaster::setSlipCounters(t_satObs& obs) { 583 584 double minLockTime = -1.0; 585 for (unsigned ii = 0; ii < obs._obs.size(); ii++) { 586 const t_frqObs* frqObs = obs._obs[ii]; 587 if (frqObs->_lockTimeValid) { 588 if (minLockTime == -1.0 || minLockTime < frqObs->_lockTime) { 589 minLockTime = frqObs->_lockTime; 590 } 591 } 592 } 593 594 if (minLockTime == -1.0) { 595 return; 596 } 597 598 QMap<t_prn, double>& hlpMap = _lockTimeMap[obs._staID]; 599 QMap<t_prn, double>::const_iterator it = hlpMap.find(obs._prn); 600 if (it == hlpMap.end()) { 601 hlpMap[obs._prn] = minLockTime; 602 for (unsigned ii = 0; ii < obs._obs.size(); ii++) { 603 t_frqObs* frqObs = obs._obs[ii]; 604 frqObs->_slipCounter = 0; 605 } 606 } 607 else { 608 if (hlpMap[obs._prn] < minLockTime) { 609 hlpMap[obs._prn] = minLockTime; 610 for (unsigned ii = 0; ii < obs._obs.size(); ii++) { 611 t_frqObs* frqObs = obs._obs[ii]; 612 frqObs->_slipCounter += 1; 613 if (frqObs->_slipCounter > 9999) { 614 frqObs->_slipCounter = 0; 615 } 616 } 617 } 618 } 619 } -
trunk/BNC/src/bnccaster.h
r8921 r9016 67 67 static int myWrite(QTcpSocket* sock, const char* buf, int bufLen); 68 68 void reopenOutFile(); 69 void setSlipCounters(t_satObs& obs); 69 70 70 71 QFile* _outFile; … … 87 88 QTcpServer* _miscServer; 88 89 QList<QTcpSocket*>* _miscSockets; 90 QMap<std::string, QMap<t_prn, double> > _lockTimeMap; 89 91 }; 90 92
Note:
See TracChangeset
for help on using the changeset viewer.