Changeset 6255 in ntrip
- Timestamp:
- Oct 24, 2014, 9:33:18 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcanalyze.cpp
r6213 r6255 35 35 * Created: 11-Apr-2012 36 36 * 37 * Changes: 37 * Changes: 38 38 * 39 39 * -----------------------------------------------------------------------*/ … … 72 72 _currEpo = 0; 73 73 74 connect(this, SIGNAL(dspSkyPlot(const QString&, 75 const QByteArray&, 76 QVector<t_polarPoint*>*, 74 connect(this, SIGNAL(dspSkyPlot(const QString&, 77 75 const QByteArray&, 78 76 QVector<t_polarPoint*>*, 79 const QByteArray&, double)), 80 this, SLOT(slotDspSkyPlot(const QString&, 77 const QByteArray&, 78 QVector<t_polarPoint*>*, 79 const QByteArray&, double)), 80 this, SLOT(slotDspSkyPlot(const QString&, 81 81 const QByteArray&, 82 QVector<t_polarPoint*>*, 82 QVector<t_polarPoint*>*, 83 83 const QByteArray&, 84 84 QVector<t_polarPoint*>*, … … 105 105 } 106 106 107 // 108 //////////////////////////////////////////////////////////////////////////// 109 void t_reqcAnalyze::slotDspSkyPlot(const QString& fileName, 107 // 108 //////////////////////////////////////////////////////////////////////////// 109 void t_reqcAnalyze::slotDspSkyPlot(const QString& fileName, 110 110 const QByteArray& title1, 111 QVector<t_polarPoint*>* data1, 111 QVector<t_polarPoint*>* data1, 112 112 const QByteArray& title2, 113 113 QVector<t_polarPoint*>* data2, … … 135 135 } 136 136 } 137 137 138 138 QwtInterval scaleInterval(0.0, maxValue); 139 139 … … 152 152 } 153 153 154 t_graphWin* graphWin = new t_graphWin(0, fileName, plots, 154 t_graphWin* graphWin = new t_graphWin(0, fileName, plots, 155 155 &scaleTitle, &scaleInterval); 156 156 … … 166 166 } 167 167 168 // 168 // 169 169 //////////////////////////////////////////////////////////////////////////// 170 170 void t_reqcAnalyze::run() { … … 198 198 } 199 199 200 // 200 // 201 201 //////////////////////////////////////////////////////////////////////////// 202 202 void t_reqcAnalyze::analyzeFile(t_rnxObsFile* obsFile) { … … 232 232 } 233 233 _obsStat._endTime = _currEpo->tt; 234 234 235 235 // Loop over all satellites 236 236 // ------------------------ … … 239 239 t_satObs obs; 240 240 t_rnxObsFile::setObsFromRnx(obsFile, _currEpo, rnxSat, obs); 241 241 242 242 QString prn(obs._prn.toString().c_str()); 243 243 244 244 t_ephGlo* ephGlo = 0; 245 245 int slotNum = 0; … … 255 255 } 256 256 } 257 257 258 258 t_irc irc = _allObsMap[prn].addObs(obs, slotNum); 259 259 … … 271 271 } 272 272 } 273 273 274 274 prepareObsStat(iEpo, obsFile->interval(), xyzSta); 275 275 iEpo++; … … 282 282 } 283 283 else { 284 qDebug() << str; 284 qDebug() << str; 285 285 } 286 286 _mutex.unlock(); … … 299 299 it.next(); 300 300 QString prn = it.key(); 301 preparePlotData(prn, xyzSta, obsFile->interval(), 301 preparePlotData(prn, xyzSta, obsFile->interval(), 302 302 dataMP1, dataMP2, dataSNR1, dataSNR2); 303 303 } … … 310 310 QFileInfo fileInfo(obsFile->fileName()); 311 311 QByteArray title = fileInfo.fileName().toAscii(); 312 emit dspSkyPlot(obsFile->fileName(), "MP1", dataMP1, "MP2", dataMP2, 312 emit dspSkyPlot(obsFile->fileName(), "MP1", dataMP1, "MP2", dataMP2, 313 313 "Meters", 2.0); 314 emit dspSkyPlot(obsFile->fileName(), "SNR1", dataSNR1, "SNR2", dataSNR2, 315 "", 9.0); 314 double mean = 0.0; 315 for (int ii = 0; ii < dataSNR1->size(); ii++) { 316 const t_polarPoint* point = dataSNR1->at(ii); 317 mean += point->_value; 318 } 319 mean /= dataSNR1->size(); 320 double max = (mean > 9.0) ? 54.0 : 9.0; 321 QByteArray str = (mean > 9.0) ? "dbHz" : ""; 322 emit dspSkyPlot(obsFile->fileName(), "SNR1", dataSNR1, "SNR2", dataSNR2, 323 str, max); 316 324 emit dspAvailPlot(obsFile->fileName(), title); 317 325 } … … 337 345 } 338 346 339 // 340 //////////////////////////////////////////////////////////////////////////// 341 t_irc t_reqcAnalyze::t_allObs::addObs(const t_satObs& obs, int slotNum) { 347 // 348 //////////////////////////////////////////////////////////////////////////// 349 t_irc t_reqcAnalyze::t_allObs::addObs(const t_satObs& obs, int slotNum) { 342 350 343 351 t_oneObs* newObs = new t_oneObs(obs._time.gpsw(), obs._time.gpssec()); … … 360 368 } 361 369 if (frqObs->_codeValid) { 362 P1 = frqObs->_code; 370 P1 = frqObs->_code; 363 371 } 364 372 if (frqObs->_snrValid) { 365 newObs->_SNR1 = frqObs->_snr; 373 newObs->_SNR1 = frqObs->_snr; 366 374 } 367 375 } … … 374 382 } 375 383 if (frqObs->_codeValid) { 376 P2 = frqObs->_code; 384 P2 = frqObs->_code; 377 385 } 378 386 if (frqObs->_snrValid) { 379 newObs->_SNR2 = frqObs->_snr; 387 newObs->_SNR2 = frqObs->_snr; 380 388 } 381 389 } … … 425 433 } 426 434 427 // 435 // 428 436 //////////////////////////////////////////////////////////////////////////// 429 437 void t_reqcAnalyze::prepareObsStat(unsigned iEpo, double obsInterval, … … 443 451 } 444 452 445 // 446 //////////////////////////////////////////////////////////////////////////// 447 void t_reqcAnalyze::preparePlotData(const QString& prn, 453 // 454 //////////////////////////////////////////////////////////////////////////// 455 void t_reqcAnalyze::preparePlotData(const QString& prn, 448 456 const ColumnVector& xyzSta, 449 457 double obsInterval, 450 QVector<t_polarPoint*>* dataMP1, 458 QVector<t_polarPoint*>* dataMP1, 451 459 QVector<t_polarPoint*>* dataMP2, 452 QVector<t_polarPoint*>* dataSNR1, 460 QVector<t_polarPoint*>* dataSNR1, 453 461 QVector<t_polarPoint*>* dataSNR2) { 454 462 455 const int chunkStep = int( 30.0 / obsInterval); // chunk step (30 sec) 463 const int chunkStep = int( 30.0 / obsInterval); // chunk step (30 sec) 456 464 const int numEpo = int(600.0 / obsInterval); // # epochs in one chunk (10 min) 457 465 … … 488 496 } 489 497 490 // Chunk-Specific Variables 498 // Chunk-Specific Variables 491 499 // ------------------------ 492 500 bncTime currTime; … … 534 542 } 535 543 } 536 544 537 545 if (eph) { 538 546 ColumnVector xc(4); … … 548 556 } 549 557 } 550 558 551 559 // Check Interval 552 560 // -------------- … … 612 620 double diff1 = oneObs->_MP1 - meanMP1; 613 621 double diff2 = oneObs->_MP2 - meanMP2; 614 622 615 623 // Check Slip Threshold 616 624 // -------------------- … … 619 627 break; 620 628 } 621 629 622 630 MP1 += diff1 * diff1; 623 631 MP2 += diff2 * diff2; … … 630 638 _obsStat._prnStat[prn]._numSlipsFound += 1; 631 639 } 632 } 640 } 633 641 else { 634 642 MP1 = sqrt(MP1 / (numEpo-1)); … … 679 687 } 680 688 681 // 682 //////////////////////////////////////////////////////////////////////////// 683 void t_reqcAnalyze::slotDspAvailPlot(const QString& fileName, 689 // 690 //////////////////////////////////////////////////////////////////////////// 691 void t_reqcAnalyze::slotDspAvailPlot(const QString& fileName, 684 692 const QByteArray& title) { 685 693 … … 761 769 AA = AA.Rows(1, nSatUsed); 762 770 763 SymmetricMatrix QQ; 771 SymmetricMatrix QQ; 764 772 QQ << AA.t() * AA; 765 773 QQ = QQ.i(); … … 779 787 } 780 788 781 *_log << "Marker name: " << _obsStat._markerName << endl 789 *_log << "Marker name: " << _obsStat._markerName << endl 782 790 << "Receiver: " << _obsStat._receiverType << endl 783 791 << "Antenna: " << _obsStat._antennaName << endl
Note:
See TracChangeset
for help on using the changeset viewer.