Changeset 7297 in ntrip for trunk/BNC/src/combination
- Timestamp:
- Sep 22, 2015, 4:42:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/src/combination/bnccomb.cpp ¶
r7132 r7297 11 11 * Created: 22-Jan-2011 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ … … 78 78 //////////////////////////////////////////////////////////////////////////// 79 79 double bncComb::cmbParam::partial(const QString& AC_, const QString& prn_) { 80 80 81 81 if (type == offACgps) { 82 82 if (AC == AC_ && prn_[0] == 'G') { … … 103 103 } 104 104 105 // 105 // 106 106 //////////////////////////////////////////////////////////////////////////// 107 107 QString bncComb::cmbParam::toString() const { 108 108 109 109 QString outStr; 110 110 111 111 if (type == offACgps) { 112 112 outStr = "AC offset GPS " + AC; … … 131 131 bncSettings settings; 132 132 133 QStringList c ombineStreams = settings.value("combineStreams").toStringList();133 QStringList cmbStreams = settings.value("cmbStreams").toStringList(); 134 134 135 135 _cmbSampl = settings.value("cmbSampl").toInt(); … … 140 140 _masterMissingEpochs = 0; 141 141 142 if (c ombineStreams.size() >= 1 && !combineStreams[0].isEmpty()) {143 QListIterator<QString> it(c ombineStreams);142 if (cmbStreams.size() >= 1 && !cmbStreams[0].isEmpty()) { 143 QListIterator<QString> it(cmbStreams); 144 144 while (it.hasNext()) { 145 145 QStringList hlp = it.next().split(" "); … … 157 157 _rtnetDecoder = 0; 158 158 159 connect(this, SIGNAL(newMessage(QByteArray,bool)), 159 connect(this, SIGNAL(newMessage(QByteArray,bool)), 160 160 BNC_CORE, SLOT(slotMessage(const QByteArray,bool))); 161 161 … … 197 197 for (unsigned iGps = 1; iGps <= t_prn::MAXPRN_GPS; iGps++) { 198 198 QString prn = QString("G%1_0").arg(iGps, 2, 10, QChar('0')); 199 _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar, 199 _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar, 200 200 AC->name, prn)); 201 201 } … … 204 204 for (unsigned iGlo = 1; iGlo <= t_prn::MAXPRN_GLONASS; iGlo++) { 205 205 QString prn = QString("R%1_0").arg(iGlo, 2, 10, QChar('0')); 206 _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar, 206 _params.push_back(new cmbParam(cmbParam::offACSat, ++nextPar, 207 207 AC->name, prn)); 208 208 } … … 219 219 } 220 220 } 221 221 222 222 // Initialize Variance-Covariance Matrix 223 223 // ------------------------------------- … … 353 353 continue; 354 354 } 355 355 356 356 // Create new correction 357 357 // --------------------- … … 424 424 } 425 425 426 // Change the correction so that it refers to last received ephemeris 426 // Change the correction so that it refers to last received ephemeris 427 427 //////////////////////////////////////////////////////////////////////////// 428 428 void bncComb::switchToLastEph(t_eph* lastEph, cmbCorr* corr) { … … 471 471 QTextStream out(&_log, QIODevice::WriteOnly); 472 472 473 out << endl << "Combination:" << endl 473 out << endl << "Combination:" << endl 474 474 << "------------------------------" << endl; 475 475 … … 515 515 if (AC->numObs > 0) { 516 516 out << "Switching Master AC " 517 << _masterOrbitAC.toAscii().data() << " --> " 518 << AC->name.toAscii().data() << " " 519 << _resTime.datestr().c_str() << " " 517 << _masterOrbitAC.toAscii().data() << " --> " 518 << AC->name.toAscii().data() << " " 519 << _resTime.datestr().c_str() << " " 520 520 << _resTime.timestr().c_str() << endl; 521 521 _masterOrbitAC = AC->name; … … 550 550 } 551 551 } 552 out << _resTime.datestr().c_str() << " " 552 out << _resTime.datestr().c_str() << " " 553 553 << _resTime.timestr().c_str() << " "; 554 554 out.setRealNumberNotation(QTextStream::FixedNotation); … … 618 618 619 619 int maxResIndex; 620 double maxRes = vv.maximum_absolute_value1(maxResIndex); 620 double maxRes = vv.maximum_absolute_value1(maxResIndex); 621 621 out.setRealNumberNotation(QTextStream::FixedNotation); 622 out.setRealNumberPrecision(3); 622 out.setRealNumberPrecision(3); 623 623 out << _resTime.datestr().c_str() << " " << _resTime.timestr().c_str() 624 624 << " Maximum Residuum " << maxRes << ' ' … … 627 627 for (int iPar = 1; iPar <= _params.size(); iPar++) { 628 628 cmbParam* pp = _params[iPar-1]; 629 if (pp->type == cmbParam::offACSat && 629 if (pp->type == cmbParam::offACSat && 630 630 pp->AC == corrs()[maxResIndex-1]->_acName && 631 631 pp->prn == corrs()[maxResIndex-1]->_prn.mid(0,3)) { … … 675 675 eph->getCrd(_resTime, xc, vv, false); 676 676 677 out << _resTime.datestr().c_str() << " " 677 out << _resTime.datestr().c_str() << " " 678 678 << _resTime.timestr().c_str() << " "; 679 679 out.setFieldWidth(3); … … 704 704 _resTime.civil_time(hour, minute, sec); 705 705 706 outLines.sprintf("* %4d %2d %2d %d %d %12.8f\n", 706 outLines.sprintf("* %4d %2d %2d %d %d %12.8f\n", 707 707 year, month, day, hour, minute, sec); 708 708 … … 797 797 //////////////////////////////////////////////////////////////////////////// 798 798 t_irc bncComb::createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP, 799 const ColumnVector& x0, 799 const ColumnVector& x0, 800 800 QMap<QString, cmbCorr*>& resCorr) { 801 801 802 802 unsigned nPar = _params.size(); 803 unsigned nObs = corrs().size(); 803 unsigned nObs = corrs().size(); 804 804 805 805 if (nObs == 0) { … … 858 858 cmbParam* pp = _params[iPar-1]; 859 859 if ( AA.Column(iPar).maximum_absolute_value() > 0.0 && 860 pp->type == cmbParam::offACSat && 860 pp->type == cmbParam::offACSat && 861 861 pp->prn == prn) { 862 862 AA(nObs+iCond, iPar) = 1.0; … … 872 872 // cmbParam* pp = _params[iPar-1]; 873 873 // if ( AA.Column(iPar).maximum_absolute_value() > 0.0 && 874 // pp->type == cmbParam::offACSat && 874 // pp->type == cmbParam::offACSat && 875 875 // pp->prn == prn) { 876 876 // AA(nObs+iCond, iPar) = 1.0; … … 899 899 // ---------------------- 900 900 while (true) { 901 901 902 902 // Remove Satellites that are not in Master 903 903 // ---------------------------------------- … … 922 922 } 923 923 } 924 924 925 925 // Count Number of Observations per Satellite and per AC 926 926 // ----------------------------------------------------- … … 945 945 } 946 946 } 947 947 948 948 // Clean-Up the Paramters 949 949 // ---------------------- … … 952 952 } 953 953 _params.clear(); 954 954 955 955 // Set new Parameters 956 956 // ------------------ 957 957 int nextPar = 0; 958 958 959 959 QMapIterator<QString, int> itAC(numObsAC); 960 960 while (itAC.hasNext()) { … … 968 968 } 969 969 } 970 } 971 970 } 971 972 972 QMapIterator<QString, int> itPrn(numObsPrn); 973 973 while (itPrn.hasNext()) { … … 978 978 _params.push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn)); 979 979 } 980 } 981 980 } 981 982 982 int nPar = _params.size(); 983 ColumnVector x0(nPar); 983 ColumnVector x0(nPar); 984 984 x0 = 0.0; 985 985 986 986 // Create First-Design Matrix 987 987 // -------------------------- … … 992 992 return failure; 993 993 } 994 994 995 995 ColumnVector vv; 996 996 try { … … 1008 1008 1009 1009 int maxResIndex; 1010 double maxRes = vv.maximum_absolute_value1(maxResIndex); 1010 double maxRes = vv.maximum_absolute_value1(maxResIndex); 1011 1011 out.setRealNumberNotation(QTextStream::FixedNotation); 1012 out.setRealNumberPrecision(3); 1012 out.setRealNumberPrecision(3); 1013 1013 out << _resTime.datestr().c_str() << " " << _resTime.timestr().c_str() 1014 1014 << " Maximum Residuum " << maxRes << ' ' … … 1023 1023 out << " OK" << endl; 1024 1024 out.setRealNumberNotation(QTextStream::FixedNotation); 1025 out.setRealNumberPrecision(3); 1025 out.setRealNumberPrecision(3); 1026 1026 for (int ii = 0; ii < vv.Nrows(); ii++) { 1027 1027 const cmbCorr* corr = corrs()[ii]; 1028 out << _resTime.datestr().c_str() << ' ' 1028 out << _resTime.datestr().c_str() << ' ' 1029 1029 << _resTime.timestr().c_str() << " " 1030 1030 << corr->_acName << ' ' << corr->_prn.mid(0,3); … … 1092 1092 meanRao[prn].ReSize(4); 1093 1093 meanRao[prn].Rows(1,3) = corr->_orbCorr._xr; 1094 meanRao[prn](4) = 1; 1094 meanRao[prn](4) = 1; 1095 1095 } 1096 1096 else { 1097 1097 meanRao[prn].Rows(1,3) += corr->_orbCorr._xr; 1098 meanRao[prn](4) += 1; 1098 meanRao[prn](4) += 1; 1099 1099 } 1100 1100 if (numCorr.find(prn) == numCorr.end()) { … … 1105 1105 } 1106 1106 } 1107 1107 1108 1108 // Compute Differences wrt Mean, find Maximum 1109 1109 // ------------------------------------------ … … 1127 1127 maxDiff[prn] = corr; 1128 1128 } 1129 } 1130 } 1131 1129 } 1130 } 1131 1132 1132 if (_ACs.size() == 1) { 1133 1133 break; … … 1150 1150 out << _resTime.datestr().c_str() << " " 1151 1151 << _resTime.timestr().c_str() << " " 1152 << "Orbit Outlier: " 1153 << corr->_acName.toAscii().data() << " " 1152 << "Orbit Outlier: " 1153 << corr->_acName.toAscii().data() << " " 1154 1154 << prn.mid(0,3).toAscii().data() << " " 1155 << corr->_iod << " " 1155 << corr->_iod << " " 1156 1156 << norm << endl; 1157 1157 delete corr; … … 1161 1161 } 1162 1162 } 1163 1163 1164 1164 if (!removed) { 1165 1165 break; … … 1170 1170 } 1171 1171 1172 // 1172 // 1173 1173 //////////////////////////////////////////////////////////////////////////// 1174 1174 void bncComb::slotProviderIDChanged(QString mountPoint) {
Note:
See TracChangeset
for help on using the changeset viewer.