Changeset 6322 in ntrip for trunk/BNC/src/rinex/reqcanalyze.cpp


Ignore:
Timestamp:
Nov 12, 2014, 5:20:13 PM (9 years ago)
Author:
stuerze
Message:

systems J,S,C added, parameter type of plot function changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r6318 r6322  
    6969  _navFileNames = settings.value("reqcNavFile").toString().split(",", QString::SkipEmptyParts);
    7070
    71   connect(this, SIGNAL(dspSkyPlot(const QString&, const QByteArray&, QVector<t_polarPoint*>*,
    72                                   const QByteArray&, QVector<t_polarPoint*>*,
     71  connect(this, SIGNAL(dspSkyPlot(const QString&, const QString&, QVector<t_polarPoint*>*,
     72                                  const QString&, QVector<t_polarPoint*>*,
    7373                                  const QByteArray&, double)),
    74           this, SLOT(slotDspSkyPlot(const QString&, const QByteArray&, QVector<t_polarPoint*>*,
    75                                     const QByteArray&, QVector<t_polarPoint*>*,
     74          this, SLOT(slotDspSkyPlot(const QString&, const QString&, QVector<t_polarPoint*>*,
     75                                    const QString&, QVector<t_polarPoint*>*,
    7676                                    const QByteArray&, double)));
    7777
     
    297297  // ---------------------------
    298298  for (unsigned ii = 0; ii < satObs._obs.size(); ii++) {
    299 
    300299    const t_frqObs* frqObs = satObs._obs[ii];
    301300
     
    308307    qcFrq._phaseValid = frqObs->_phaseValid;
    309308    qcFrq._codeValid  = frqObs->_codeValid;
    310 
    311309    // Check Gaps
    312310    // ----------
     
    355353        }
    356354      }
    357 
     355      else if (satObs._prn.system() == 'J') {
     356        if      (frqObs->_rnxType2ch[0] == '1') {
     357          fA = t_frequency::J1;
     358          fB = t_frequency::J2;
     359        }
     360        else if (frqObs->_rnxType2ch[0] == '2') {
     361          fA = t_frequency::J2;
     362          fB = t_frequency::J1;
     363        }
     364      }
     365      else if (satObs._prn.system() == 'S') {
     366        if      (frqObs->_rnxType2ch[0] == '1') {
     367          fA = t_frequency::S1;
     368          fB = t_frequency::S5;
     369        }
     370        else if (frqObs->_rnxType2ch[0] == '5') {
     371          fA = t_frequency::S5;
     372          fB = t_frequency::S1;
     373        }
     374      }
     375      else if (satObs._prn.system() == 'C') {
     376        if      (frqObs->_rnxType2ch[0] == '1') {
     377          fA = t_frequency::C1;
     378          fB = t_frequency::C7;
     379        }
     380        else if (frqObs->_rnxType2ch[0] == '7') {
     381          fA = t_frequency::C7;
     382          fB = t_frequency::C1;
     383        }
     384      }
    358385      if (fA != t_frequency::dummy && fB != t_frequency::dummy) {
    359386        double f_a = t_CST::freq(fA, qcSat._slotNum);
     
    409436      const QString& frqType  = itFrq.key();
    410437      t_qcFrqSum&    qcFrqSum = itFrq.value();
    411 
    412438
    413439      // Loop over all Chunks of Data
     
    494520  bncSettings settings;
    495521  QString reqSkyPlotSystems = settings.value("reqcSkyPlotSystems").toString();
    496   bool plotGPS = false;
    497   bool plotGlo = false;
    498   bool plotGal = false;
     522  bool plotGPS  = false;
     523  bool plotGlo  = false;
     524  bool plotGal  = false;
     525  bool plotQZSS = false;
     526  bool plotSBAS = false;
     527  bool plotBDS  = false;
     528  QString mp1Title = reqSkyPlotSystems + ": MP";
     529  QString mp2Title = reqSkyPlotSystems + ": MP";
     530  QString snr1Title = reqSkyPlotSystems + ": SNR";
     531  QString snr2Title = reqSkyPlotSystems + ": SNR";
     532  char freq1 = '1';
     533  char freq2 = '2';
    499534  if      (reqSkyPlotSystems == "GPS") {
    500535    plotGPS = true;
     
    505540  else if (reqSkyPlotSystems == "Galileo") {
    506541    plotGal = true;
     542    freq2 = '5';
     543  }
     544  else if (reqSkyPlotSystems == "QZSS") {
     545    plotQZSS = true;
     546  }
     547  else if (reqSkyPlotSystems == "SBAS") {
     548    plotSBAS = true;
     549    freq2 = '5';
     550  }
     551  else if (reqSkyPlotSystems == "BDS") {
     552    plotBDS = true;
     553    freq2 = '7';
    507554  }
    508555  else if (reqSkyPlotSystems == "ALL") {
     
    510557    plotGlo = true;
    511558    plotGal = true;
     559    plotQZSS = true;
     560    plotSBAS = true;
     561    plotBDS = true;
    512562  }
    513563  else {
    514564          return;
    515565  }
     566  mp1Title += freq1;
     567  mp2Title += freq2;
     568  snr1Title += freq1;
     569  snr2Title += freq2;
    516570
    517571  QVector<t_polarPoint*>* dataMP1  = new QVector<t_polarPoint*>;
     
    531585      if ( (prn.system() == 'G' && plotGPS) ||
    532586           (prn.system() == 'R' && plotGlo) ||
    533            (prn.system() == 'E' && plotGal) ) {
     587           (prn.system() == 'E' && plotGal) ||
     588           (prn.system() == 'J' && plotQZSS) ||
     589           (prn.system() == 'S' && plotSBAS) ||
     590           (prn.system() == 'C' && plotBDS) ) {
    534591
    535592        if (qcSat._eleSet) {
     
    538595          for (int iFrq = 0; iFrq < qcSat._qcFrq.size(); iFrq++) {
    539596            const t_qcFrq& qcFrq = qcSat._qcFrq[iFrq];
    540             if (qcFrq._rnxType2ch[0] == '1' && frqType1.isEmpty()) {
     597            if (qcFrq._rnxType2ch[0] == freq1 && frqType1.isEmpty()) {
    541598              frqType1 = qcFrq._rnxType2ch;
    542599            }
    543             if (qcFrq._rnxType2ch[0] == '2' && frqType2.isEmpty()) {
     600            if (qcFrq._rnxType2ch[0] == freq2 && frqType2.isEmpty()) {
    544601              frqType2 = qcFrq._rnxType2ch;
    545602            }
     
    563620    QFileInfo  fileInfo(obsFile->fileName());
    564621    QByteArray title = fileInfo.fileName().toAscii();
    565     emit dspSkyPlot(obsFile->fileName(), "MP1",  dataMP1,  "MP2",  dataMP2,  "Meters",  2.0);
    566     emit dspSkyPlot(obsFile->fileName(), "SNR1", dataSNR1, "SNR2", dataSNR2, "dbHz",   54.0);
     622    emit dspSkyPlot(obsFile->fileName(), mp1Title,  dataMP1,  mp2Title,  dataMP2,  "Meters",  2.0);
     623    double mean = 0.0;
     624    for (int ii = 0; ii < dataSNR1->size(); ii++) {
     625      const t_polarPoint* point = dataSNR1->at(ii);
     626      mean += point->_value;
     627    }
     628    mean /= dataSNR1->size();
     629    double max = (mean > 9.0) ? 54.0 : 9.0;
     630    QByteArray str = (mean > 9.0) ? "dbHz" : "";
     631    emit dspSkyPlot(obsFile->fileName(), snr1Title, dataSNR1, snr2Title, dataSNR2, str,  max);
    567632    emit dspAvailPlot(obsFile->fileName(), title);
    568633  }
     
    589654//
    590655////////////////////////////////////////////////////////////////////////////
    591 void t_reqcAnalyze::slotDspSkyPlot(const QString& fileName, const QByteArray& title1,
    592                                    QVector<t_polarPoint*>* data1, const QByteArray& title2,
     656void t_reqcAnalyze::slotDspSkyPlot(const QString& fileName, const QString& title1,
     657                                   QVector<t_polarPoint*>* data1, const QString& title2,
    593658                                   QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle,
    594659                                   double maxValue) {
Note: See TracChangeset for help on using the changeset viewer.