- Timestamp:
- Apr 7, 2022, 4:21:51 PM (3 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncmain.cpp
r9652 r9676 256 256 " cmbMethodFilter {Combination approach [character string: Single-Epoch|Filter]\n" 257 257 " cmbMaxres {Clock outlier residuum threshold in meters [floating-point number]\n" 258 " cmbSampl {Clock sampling rate [integer number of seconds: 10|20|30|40|50|60]}\n"258 " cmbSampl {Clock sampling rate [integer number of seconds: 0|10|20|30|40|50|60]}\n" 259 259 " cmbGps {GPS correction usage [integer number: 0=no,2=yes]}\n" 260 260 " cmbGlo {GLONASS correction usage [integer number: 0=no,2=yes]}\n" -
trunk/BNC/src/bncwindow.cpp
r9652 r9676 482 482 483 483 _cmbSamplSpinBox = new QSpinBox; 484 _cmbSamplSpinBox->setMinimum( 10);484 _cmbSamplSpinBox->setMinimum(0); 485 485 _cmbSamplSpinBox->setMaximum(60); 486 486 _cmbSamplSpinBox->setSingleStep(10); … … 1267 1267 cmbLayout->addWidget(_cmbSamplSpinBox, 6, 7, Qt::AlignRight); 1268 1268 cmbLayout->addWidget(new QLabel("GNSS"), 7, 6, Qt::AlignLeft); 1269 cmbLayout->addWidget(new QLabel("GPS ( 1W/2W)"), 7, 7);1269 cmbLayout->addWidget(new QLabel("GPS (C1W/C2W)"), 7, 7); 1270 1270 cmbLayout->addWidget(_cmbGpsCheckBox, 7, 8); 1271 cmbLayout->addWidget(new QLabel("GLONASS ( 1P/2P)"),7, 9);1271 cmbLayout->addWidget(new QLabel("GLONASS (C1P/C2P)"), 7, 9); 1272 1272 cmbLayout->addWidget(_cmbGloCheckBox, 7, 10); 1273 cmbLayout->addWidget(new QLabel("Galileo ( 1C/5Q)"),7, 11);1273 cmbLayout->addWidget(new QLabel("Galileo (C1C/C5Q)"), 7, 11); 1274 1274 cmbLayout->addWidget(_cmbGalCheckBox, 7, 12); 1275 cmbLayout->addWidget(new QLabel("Beidou ( 2I/6I)"),7, 13);1275 cmbLayout->addWidget(new QLabel("Beidou (C2I/C6I)"), 7, 13); 1276 1276 cmbLayout->addWidget(_cmbBdsCheckBox, 7, 14); 1277 cmbLayout->addWidget(new QLabel("QZSS ( 1C/2L)"),8, 7);1277 cmbLayout->addWidget(new QLabel("QZSS (C1C/C2L)"), 8, 7); 1278 1278 cmbLayout->addWidget(_cmbQzssCheckBox, 8, 8); 1279 cmbLayout->addWidget(new QLabel("SBAS ( 1C/5Q)"),8, 9);1279 cmbLayout->addWidget(new QLabel("SBAS (C1C/C5Q)"), 8, 9); 1280 1280 cmbLayout->addWidget(_cmbSbasCheckBox, 8, 10); 1281 1281 cmbLayout->addWidget(new QLabel("IRNSS"), 8, 11); … … 1495 1495 _cmbMethodComboBox->setWhatsThis(tr("<p>Select a clock combination approach. Options are 'Single-Epoch' and Kalman 'Filter'.</p><p>It is suggested to use the Kalman filter approach for the purpose of Precise Point Positioning. <i>[key: cmbMethod]</i></p>")); 1496 1496 _cmbMaxresLineEdit->setWhatsThis(tr("<p>BNC combines all incoming clocks according to specified weights. Individual clock estimates that differ by more than 'Maximal residuum' meters from the average of all clocks will be ignored.<p></p>It is suggested to specify a value of about 0.2 m for the Kalman filter combination approach and a value of about 3.0 meters for the Single-Epoch combination approach.</p><p>Default is a value of '999.0'. <i>[key: cmbMaxres]</i></p>")); 1497 _cmbSamplSpinBox->setWhatsThis(tr("<p>Select a combination Sampling interval for the clocks. Clock corrections will be produced following that interval.</p><p>A value of 10 sec may be an appropriate choice. <i>[key: cmbSampl]</i></p>"));1497 _cmbSamplSpinBox->setWhatsThis(tr("<p>Select a combination Sampling interval for the clocks. Clock corrections will be produced following that interval.</p><p>A value of 10 sec may be an appropriate choice. A value of zero '0' tells BNC to use all available samples. <i>[key: ]</i></p>")); 1498 1498 _cmbGpsCheckBox->setWhatsThis(tr("<p>GPS clock corrections shall be combined. <i>[key: cmbGps]</i></p>")); 1499 1499 _cmbGloCheckBox->setWhatsThis(tr("<p>GLONASS clock corrections shall be combined; GPS Broadcast ephemeris and corrections are required. <i>[key: cmbGlo]</i></p>")); -
trunk/BNC/src/combination/bnccomb.cpp
r9635 r9676 21 21 22 22 #include "bnccomb.h" 23 #include <combination/bncbiassnx.h> 23 24 #include "bnccore.h" 24 25 #include "upload/bncrtnetdecoder.h" … … 130 131 _cmbSampl = settings.value("cmbSampl").toInt(); 131 132 if (_cmbSampl <= 0) { 132 _cmbSampl = 10;133 _cmbSampl = 5; 133 134 } 134 135 _useGps = (Qt::CheckState(settings.value("cmbGps").toInt()) == Qt::Checked) ? true : false; … … 286 287 } 287 288 289 290 // Bias SINEX File 291 // --------------- 292 _bsx = 0; 293 QString bsxFileName = settings.value("cmbBsxFile").toString(); 294 if (!bsxFileName.isEmpty()) { 295 _bsx = new bncBiasSnx(); 296 if (_bsx->readFile(bsxFileName) != success) { 297 emit newMessage("wrong Bias SINEX file", true); 298 delete _bsx; 299 _bsx = 0; 300 } 301 } 302 if (_bsx) { 303 _nextShotTimeBsx = QTime(23, 59, 59, 999); 304 } 305 306 288 307 // Maximal Residuum 289 308 // ---------------- … … 306 325 } 307 326 delete _antex; 327 delete _bsx; 308 328 QMapIterator<char, unsigned> itSys(_cmbSysPrn); 309 329 while (itSys.hasNext()) { … … 321 341 322 342 } 343 344 void bncComb::slotReadBiasSnxFile() { 345 bncSettings settings; 346 QString bsxFileName = settings.value("cmbBsxFile").toString(); 347 if (!bsxFileName.isEmpty()) { 348 _bsx = new bncBiasSnx(); 349 } 350 351 if (_bsx->readFile(bsxFileName) != success) { 352 emit newMessage("wrong Bias SINEX file", true); 353 delete _bsx; 354 _bsx = 0; 355 } 356 #ifdef BNC_DEBUG_CMB 357 else { 358 emit newMessage("Successfully read Bias SINEX file", true); 359 } 360 #endif 361 } 362 323 363 324 364 // Remember orbit corrections … … 358 398 } 359 399 360 // Remember satllite code biases400 // Remember Satellite Code Biases 361 401 //////////////////////////////////////////////////////////////////////////// 362 402 void bncComb::slotNewCodeBiases(QList<t_satCodeBias> satCodeBiases) { … … 442 482 // -------------------- 443 483 if (_resTime.valid() && clkCorr._time <= _resTime) { 484 #ifdef BNC_DEBUG_CMB 444 485 emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + prn.mid(0,3).toLatin1(), true); 486 #endif 445 487 continue; 446 488 } … … 478 520 t_eph* ephPrev = _ephUser.ephPrev(prn); 479 521 if (ephLast == 0) { 522 #ifdef BNC_DEBUG_CMB 480 523 emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1(), true); 524 #endif 481 525 delete newCorr; 482 526 continue; … … 485 529 ephLast->checkState() == t_eph::outdated || 486 530 ephLast->checkState() == t_eph::unhealthy) { 487 emit newMessage("bncComb: ephLast not ok for " + prn.mid(0,3).toLatin1(), true); 531 #ifdef BNC_DEBUG_CMB 532 emit newMessage("bncComb: ephLast not ok (checkState: " + ephLast->checkStateToString().toLatin1() + ") for " + prn.mid(0,3).toLatin1(), true); 533 #endif 488 534 delete newCorr; 489 535 continue; … … 499 545 } 500 546 else { 547 #ifdef BNC_DEBUG_CMB 501 548 emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1() + 502 549 QString(" with IOD %1").arg(newCorr->_iod).toLatin1(), true); 550 #endif 503 551 delete newCorr; 504 552 continue; … … 519 567 } 520 568 else { 521 t_satCodeBias&satCodeBias = storage[clkCorr._prn];522 QMap<t_frequency::type, double> codeBias ;523 for (unsigned ii = 1; ii < t_lcRefSig::cIF; ii++) {524 t_frequency::type frqType = t_lcRefSig::toFreq(sys, static_cast<t_lcRefSig::type>(ii));569 newCorr->_satCodeBias = storage[clkCorr._prn]; 570 QMap<t_frequency::type, double> codeBiasesRefSig; 571 for (unsigned ii = 1; ii < cmbRefSig::cIF; ii++) { 572 t_frequency::type frqType = cmbRefSig::toFreq(sys, static_cast<cmbRefSig::type>(ii)); 525 573 char frqNum = t_frequency::toString(frqType)[1]; 526 char attrib = t_lcRefSig::toAttrib(sys, static_cast<t_lcRefSig::type>(ii));527 QString obsType= QString("%1%2").arg(frqNum).arg(attrib);528 for (unsigned ii = 0; ii < satCodeBias._bias.size(); ii++) {529 const t_frqCodeBias& bias = satCodeBias._bias[ii];530 if ( obsType.toStdString() == bias._rnxType2ch) {531 codeBias [frqType] = bias._value;574 char attrib = cmbRefSig::toAttrib(sys, static_cast<cmbRefSig::type>(ii)); 575 QString rnxType2ch = QString("%1%2").arg(frqNum).arg(attrib); 576 for (unsigned ii = 0; ii < newCorr->_satCodeBias._bias.size(); ii++) { 577 const t_frqCodeBias& bias = newCorr->_satCodeBias._bias[ii]; 578 if (rnxType2ch.toStdString() == bias._rnxType2ch) { 579 codeBiasesRefSig[frqType] = bias._value; 532 580 } 533 581 } 534 582 } 583 if (codeBiasesRefSig.size() < 2) { 584 delete newCorr; 585 continue; 586 } 535 587 map<t_frequency::type, double> codeCoeff; 536 588 double channel = double(newCorr->_eph->slotNum()); 537 t_lcRefSig::coeff(sys, t_lcRefSig::cIF, channel, codeCoeff);589 cmbRefSig::coeff(sys, cmbRefSig::cIF, channel, codeCoeff); 538 590 map<t_frequency::type, double>::const_iterator it; 539 591 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) { 540 592 t_frequency::type frqType = it->first; 541 newCorr->_codeBiasIF += it->second * codeBias[frqType]; 542 } 543 } 544 cout << acName.toStdString() << " " << clkCorr._prn.toString().c_str() << " _codeBiasIF: " << newCorr->_codeBiasIF << endl; 593 newCorr->_codeBiasIF += it->second * codeBiasesRefSig[frqType]; 594 } 595 newCorr->_satCodeBias._bias.clear(); 596 } 597 //cout << acName.toStdString() << " " << clkCorr._prn.toString().c_str() << " _codeBiasIF: " << newCorr->_codeBiasIF << endl; 545 598 } 546 599 … … 622 675 out << "\n" << "Combination: " << sys << "\n" 623 676 << "--------------------------------" << "\n"; 677 678 // Re-read Bias SINEX file 679 // ----------------------- 680 if (_bsx) { 681 QTime currTime = currentDateAndTimeGPS().time(); 682 int ms = currTime.msecsTo(_nextShotTimeBsx); 683 if (ms < 30000) { 684 ms = 30000; 685 } 686 QTimer::singleShot(ms, this, SLOT(slotReadBiasSnxFile())); 687 } 624 688 625 689 // Observation Statistics … … 696 760 if (pp->type == cmbParam::clkSat) { 697 761 if (resCorr.find(pp->prn) != resCorr.end()) { 762 // set clock result 698 763 resCorr[pp->prn]->_dClkResult = pp->xx / t_CST::c; 764 // Add Code Biases from SINEX File 765 if (_bsx) { 766 map<t_frequency::type, double> codeCoeff; 767 double channel = double(resCorr[pp->prn]->_eph->slotNum()); 768 cmbRefSig::coeff(sys, cmbRefSig::cIF, channel, codeCoeff); 769 t_frequency::type fType1 = cmbRefSig::toFreq(sys, cmbRefSig::c1); 770 t_frequency::type fType2 = cmbRefSig::toFreq(sys, cmbRefSig::c2); 771 _bsx->determineSsrSatCodeBiases(pp->prn.mid(0,3), codeCoeff[fType1], codeCoeff[fType2], resCorr[pp->prn]->_satCodeBias); 772 } 699 773 } 700 774 } … … 836 910 out << "bncComb::printResuls bug" << "\n"; 837 911 } 912 out.flush(); 838 913 } 839 914 } … … 845 920 QList<t_orbCorr> orbCorrections; 846 921 QList<t_clkCorr> clkCorrections; 847 848 QString outLines; 922 QList<t_satCodeBias> satCodeBiasList; 923 849 924 unsigned year, month, day, hour, minute; 850 925 double sec; … … 852 927 _resTime.civil_time(hour, minute, sec); 853 928 854 outLines.sprintf("* %4d %2d %2d %d %d %12.8f\n",855 year, month, day, hour, minute, sec);929 QString outLines = QString().asprintf("* %4d %2d %2d %d %d %12.8f\n", 930 year, month, day, hour, minute, sec); 856 931 857 932 QMapIterator<QString, cmbCorr*> it(resCorr); … … 859 934 it.next(); 860 935 cmbCorr* corr = it.value(); 861 936 // ORBIT 862 937 t_orbCorr orbCorr(corr->_orbCorr); 863 938 orbCorr._staID = "INTERNAL"; 864 939 orbCorrections.push_back(orbCorr); 865 940 // CLOCK 866 941 t_clkCorr clkCorr(corr->_clkCorr); 867 942 clkCorr._staID = "INTERNAL"; … … 892 967 893 968 outLines += corr->_prn.mid(0,3); 894 QString hlp; 895 hlp.sprintf(" APC 3 %15.4f %15.4f %15.4f" 896 " Clk 1 %15.4f" 897 " Vel 3 %15.4f %15.4f %15.4f" 898 " CoM 3 %15.4f %15.4f %15.4f\n", 899 xc(1), xc(2), xc(3), 900 xc(4) * t_CST::c, 901 vv(1), vv(2), vv(3), 902 xc(1)-dx(1), xc(2)-dx(2), xc(3)-dx(3)); 969 QString hlp = QString().asprintf(" APC 3 %15.4f %15.4f %15.4f" 970 " Clk 1 %15.4f" 971 " Vel 3 %15.4f %15.4f %15.4f" 972 " CoM 3 %15.4f %15.4f %15.4f", 973 xc(1), xc(2), xc(3), 974 xc(4) * t_CST::c, 975 vv(1), vv(2), vv(3), 976 xc(1)-dx(1), xc(2)-dx(2), xc(3)-dx(3)); 903 977 outLines += hlp; 904 905 QString line; 906 int messageType = _ssrCorr->COTYPE_GPSCOMBINED;907 int updateInt = 0;908 line.sprintf("%d %d %d %.1f %s"909 " %lu"910 " %8.3f %8.3f %8.3f %8.3f" 911 " %10.5f %10.5f %10.5f %10.5f"912 " %10.5f INTERNAL",913 messageType, updateInt, _resTime.gpsw(), _resTime.gpssec(),914 corr->_prn.mid(0,3).toLatin1().data(),915 corr->_iod,916 corr->_dClkResult * t_CST::c,917 corr->_orbCorr._xr[0],918 corr->_orbCorr._xr[1],919 corr->_orbCorr._xr[2],920 0.0,921 corr->_orbCorr._dotXr[0],922 corr->_orbCorr._dotXr[1],923 corr->_orbCorr._dotXr[2],924 0.0);925 978 hlp.clear(); 979 980 // CODE BIASES 981 t_satCodeBias satCodeBias(corr->_satCodeBias); 982 satCodeBias._staID = "INTERNAL"; 983 satCodeBiasList.push_back(satCodeBias); 984 985 if (satCodeBias._bias.size()) { 986 hlp = QString().asprintf(" CodeBias %2lu", satCodeBias._bias.size()); 987 outLines += hlp; 988 hlp.clear(); 989 for (unsigned ii = 0; ii < satCodeBias._bias.size(); ii++) { 990 const t_frqCodeBias& frqCodeBias = satCodeBias._bias[ii]; 991 if (!frqCodeBias._rnxType2ch.empty()) { 992 hlp = QString().asprintf(" %s%10.6f", frqCodeBias._rnxType2ch.c_str(), frqCodeBias._value); 993 outLines += hlp; 994 hlp.clear(); 995 } 996 } 997 } 998 outLines += "\n"; 999 //cout << outLines.toStdString(); 926 1000 delete corr; 927 1001 } … … 941 1015 emit newOrbCorrections(orbCorrections); 942 1016 emit newClkCorrections(clkCorrections); 1017 } 1018 if (satCodeBiasList.size()) { 1019 emit newCodeBiases(satCodeBiasList); 943 1020 } 944 1021 } -
trunk/BNC/src/combination/bnccomb.h
r9635 r9676 15 15 class bncSP3; 16 16 class bncAntex; 17 class bncBiasSnx; 17 18 18 19 class bncComb : public QObject { … … 29 30 void slotNewClkCorrections(QList<t_clkCorr> clkCorrections); 30 31 void slotNewCodeBiases(QList<t_satCodeBias> satCodeBiases); 32 33 34 private slots: 35 void slotReadBiasSnxFile(); 31 36 32 37 signals: … … 82 87 _iod = 0; 83 88 _dClkResult = 0.0; 84 _codeBiasIF 89 _codeBiasIF = 0.0; 85 90 } 86 91 ~cmbCorr() {} 87 QString _prn;88 bncTime _time;89 unsigned long _iod;90 t_eph* _eph;91 t_orbCorr _orbCorr;92 t_clkCorr _clkCorr;93 t_satCodeBias _satCodeBias;94 QString _acName;95 double _codeBiasIF;96 double _dClkResult;97 ColumnVector _diffRao;92 QString _prn; 93 bncTime _time; 94 unsigned long _iod; 95 t_eph* _eph; 96 t_orbCorr _orbCorr; 97 t_clkCorr _clkCorr; 98 t_satCodeBias _satCodeBias; 99 QString _acName; 100 double _codeBiasIF; 101 double _dClkResult; 102 ColumnVector _diffRao; 98 103 QString ID() {return _acName + "_" + _prn;} 99 104 }; … … 111 116 }; 112 117 113 class t_lcRefSig {118 class cmbRefSig { 114 119 public: 115 120 enum type {dummy = 0, c1, c2, cIF}; … … 183 188 codeCoeff[fType2] = -f2 * f2 / (f1 * f1 - f2 * f2); 184 189 return; 185 case t_lcRefSig::dummy:190 case cmbRefSig::dummy: 186 191 return; 187 192 } … … 213 218 QByteArray _log; 214 219 bncAntex* _antex; 220 bncBiasSnx* _bsx; 221 QTime _nextShotTimeBsx; 215 222 double _MAXRES; 216 223 QMap<char, QString> _masterOrbitAC; -
trunk/BNC/src/src.pri
r9652 r9676 34 34 #debug:DEFINES += BNC_DEBUG_PPP 35 35 #debug:DEFINES += BNC_DEBUG_SSR 36 #debug:DEFINES += BNC_DEBUG_CMB 36 37 37 38 # Include Path … … 79 80 rinex/availplot.h rinex/eleplot.h \ 80 81 rinex/dopplot.h orbComp/sp3Comp.h \ 81 combination/bnccomb.h 82 combination/bnccomb.h combination/bncbiassnx.h 82 83 83 84 HEADERS += serial/qextserialbase.h serial/qextserialport.h … … 118 119 rinex/availplot.cpp rinex/eleplot.cpp \ 119 120 rinex/dopplot.cpp orbComp/sp3Comp.cpp \ 120 combination/bnccomb.cpp 121 combination/bnccomb.cpp combination/bncbiassnx.cpp 121 122 122 123 SOURCES += serial/qextserialbase.cpp serial/qextserialport.cpp
Note:
See TracChangeset
for help on using the changeset viewer.