Changeset 4572 in ntrip
- Timestamp:
- Aug 29, 2012, 11:23:06 AM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcanalyze.cpp
r4571 r4572 68 68 _currEpo = 0; 69 69 70 connect(this, SIGNAL(displayGraph(const QString&, 70 connect(this, SIGNAL(dspSkyPlot(const QString&, 71 const QByteArray&, 72 QVector<t_polarPoint*>*, 73 const QByteArray&, 74 QVector<t_polarPoint*>*, 75 const QByteArray&, double)), 76 this, SLOT(slotDspSkyPlot(const QString&, 71 77 const QByteArray&, 72 78 QVector<t_polarPoint*>*, 73 79 const QByteArray&, 74 80 QVector<t_polarPoint*>*, 75 const QByteArray&, double)), 76 this, SLOT(slotDisplayGraph(const QString&, 81 const QByteArray&, double))); 82 83 connect(this, SIGNAL(dspAvailPlot(const QString&, 84 const QByteArray&, 85 QMap<QString, QVector<int> >*)), 86 this, SLOT(slotDspAvailPlot(const QString&, 77 87 const QByteArray&, 78 QVector<t_polarPoint*>*, 79 const QByteArray&, 80 QVector<t_polarPoint*>*, 81 const QByteArray&, double))); 88 QMap<QString, QVector<int> >*))); 89 82 90 } 83 91 … … 101 109 // 102 110 //////////////////////////////////////////////////////////////////////////// 103 void t_reqcAnalyze::slotD isplayGraph(const QString& fileName,104 105 106 107 108 109 111 void t_reqcAnalyze::slotDspSkyPlot(const QString& fileName, 112 const QByteArray& title1, 113 QVector<t_polarPoint*>* data1, 114 const QByteArray& title2, 115 QVector<t_polarPoint*>* data2, 116 const QByteArray& scaleTitle, 117 double maxValue) { 110 118 111 119 bncApp* app = dynamic_cast<bncApp*>(qApp); … … 247 255 // Analyze the Multipath 248 256 // --------------------- 249 QVector<t_polarPoint*>* dataMP1 = new QVector<t_polarPoint*>; 250 QVector<t_polarPoint*>* dataMP2 = new QVector<t_polarPoint*>; 251 QVector<t_polarPoint*>* dataSNR1 = new QVector<t_polarPoint*>; 252 QVector<t_polarPoint*>* dataSNR2 = new QVector<t_polarPoint*>; 257 QVector<t_polarPoint*>* dataMP1 = new QVector<t_polarPoint*>; 258 QVector<t_polarPoint*>* dataMP2 = new QVector<t_polarPoint*>; 259 QVector<t_polarPoint*>* dataSNR1 = new QVector<t_polarPoint*>; 260 QVector<t_polarPoint*>* dataSNR2 = new QVector<t_polarPoint*>; 261 QMap<QString, QVector<int> >* availL1 = new QMap<QString, QVector<int> >; 262 253 263 254 264 QMapIterator<QString, t_satStat> it(_satStat); … … 257 267 QString prn = it.key(); 258 268 const t_satStat& satStat = it.value(); 259 analyzeMultipathAndSNR(prn, satStat, xyz, obsFile->interval(), 260 dataMP1, dataMP2, dataSNR1, dataSNR2); 261 } 262 263 emit displayGraph(obsFile->fileName(), "MP1", dataMP1, "MP2", dataMP2, 264 "Meters", 2.0); 265 emit displayGraph(obsFile->fileName(), "SNR1", dataSNR1, "SNR2", dataSNR2, 266 "", 9.0); 269 QVector<int>& dataL1 = (*availL1)[prn]; 270 preparePlotData(prn, satStat, xyz, obsFile->interval(), 271 dataMP1, dataMP2, dataSNR1, dataSNR2, dataL1); 272 } 273 274 emit dspSkyPlot(obsFile->fileName(), "MP1", dataMP1, "MP2", dataMP2, 275 "Meters", 2.0); 276 277 emit dspSkyPlot(obsFile->fileName(), "SNR1", dataSNR1, "SNR2", dataSNR2, 278 "", 9.0); 279 280 emit dspAvailPlot(obsFile->fileName(), "Availability L1", availL1); 267 281 268 282 if (_log) { … … 356 370 // 357 371 //////////////////////////////////////////////////////////////////////////// 358 void t_reqcAnalyze::analyzeMultipathAndSNR(const QString& prn, 359 const t_satStat& satStat, 360 const ColumnVector& xyz, 361 double obsInterval, 362 QVector<t_polarPoint*>* dataMP1, 363 QVector<t_polarPoint*>* dataMP2, 364 QVector<t_polarPoint*>* dataSNR1, 365 QVector<t_polarPoint*>* dataSNR2) { 372 void t_reqcAnalyze::preparePlotData(const QString& prn, 373 const t_satStat& satStat, 374 const ColumnVector& xyz, 375 double obsInterval, 376 QVector<t_polarPoint*>* dataMP1, 377 QVector<t_polarPoint*>* dataMP2, 378 QVector<t_polarPoint*>* dataSNR1, 379 QVector<t_polarPoint*>* dataSNR2, 380 QVector<int>& dataL1) { 366 381 367 382 const int chunkStep = int( 30.0 / obsInterval); // chunk step (30 sec) … … 370 385 for (int chunkStart = 0; chunkStart + numEpo < satStat.anaObs.size(); 371 386 chunkStart += chunkStep) { 387 388 bncTime firstEpoch; 372 389 373 390 // Compute Mean … … 379 396 double SNR2 = 0.0; 380 397 381 382 398 for (int ii = 0; ii < numEpo; ii++) { 383 399 int iEpo = chunkStart + ii; 384 400 const t_anaObs* anaObs = satStat.anaObs[iEpo]; 401 402 if (ii == 0) { 403 firstEpoch.set(anaObs->_GPSWeek, anaObs->_GPSWeeks); 404 } 405 385 406 mean1 += anaObs->_MP1; 386 407 mean2 += anaObs->_MP2; … … 462 483 (*dataSNR2) << (new t_polarPoint(az, zen, SNR2)); 463 484 485 dataL1 << int(firstEpoch.gpssec()); 486 464 487 if (_log) { 465 488 _log->setRealNumberNotation(QTextStream::FixedNotation); … … 479 502 } 480 503 } 504 505 // 506 //////////////////////////////////////////////////////////////////////////// 507 void t_reqcAnalyze::slotDspAvailPlot(const QString& fileName, 508 const QByteArray& title, 509 QMap<QString, QVector<int> >* prnAvail){ 510 511 } -
trunk/BNC/src/rinex/reqcanalyze.h
r4571 r4572 45 45 signals: 46 46 void finished(); 47 void displayGraph(const QString& fileName, 48 const QByteArray&, 49 QVector<t_polarPoint*>*, 50 const QByteArray&, 51 QVector<t_polarPoint*>*, 52 const QByteArray&, double); 47 void dspSkyPlot(const QString&, 48 const QByteArray&, 49 QVector<t_polarPoint*>*, 50 const QByteArray&, 51 QVector<t_polarPoint*>*, 52 const QByteArray&, double); 53 54 void dspAvailPlot(const QString&, const QByteArray&, 55 QMap<QString, QVector<int> >*); 53 56 54 57 private slots: 55 void slotDisplayGraph(const QString& fileName, 56 const QByteArray& title1, 57 QVector<t_polarPoint*>* data1, 58 const QByteArray& title2, 59 QVector<t_polarPoint*>* data2, 60 const QByteArray& scaleTitle, double maxValue); 58 void slotDspSkyPlot(const QString& fileName, 59 const QByteArray& title1, 60 QVector<t_polarPoint*>* data1, 61 const QByteArray& title2, 62 QVector<t_polarPoint*>* data2, 63 const QByteArray& scaleTitle, double maxValue); 64 65 void slotDspAvailPlot(const QString& fileName, const QByteArray& title, 66 QMap<QString, QVector<int> >* prnAvail); 61 67 62 68 public: … … 99 105 100 106 void analyzeFile(t_rnxObsFile* obsFile); 101 void analyzeMultipathAndSNR(const QString& prn, 102 const t_satStat& satStat, 103 const ColumnVector& xyz, 104 double obsInterval, 105 QVector<t_polarPoint*>* dataMP1, 106 QVector<t_polarPoint*>* dataMP2, 107 QVector<t_polarPoint*>* dataSNR1, 108 QVector<t_polarPoint*>* dataSNR2); 107 void preparePlotData(const QString& prn, const t_satStat& satStat, 108 const ColumnVector& xyz, double obsInterval, 109 QVector<t_polarPoint*>* dataMP1, 110 QVector<t_polarPoint*>* dataMP2, 111 QVector<t_polarPoint*>* dataSNR1, 112 QVector<t_polarPoint*>* dataSNR2, 113 QVector<int>& dataL1); 109 114 110 115 QString _logFileName;
Note:
See TracChangeset
for help on using the changeset viewer.