- Timestamp:
- Sep 9, 2012, 10:48:39 AM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/dopplot.cpp
r4673 r4675 70 70 setAxisLabelRotation(QwtPlot::xBottom, -10.0); 71 71 setAxisLabelAlignment(QwtPlot::xBottom, Qt::AlignLeft | Qt::AlignBottom); 72 setAxisScale(QwtPlot::yLeft, 0.0, 90.0);73 72 74 73 // Legend … … 79 78 // Curves 80 79 // ------ 80 if (obsStat) { 81 addCurve("# Sat", obsStat->_mjdX24, obsStat->_numSat); 82 } 81 83 82 84 // Important !!! … … 88 90 ////////////////////////////////////////////////////////////////////////////// 89 91 QwtPlotCurve* t_dopPlot::addCurve(const QString& name, 90 const QwtSymbol& symbol,91 const QVector<double>& xData,92 const QVector<double>& yData) { 92 const QVector<double>& xData, 93 const QVector<double>& yData) { 94 93 95 QwtPlotCurve* curve = new QwtPlotCurve(name); 94 curve->setSymbol(new QwtSymbol(symbol));95 curve->setStyle(QwtPlotCurve::NoCurve);96 96 curve->setXAxis(QwtPlot::xBottom); 97 97 curve->setYAxis(QwtPlot::yLeft); … … 99 99 curve->attach(this); 100 100 101 if (xData.size() > 0 && yData.size() > 0) {102 QwtPlotMarker* marker = new QwtPlotMarker();103 int ii = xData.size() / 2;104 marker->setValue(xData[ii], yData[ii]);105 QwtText text(name);106 text.setColor(symbol.pen().color());107 marker->setLabel(text);108 marker->setLabelAlignment(Qt::AlignTop);109 marker->attach(this);110 }111 112 101 return curve; 113 102 } -
trunk/BNC/src/rinex/dopplot.h
r4673 r4675 16 16 17 17 private: 18 QwtPlotCurve* addCurve(const QString& name, const QwtSymbol& symbol,18 QwtPlotCurve* addCurve(const QString& name, 19 19 const QVector<double>& xData, 20 20 const QVector<double>& yData); -
trunk/BNC/src/rinex/reqcanalyze.cpp
r4674 r4675 221 221 // -------------------- 222 222 try { 223 unsigned iEpo = 0; 223 224 while ( (_currEpo = obsFile->nextEpoch()) != 0) { 224 225 … … 238 239 239 240 _allObsMap[prn].addObs(obs); 241 242 prepareObsStat(iEpo, obsFile->interval()); 240 243 } 241 244 … … 260 263 261 264 QMutableMapIterator<QString, t_allObs> it(_allObsMap); 262 bool firstPrn = true;263 265 while (it.hasNext()) { 264 266 it.next(); 265 267 QString prn = it.key(); 266 268 preparePlotData(prn, xyz, obsFile->interval(), 267 dataMP1, dataMP2, dataSNR1, dataSNR2, firstPrn); 268 firstPrn = false; 269 dataMP1, dataMP2, dataSNR1, dataSNR2); 269 270 } 270 271 … … 379 380 // 380 381 //////////////////////////////////////////////////////////////////////////// 382 void t_reqcAnalyze::prepareObsStat(unsigned iEpo, double obsInterval) { 383 const int numEpo = int(600.0 / obsInterval); // # epochs in one chunk (10 min) 384 if (iEpo % numEpo == 0) { 385 _obsStat._mjdX24 << _currEpo->tt.mjddec() * 24.0; 386 _obsStat._numSat << _currEpo->rnxSat.size(); 387 } 388 } 389 390 // 391 //////////////////////////////////////////////////////////////////////////// 381 392 void t_reqcAnalyze::preparePlotData(const QString& prn, const ColumnVector& xyz, 382 393 double obsInterval, … … 384 395 QVector<t_polarPoint*>* dataMP2, 385 396 QVector<t_polarPoint*>* dataSNR1, 386 QVector<t_polarPoint*>* dataSNR2, 387 bool firstPrn) { 397 QVector<t_polarPoint*>* dataSNR2) { 388 398 389 399 const int chunkStep = int( 30.0 / obsInterval); // chunk step (30 sec) … … 391 401 392 402 t_allObs& allObs = _allObsMap[prn]; 393 394 if (firstPrn) {395 _obsStat.reset();396 }397 403 398 404 // Loop over all Chunks of Data … … 401 407 chunkStart += chunkStep) { 402 408 403 // Chunk-Spe icific Variables404 // ------------------------ -409 // Chunk-Specific Variables 410 // ------------------------ 405 411 bncTime currTime; 406 412 bncTime prevTime; 407 413 bncTime chunkStartTime; 414 double mjdX24 = 0.0; 408 415 bool availL1 = false; 409 416 bool availL2 = false; … … 433 440 if (ii == 0) { 434 441 chunkStartTime = currTime; 442 mjdX24 = chunkStartTime.mjddec() * 24.0; 435 443 436 444 if (xyz.size()) { … … 457 465 } 458 466 } 459 467 460 468 // Check Interval 461 469 // -------------- … … 518 526 // Availability Plot Data 519 527 // ---------------------- 520 double mjdX24 = chunkStartTime.mjddec() * 24.0;521 528 if (availL1) { 522 529 if (slipL1) { -
trunk/BNC/src/rinex/reqcanalyze.h
r4674 r4675 138 138 QVector<t_polarPoint*>* dataMP2, 139 139 QVector<t_polarPoint*>* dataSNR1, 140 QVector<t_polarPoint*>* dataSNR2, bool firstPrn); 140 QVector<t_polarPoint*>* dataSNR2); 141 void prepareObsStat(unsigned iEpo, double obsInterval); 141 142 142 143 QString _logFileName;
Note:
See TracChangeset
for help on using the changeset viewer.