Changeset 10945 in ntrip for trunk/BNC/src/rinex


Ignore:
Timestamp:
Jun 24, 2026, 12:43:35 PM (4 months ago)
Author:
stuerze
Message:

Added a Minimum Elevation parameter to BNC's RINEX Editing & QC feature

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

Legend:

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

    r10630 r10945  
    6868  _obsFileNames    = settings.value("reqcObsFile").toString().split(",", Qt::SkipEmptyParts);
    6969  _navFileNames    = settings.value("reqcNavFile").toString().split(",", Qt::SkipEmptyParts);
     70  _minEle          = settings.value("reqcMinEle").toDouble();
    7071  _reqcPlotSignals = settings.value("reqcSkyPlotSignals").toString();
    7172  _defaultSignalTypes << "G:1&2&5" << "R:1&2&3" << "J:1&2" << "E:1&5" << "S:1&5" << "C:2&6" << "I:5&9";
    … …  
    209210        t_qcSat& qcSat = qcEpo._qcSat[satObs._prn];
    210211        setQcObs(qcEpo._epoTime, xyzSta, satObs, lastObsTime, qcSat);
     212        if (qcSat._eleSet && qcSat._eleDeg < _minEle) {
     213          qcEpo._qcSat.remove(satObs._prn);
     214          continue;
     215        }
    211216        updateQcSat(qcSat, _qcFile._qcSatSum[satObs._prn]);
    212217      }
    … …  
    986991          double rho, eleSat, azSat;
    987992          topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat);
    988           if (round(eleSat * 180.0/M_PI) >= 0.0) {
     993          if (round(eleSat * 180.0/M_PI) >= _minEle) {
    989994            numExpObs++;
    990995          }
  • trunk/BNC/src/rinex/reqcanalyze.h

    r10937 r10945  
    212212  QVector<t_rnxObsFile*>     _rnxObsFiles;
    213213  QStringList                _navFileNames;
     214  double                     _minEle;
    214215  QString                    _reqcPlotSignals;
    215216  QMap<char, QVector<char> > _signalTypes;
  • trunk/BNC/src/rinex/reqcedit.cpp

    r10630 r10945  
    7373  }
    7474  _samplingRate   = settings.value("reqcSampling").toString().split("sec").first().toDouble();
     75  _minEle         = settings.value("reqcMinEle").toDouble();
    7576  _begTime        = bncTime(settings.value("reqcStartDateTime").toString().toLatin1().data());
    7677  _endTime        = bncTime(settings.value("reqcEndDateTime").toString().toLatin1().data());
    … …  
    223224  t_reqcEdit::initRnxObsFiles(_obsFileNames, _rnxObsFiles, _logStream);
    224225
     226  // Read Ephemerides (needed to apply the elevation mask)
     227  // ------------------------------------------------------
     228  if (_minEle > 0.0 && _ephs.isEmpty()) {
     229    t_reqcEdit::readEphemerides(_navFileNames, _ephs, _logStream, _checkEph);
     230  }
     231
    225232  // Initialize output observation file
    226233  // ----------------------------------
    … …  
    361368        if (sec % (int(_samplingRate)*10) == 0) {
    362369          applyLLI(obsFile, epo);
     370          if (_minEle > 0.0) {
     371            applyElevationMask(obsFile, epo);
     372          }
    363373          outObsFile.writeEpoch(epo);
    364374        }
    … …  
    518528
    519529  _lli.clear();
     530}
     531
     532// Remove satellites below the minimum elevation angle
     533////////////////////////////////////////////////////////////////////////////
     534void t_reqcEdit::applyElevationMask(const t_rnxObsFile* obsFile,
     535                                    t_rnxObsFile::t_rnxEpo* epo) {
     536
     537  const ColumnVector& xyzSta = obsFile->xyz();
     538  if (xyzSta.size() != 3 || (xyzSta(1) == 0.0 && xyzSta(2) == 0.0 && xyzSta(3) == 0.0)) {
     539    return;
     540  }
     541
     542  std::vector<t_rnxObsFile::t_rnxSat> keptSats;
     543  for (unsigned iSat = 0; iSat < epo->rnxSat.size(); iSat++) {
     544    const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iSat];
     545
     546    t_eph* eph = 0;
     547    for (int ie = 0; ie < _ephs.size(); ie++) {
     548      if (_ephs[ie]->prn() == rnxSat.prn) {
     549        eph = _ephs[ie];
     550        break;
     551      }
     552    }
     553    if (eph) {
     554      ColumnVector xc(6);
     555      ColumnVector vv(3);
     556      if (eph->getCrd(epo->tt, xc, vv, false) == success) {
     557        double rho, eleSat, azSat;
     558        topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat);
     559        if (eleSat * 180.0/M_PI < _minEle) {
     560          continue;
     561        }
     562      }
     563    }
     564    keptSats.push_back(rnxSat);
     565  }
     566  epo->rnxSat = keptSats;
    520567}
    521568
  • trunk/BNC/src/rinex/reqcedit.h

    r10630 r10945  
    6363  void rememberLLI(const t_rnxObsFile* obsFile, const t_rnxObsFile::t_rnxEpo* epo);
    6464  void applyLLI(const t_rnxObsFile* obsFile, t_rnxObsFile::t_rnxEpo* epo);
     65  void applyElevationMask(const t_rnxObsFile* obsFile, t_rnxObsFile::t_rnxEpo* epo);
    6566  void addRnxConversionDetails(const t_rnxObsFile* obsFile, QMap<QString, QString>& txtMap);
    6667
    … …  
    7677  double                 _rnxVersion;
    7778  double                 _samplingRate;
     79  double                 _minEle;
    7880  bncTime                _begTime;
    7981  bncTime                _endTime;
Note: See TracChangeset for help on using the changeset viewer.