- Timestamp:
- Aug 17, 2020, 10:19:28 AM (4 years ago)
- Location:
- branches/BNC_2.12/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/bnccaster.cpp
r8667 r9018 164 164 obs._staID = staID.data(); 165 165 166 // Update/Set Slip Counters 167 // ------------------------ 168 setSlipCounters(obs); 169 166 170 // Output into the socket 167 171 // ---------------------- … … 199 203 _lastDumpTime = obs._time - 1.0; 200 204 } 205 201 206 // An old observation - throw it away 202 207 // ---------------------------------- … … 461 466 462 467 int ms = 0; 463 464 468 if (_confInterval != -1) { 465 469 ms = 1000 * _confInterval; … … 468 472 QTime currTime = currentDateAndTimeGPS().time(); 469 473 QTime nextShotTime; 470 471 474 if (settings.value("onTheFlyInterval").toString() == "1 min") { 472 475 _confInterval = 60; … … 561 564 .arg(_miscSockets->size()).toAscii(), true) ); 562 565 } 566 567 // Set/Update Slip Counters 568 //////////////////////////////////////////////////////////////////////////// 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 } -
branches/BNC_2.12/src/bnccaster.h
r8620 r9018 64 64 static int myWrite(QTcpSocket* sock, const char* buf, int bufLen); 65 65 void reopenOutFile(); 66 void setSlipCounters(t_satObs& obs); 66 67 67 68 QFile* _outFile; … … 84 85 QTcpServer* _miscServer; 85 86 QList<QTcpSocket*>* _miscSockets; 87 QMap<std::string, QMap<t_prn, double> > _lockTimeMap; 86 88 }; 87 89
Note:
See TracChangeset
for help on using the changeset viewer.