Changeset 6539 in ntrip for trunk/BNC/src/rinex
- Timestamp:
- Jan 9, 2015, 6:43:09 PM (10 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/availplot.cpp
r6537 r6539 63 63 public: 64 64 t_scaleDrawPrn() {} 65 virtual QwtText label( intiPrn) const {65 virtual QwtText label(double iPrn) const { 66 66 return _yLabels[iPrn]; 67 67 } -
trunk/BNC/src/rinex/reqcanalyze.cpp
r6535 r6539 63 63 bncSettings settings; 64 64 65 _logFileName = settings.value("reqcOutLogFile").toString(); expandEnvVar(_logFileName); 66 _logFile = 0; 67 _log = 0; 68 _currEpo = 0; 69 _obsFileNames = settings.value("reqcObsFile").toString().split(",", QString::SkipEmptyParts); 70 _navFileNames = settings.value("reqcNavFile").toString().split(",", QString::SkipEmptyParts); 65 _logFileName = settings.value("reqcOutLogFile").toString(); expandEnvVar(_logFileName); 66 _logFile = 0; 67 _log = 0; 68 _currEpo = 0; 69 _obsFileNames = settings.value("reqcObsFile").toString().split(",", QString::SkipEmptyParts); 70 _navFileNames = settings.value("reqcNavFile").toString().split(",", QString::SkipEmptyParts); 71 _reqcPlotSignals = settings.value("reqcSkyPlotSignals").toString(); 72 if (_reqcPlotSignals.isEmpty()) {_reqcPlotSignals = "G:1&2 R:1&2 J:1&2 E:1&5 S:1&5 C:2&7";} 73 analyzePlotSignals(_signalTypes); 71 74 72 75 connect(this, SIGNAL(dspSkyPlot(const QString&, const QString&, QVector<t_polarPoint*>*, … … 134 137 emit finished(); 135 138 deleteLater(); 139 } 140 141 // 142 //////////////////////////////////////////////////////////////////////////// 143 void t_reqcAnalyze::analyzePlotSignals(QMap<char, QVector<QString> >& signalTypes) { 144 145 QStringList signalsOpt = _reqcPlotSignals.split(" ", QString::SkipEmptyParts); 146 147 for (int ii = 0; ii < signalsOpt.size(); ii++) { 148 QStringList hlp = signalsOpt.at(ii).split(QRegExp("[:&]"), QString::SkipEmptyParts); 149 if (hlp.size() > 1 && hlp[0].length() == 1) { 150 char system = hlp[0].toAscii().constData()[0]; 151 signalTypes[system].append(hlp[1]); 152 if (hlp.size() > 2) { 153 signalTypes[system].append(hlp[2]); 154 } 155 } 156 } 136 157 } 137 158 … … 170 191 for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) { 171 192 const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs]; 193 if (_signalTypes.find(rnxSat.prn.system()) == _signalTypes.end()) { 194 continue; 195 } 172 196 t_satObs satObs; 173 197 t_rnxObsFile::setObsFromRnx(obsFile, _currEpo, rnxSat, satObs); … … 216 240 const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iSat]; 217 241 const t_prn& prn = rnxSat.prn; 242 243 if (_signalTypes.find(prn.system()) == _signalTypes.end()) { 244 continue; 245 } 218 246 219 247 t_eph* eph = 0; … … 532 560 QString sn2Title = "Signal-to-Noise Ratio\n"; 533 561 534 bncSettings settings; 535 536 QString reqcSkyPlotSignals = settings.value("reqcSkyPlotSignals").toString(); 537 if (reqcSkyPlotSignals.isEmpty()) { 538 reqcSkyPlotSignals = "G:1&2 R:1&2 J:1&2 E:1&7 C:1&6"; 539 } 540 541 QStringList signalsOpt = reqcSkyPlotSignals.split(" ", QString::SkipEmptyParts); 542 QMap<char, QString> signalTypes1; 543 QMap<char, QString> signalTypes2; 544 for (int ii = 0; ii < signalsOpt.size(); ii++) { 545 QStringList hlp = signalsOpt.at(ii).split(QRegExp("[:&]"), QString::SkipEmptyParts); 546 if (hlp.size() > 1 && hlp[0].length() == 1) { 547 char system = hlp[0].toAscii().constData()[0]; 548 signalTypes1[system] = hlp[1]; 549 mp1Title += hlp[0] + ":" + hlp[1] + " "; 550 sn1Title += hlp[0] + ":" + hlp[1] + " "; 551 if (hlp.size() > 2) { 552 signalTypes2[system] = hlp[2]; 553 mp2Title += hlp[0] + ":" + hlp[2] + " "; 554 sn2Title += hlp[0] + ":" + hlp[2] + " "; 555 } 556 } 562 for(QMap<char, QVector<QString> >::iterator it = _signalTypes.begin(); 563 it != _signalTypes.end(); it++) { 564 mp1Title += QString(it.key()) + ":" + it.value()[0] + " "; 565 sn1Title += QString(it.key()) + ":" + it.value()[0] + " "; 566 mp2Title += QString(it.key()) + ":" + it.value()[1] + " "; 567 sn2Title += QString(it.key()) + ":" + it.value()[1] + " "; 557 568 } 558 569 … … 579 590 580 591 for (int ii = 0; ii < 2; ii++) { 581 const QMap<char, QString>& signalTypes = (ii == 0 ? signalTypes1 : signalTypes2);582 592 if (frqType[ii].isEmpty()) { 583 QMapIterator<char, Q String> it(signalTypes);593 QMapIterator<char, QVector<QString> > it(_signalTypes); 584 594 while (it.hasNext()) { 585 595 it.next(); 586 596 if (it.key() == prn.system()) { 587 if (it.value() == qcFrq._rnxType2ch || it.value()== qcFrq._rnxType2ch.left(1)) {597 if (it.value()[ii] == qcFrq._rnxType2ch || it.value()[ii] == qcFrq._rnxType2ch.left(1)) { 588 598 frqType[ii] = qcFrq._rnxType2ch; 589 599 break; … … 715 725 const t_prn& prn = it.key(); 716 726 const t_qcSat& qcSat = it.value(); 727 717 728 t_plotData& data = plotDataMap[prn]; 718 729 … … 722 733 } 723 734 724 char frqChar1 = '1'; 725 char frqChar2 = '2'; 726 if (prn.system() == 'E' || prn.system() == 'S') { 727 frqChar2 = '5'; 728 } 729 else if (prn.system() == 'C') { 730 frqChar2 = '7'; 731 } 735 char frqChar1 = _signalTypes[prn.system()][0][0].toAscii(); 736 char frqChar2 = _signalTypes[prn.system()][1][0].toAscii(); 737 732 738 QString frqType1; 733 739 QString frqType2; -
trunk/BNC/src/rinex/reqcanalyze.h
r6529 r6539 164 164 void checkEphemerides(); 165 165 166 void analyzePlotSignals(QMap<char, QVector<QString> >& signalTypes); 167 166 168 void analyzeFile(t_rnxObsFile* obsFile); 167 169 … … 179 181 void printReport(const t_rnxObsFile* obsFile); 180 182 181 QString _logFileName; 182 QFile* _logFile; 183 QTextStream* _log; 184 QStringList _obsFileNames; 185 QVector<t_rnxObsFile*> _rnxObsFiles; 186 QStringList _navFileNames; 187 QVector<t_eph*> _ephs; 188 t_rnxObsFile::t_rnxEpo* _currEpo; 189 t_qcFile _qcFile; 183 QString _logFileName; 184 QFile* _logFile; 185 QTextStream* _log; 186 QStringList _obsFileNames; 187 QVector<t_rnxObsFile*> _rnxObsFiles; 188 QStringList _navFileNames; 189 QString _reqcPlotSignals; 190 QMap<char, QVector<QString> > _signalTypes; 191 QVector<t_eph*> _ephs; 192 t_rnxObsFile::t_rnxEpo* _currEpo; 193 t_qcFile _qcFile; 190 194 }; 191 195
Note:
See TracChangeset
for help on using the changeset viewer.