Changeset 10227 in ntrip for trunk/BNC/src/combination
- Timestamp:
- Oct 20, 2023, 9:45:38 PM (16 months ago)
- Location:
- trunk/BNC/src/combination
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/combination/bncbiassnx.cpp
r10221 r10227 73 73 delete it.value(); 74 74 } 75 _snxSatCodeBiasMap.clear(); 75 76 } 76 77 … … 101 102 //////////////////////////////////////////////////////////////////////////// 102 103 t_irc bncBiasSnx::readFile(const QString& fileName) { 103 104 clear(); 104 105 QFile inFile(fileName); 105 106 inFile.open(QIODevice::ReadOnly | QIODevice::Text); -
trunk/BNC/src/combination/bnccomb.cpp
r10225 r10227 123 123 124 124 bncSettings settings; 125 126 _running = true; 125 127 126 128 QStringList cmbStreams = settings.value("cmbStreams").toStringList(); … … 291 293 } 292 294 if (_bsx) { 293 _ms = 6.0 * 3600 * 1000.0;295 _ms = 3.0 * 3600 * 1000.0; 294 296 QTimer::singleShot(_ms, this, SLOT(slotReadBiasSnxFile())); 295 297 } … … 301 303 _MAXRES = 999.0; 302 304 } 303 305 _newCorr = 0; 304 306 } 305 307 … … 307 309 //////////////////////////////////////////////////////////////////////////// 308 310 bncComb::~bncComb() { 311 312 _running = false; 313 sleep(2); 309 314 310 315 QListIterator<cmbAC*> icAC(_ACs); … … 317 322 if (_ssrCorr) { 318 323 delete _ssrCorr; 324 } 325 326 if (_newCorr) { 327 delete _newCorr; 319 328 } 320 329 … … 331 340 _buffer.remove(sys); 332 341 } 342 _cmbSysPrn.clear(); 333 343 334 344 while (!_epoClkData.empty()) { … … 645 655 // Create new correction 646 656 // --------------------- 647 cmbCorr*newCorr = new cmbCorr();648 newCorr->_prn = prn;649 newCorr->_time = clkCorr._time;650 newCorr->_iod = clkCorr._iod;651 newCorr->_acName = acName;652 newCorr->_weightFactor = weigthFactor;653 newCorr->_clkCorr = clkCorr;657 _newCorr = new cmbCorr(); 658 _newCorr->_prn = prn; 659 _newCorr->_time = clkCorr._time; 660 _newCorr->_iod = clkCorr._iod; 661 _newCorr->_acName = acName; 662 _newCorr->_weightFactor = weigthFactor; 663 _newCorr->_clkCorr = clkCorr; 654 664 655 665 // Check orbit correction 656 666 // ---------------------- 657 667 if (!_orbCorrections.contains(acName)) { 658 delete newCorr;668 delete _newCorr; _newCorr = 0; 659 669 continue; 660 670 } … … 662 672 QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName]; 663 673 if (!storage.contains(clkCorr._prn) || 664 storage[clkCorr._prn]._iod != newCorr->_iod) {665 delete newCorr;674 storage[clkCorr._prn]._iod != _newCorr->_iod) { 675 delete _newCorr; _newCorr = 0; 666 676 continue; 667 677 } 668 678 else { 669 newCorr->_orbCorr = storage[clkCorr._prn];679 _newCorr->_orbCorr = storage[clkCorr._prn]; 670 680 } 671 681 } … … 679 689 emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1(), true); 680 690 #endif 681 delete newCorr;691 delete _newCorr; _newCorr = 0; 682 692 continue; 683 693 } … … 688 698 emit newMessage("bncComb: ephLast not ok (checkState: " + ephLast->checkStateToString().toLatin1() + ") for " + prn.mid(0,3).toLatin1(), true); 689 699 #endif 690 delete newCorr;700 delete _newCorr; _newCorr = 0; 691 701 continue; 692 702 } 693 703 else { 694 if (ephLast->IOD() == newCorr->_iod) {695 newCorr->_eph = ephLast;704 if (ephLast->IOD() == _newCorr->_iod) { 705 _newCorr->_eph = ephLast; 696 706 } 697 707 else if (ephPrev && ephPrev->checkState() == t_eph::ok && 698 ephPrev->IOD() == newCorr->_iod) {699 newCorr->_eph = ephPrev;700 switchToLastEph(ephLast, newCorr);708 ephPrev->IOD() == _newCorr->_iod) { 709 _newCorr->_eph = ephPrev; 710 switchToLastEph(ephLast, _newCorr); 701 711 } 702 712 else { 703 713 #ifdef BNC_DEBUG_CMB 704 714 emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1() + 705 QString(" with IOD %1").arg( newCorr->_iod).toLatin1(), true);715 QString(" with IOD %1").arg(_newCorr->_iod).toLatin1(), true); 706 716 #endif 707 delete newCorr;717 delete _newCorr; _newCorr = 0; 708 718 continue; 709 719 } … … 715 725 QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName]; 716 726 if (storage.contains(clkCorr._prn)) { 717 newCorr->_satCodeBias = storage[clkCorr._prn];727 _newCorr->_satCodeBias = storage[clkCorr._prn]; 718 728 QMap<t_frequency::type, double> codeBiasesRefSig; 719 729 for (unsigned ii = 1; ii < cmbRefSig::cIF; ii++) { … … 722 732 char attrib = cmbRefSig::toAttrib(sys, static_cast<cmbRefSig::type>(ii)); 723 733 QString rnxType2ch = QString("%1%2").arg(frqNum).arg(attrib); 724 for (unsigned ii = 0; ii < newCorr->_satCodeBias._bias.size(); ii++) {725 const t_frqCodeBias& bias = newCorr->_satCodeBias._bias[ii];734 for (unsigned ii = 0; ii < _newCorr->_satCodeBias._bias.size(); ii++) { 735 const t_frqCodeBias& bias = _newCorr->_satCodeBias._bias[ii]; 726 736 if (rnxType2ch.toStdString() == bias._rnxType2ch) { 727 737 codeBiasesRefSig[frqType] = bias._value; … … 731 741 if (codeBiasesRefSig.size() == 2) { 732 742 map<t_frequency::type, double> codeCoeff; 733 double channel = double( newCorr->_eph->slotNum());743 double channel = double(_newCorr->_eph->slotNum()); 734 744 cmbRefSig::coeff(sys, cmbRefSig::cIF, channel, codeCoeff); 735 745 map<t_frequency::type, double>::const_iterator it; 736 746 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) { 737 747 t_frequency::type frqType = it->first; 738 newCorr->_satCodeBiasIF += it->second * codeBiasesRefSig[frqType];748 _newCorr->_satCodeBiasIF += it->second * codeBiasesRefSig[frqType]; 739 749 } 740 750 } 741 newCorr->_satCodeBias._bias.clear();751 _newCorr->_satCodeBias._bias.clear(); 742 752 } 743 753 } … … 753 763 QString prn = corr->_prn; 754 764 QString acName = corr->_acName; 755 if ( newCorr->_acName == acName &&newCorr->_prn == prn) {765 if (_newCorr->_acName == acName && _newCorr->_prn == prn) { 756 766 available = true; 757 767 } 758 768 } 769 759 770 if (!available) { 760 corrs.push_back( newCorr);771 corrs.push_back(_newCorr); _newCorr = 0; 761 772 } 762 773 else { 763 delete newCorr;774 delete _newCorr; _newCorr = 0; 764 775 continue; 765 776 } … … 885 896 } 886 897 887 //_buffer.remove(sys);888 898 } 889 899 … … 921 931 // --------------------------------- 922 932 SymmetricMatrix QQ_sav = _QQ[sys]; 923 while ( true) {933 while (_running) { 924 934 925 935 Matrix AA; … … 1236 1246 // Outlier Detection Loop 1237 1247 // ---------------------- 1238 while ( true) {1248 while (_running) { 1239 1249 1240 1250 // Remove Satellites that are not in Master … … 1422 1432 } 1423 1433 1424 while ( true) {1434 while (_running) { 1425 1435 1426 1436 // Compute Mean Corrections for all Satellites -
trunk/BNC/src/combination/bnccomb.h
r10225 r10227 5 5 #include <fstream> 6 6 #include <iostream> 7 #include <unistd.h> 7 8 #include <map> 8 9 #include <newmat.h> … … 244 245 bncTime _lastClkCorrTime; 245 246 bncTime _resTime; 247 cmbCorr* _newCorr; 246 248 QMap<char, cmbEpoch> _buffer; 247 249 bncRtnetDecoder* _rtnetDecoder; … … 271 273 bool _useSbas; 272 274 bool _useIrnss; 275 bool _running; 273 276 }; 274 277
Note:
See TracChangeset
for help on using the changeset viewer.