Changeset 7917 in ntrip


Ignore:
Timestamp:
May 23, 2016, 6:18:50 PM (8 years ago)
Author:
stuerze
Message:

rinex qc: satellite visibility is considered now if expected obs is computed

Location:
trunk/BNC/src/rinex
Files:
2 edited

Legend:

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

    r7911 r7917  
    217217      for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) {
    218218        const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs];
     219        if (_navFileNames.size() &&
     220            _numExpObs.find(rnxSat.prn) == _numExpObs.end()) {
     221          _numExpObs[rnxSat.prn] = 0;
     222        }
    219223        if (_signalTypes.find(rnxSat.prn.system()) == _signalTypes.end()) {
    220224          continue;
     
    230234
    231235    analyzeMultipath();
     236
     237    if (_navFileNames.size()) {
     238      setExpectedObs(_qcFile._startTime, _qcFile._endTime, _qcFile._interval, xyzSta);
     239    }
    232240
    233241    preparePlotData(obsFile);
     
    812820        << "Interval           : " << _qcFile._interval                            << endl;
    813821
    814   int numPossibleObs = int((_qcFile._endTime - _qcFile._startTime + _qcFile._interval)/_qcFile._interval);
    815 
    816822  // Number of systems
    817823  // -----------------
     
    847853  }
    848854
     855  // System specific summary
     856  // -----------------------
    849857  itSys.toFront();
    850858  while (itSys.hasNext()) {
     
    852860    const QChar&                      sys      = itSys.key();
    853861    const QVector<const t_qcSatSum*>& qcSatVec = itSys.value();
     862    int numExpectedObs = 0;
     863    for(QMap<t_prn, int>::iterator it = _numExpObs.begin();
     864        it != _numExpObs.end(); it++) {
     865      if (sys == it.key().system()) {
     866        numExpectedObs += it.value();
     867      }
     868    }
    854869    QString prefixSys = QString("  ") + sys + QString(": ");
    855870    QMap<QString, QVector<const t_qcFrqSum*> > frqMap;
     
    881896      const QVector<const t_qcFrqSum*> qcFrqVec = itFrq.value();
    882897      QString prefixFrq = QString("  ") + frqType + QString(": ");
    883 
    884898      int    numObs          = 0;
    885899      int    numSlipsFlagged = 0;
     
    907921        sumMP /= numMP;
    908922      }
    909       double ratio = double(numObs) / ((double(numPossibleObs) * double(qcSatVec.size())));
     923
     924      double ratio = (double(numObs) / double(numExpectedObs)) * 100.0;
     925
    910926      *_log << endl
    911             << prefixSys2 << prefixFrq << "Observations      : "
    912             << QString("%1 (%2) %3 \%\n").arg(numObs,           6).arg(numPossibleObs*qcSatVec.size(),           8).arg(ratio*100.0, 8, 'f', 2)
    913             << prefixSys2 << prefixFrq << "Slips (file+found): " << QString("%1 +").arg(numSlipsFlagged,  8)
     927            << prefixSys2 << prefixFrq << "Observations      : ";
     928      if(_navFileNames.isEmpty() || _navFileIncomplete.contains(sys.toLatin1())) {
     929        *_log << QString("%1\n").arg(numObs,           6);
     930      }
     931      else {
     932        *_log << QString("%1 (%2) %3 \%\n").arg(numObs,           6).arg(numExpectedObs,           8).arg(ratio, 8, 'f', 2);
     933      }
     934      *_log << prefixSys2 << prefixFrq << "Slips (file+found): " << QString("%1 +").arg(numSlipsFlagged,  8)
    914935                                                                 << QString("%1\n").arg(numSlipsFound,    8)
    915936            << prefixSys2 << prefixFrq << "Gaps              : " << QString("%1\n").arg(numGaps,          8)
     
    10601081  }
    10611082}
     1083
     1084void t_reqcAnalyze::setExpectedObs(const bncTime& startTime, const bncTime& endTime,
     1085                                   double interval, const ColumnVector& xyzSta) {
     1086
     1087  for(QMap<t_prn, int>::iterator it = _numExpObs.begin();
     1088      it != _numExpObs.end(); it++) {
     1089    t_eph* eph = 0;
     1090    for (int ie = 0; ie < _ephs.size(); ie++) {
     1091      if (_ephs[ie]->prn().system() == it.key().system() &&
     1092          _ephs[ie]->prn().number() == it.key().number()) {
     1093        eph = _ephs[ie];
     1094        break;
     1095      }
     1096    }
     1097    if (eph) {
     1098      int numExpObs = 0;
     1099      bncTime epoTime;
     1100      for (epoTime = startTime - interval; epoTime < endTime;
     1101           epoTime = epoTime + interval) {
     1102        ColumnVector xc(4);
     1103        ColumnVector vv(3);
     1104        if ( xyzSta.size() == 3 && (xyzSta[0] != 0.0 || xyzSta[1] != 0.0 || xyzSta[2] != 0.0) &&
     1105             eph->getCrd(epoTime, xc, vv, false) == success) {
     1106          double rho, eleSat, azSat;
     1107          topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat);
     1108          if ((eleSat * 180.0/M_PI) > 0.0) {
     1109            numExpObs++;
     1110          }
     1111        }
     1112      }
     1113      it.value() = numExpObs;
     1114    }
     1115    else {
     1116      if (!_navFileIncomplete.contains(it.key().system())) {
     1117        qDebug() <<  it.key().system() << it.key().number();
     1118        _navFileIncomplete.append(it.key().system());
     1119      }
     1120    }
     1121  }
     1122}
  • trunk/BNC/src/rinex/reqcanalyze.h

    r7628 r7917  
    171171  void   analyzeFile(t_rnxObsFile* obsFile);
    172172
    173   void   updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
    174 
    175   void   setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
    176                   const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
     173  void  updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
     174
     175  void  setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
     176                 const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
     177
     178  void   setExpectedObs(const bncTime& startTime, const bncTime& endTime,
     179                        double interval, const ColumnVector& xyzSta);
    177180
    178181  void   analyzeMultipath();
     
    192195  QString                       _reqcPlotSignals;
    193196  QMap<char, QVector<QString> > _signalTypes;
     197  QMap<t_prn, int>              _numExpObs;
     198  QVector<char>                 _navFileIncomplete;
    194199  QStringList                   _defaultSignalTypes;
    195200  QVector<t_eph*>               _ephs;
Note: See TracChangeset for help on using the changeset viewer.