Changeset 6539 in ntrip


Ignore:
Timestamp:
Jan 9, 2015, 6:43:09 PM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/rinex
Files:
3 edited

Legend:

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

    r6537 r6539  
    6363 public:
    6464  t_scaleDrawPrn() {}
    65   virtual QwtText label(int iPrn) const {
     65  virtual QwtText label(double iPrn) const {
    6666    return _yLabels[iPrn];
    6767  }
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r6535 r6539  
    6363  bncSettings settings;
    6464
    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);
    7174
    7275  connect(this, SIGNAL(dspSkyPlot(const QString&, const QString&, QVector<t_polarPoint*>*,
     
    134137  emit finished();
    135138  deleteLater();
     139}
     140
     141//
     142////////////////////////////////////////////////////////////////////////////
     143void 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  }
    136157}
    137158
     
    170191      for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) {
    171192        const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs];
     193        if (_signalTypes.find(rnxSat.prn.system()) == _signalTypes.end()) {
     194          continue;
     195        }
    172196        t_satObs satObs;
    173197        t_rnxObsFile::setObsFromRnx(obsFile, _currEpo, rnxSat, satObs);
     
    216240    const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iSat];
    217241    const t_prn& prn = rnxSat.prn;
     242
     243    if (_signalTypes.find(prn.system()) == _signalTypes.end()) {
     244      continue;
     245    }
    218246
    219247    t_eph* eph = 0;
     
    532560  QString sn2Title = "Signal-to-Noise Ratio\n";
    533561
    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] + " ";
    557568  }
    558569
     
    579590
    580591          for (int ii = 0; ii < 2; ii++) {
    581             const QMap<char, QString>& signalTypes = (ii == 0 ? signalTypes1 : signalTypes2);
    582592            if (frqType[ii].isEmpty()) {
    583               QMapIterator<char, QString> it(signalTypes);
     593              QMapIterator<char, QVector<QString> > it(_signalTypes);
    584594              while (it.hasNext()) {
    585595                it.next();
    586596                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)) {
    588598                    frqType[ii] = qcFrq._rnxType2ch;
    589599                    break;
     
    715725      const t_prn&   prn   = it.key();
    716726      const t_qcSat& qcSat = it.value();
     727
    717728      t_plotData&    data  = plotDataMap[prn];
    718729
     
    722733      }
    723734
    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
    732738      QString frqType1;
    733739      QString frqType2;
  • trunk/BNC/src/rinex/reqcanalyze.h

    r6529 r6539  
    164164  void   checkEphemerides();
    165165
     166  void   analyzePlotSignals(QMap<char, QVector<QString> >& signalTypes);
     167
    166168  void   analyzeFile(t_rnxObsFile* obsFile);
    167169
     
    179181  void   printReport(const t_rnxObsFile* obsFile);
    180182
    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;
    190194};
    191195
Note: See TracChangeset for help on using the changeset viewer.