Ignore:
Timestamp:
Sep 30, 2026, 11:30:26 AM (6 days ago)
Author:
stuerze
Message:

bug fixes resulting from overall tests

File:
1 edited

Legend:

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

    r11023 r11057  
    131131  // ----------------
    132132  t_reqcEdit::readEphemerides(_navFileNames, _ephs, _logStream, _checkEph);
     133  t_reqcEdit::indexEphemerides(_ephs, _ephsByPrn);
    133134
    134135  // Loop over all RINEX Files
    … …  
    207208          continue;
    208209        }
     210        // observations of unhealthy satellites are excluded, as those
     211        // below the elevation mask (see also setExpectedObs)
     212        if (_navFileNames.size() && unhealthyAt(rnxSat.prn, _currEpo->tt)) {
     213          continue;
     214        }
    209215        t_satObs satObs;
    210216        t_rnxObsFile::setObsFromRnx(obsFile, _currEpo, rnxSat, satObs);
    … …  
    266272    }
    267273
    268     t_eph* eph = 0;
    269     for (int ie = 0; ie < _ephs.size(); ie++) {
    270       if (_ephs[ie]->prn() == prn) {
    271         eph = _ephs[ie];
    272         break;
    273       }
    274     }
     274    if (unhealthyAt(prn, _currEpo->tt)) {
     275      continue;
     276    }
     277    t_eph* eph = ephForTime(prn, _currEpo->tt);
    275278    if (eph) {
    276279      ColumnVector xSat(6);
    … …  
    328331                             t_qcSat& qcSat) {
    329332
    330   t_eph* eph = 0;
    331   for (int ie = 0; ie < _ephs.size(); ie++) {
    332     if (_ephs[ie]->prn() == satObs._prn) {
    333       eph = _ephs[ie];
    334       break;
    335     }
    336   }
     333  t_eph* eph = ephForTime(satObs._prn, epoTime);
    337334  if (eph) {
    338335    ColumnVector xc(6);
    … …  
    976973                                   double interval, const ColumnVector& xyzSta) {
    977974  for(QMap<t_prn, int>::iterator it = _numExpObs.begin(); it != _numExpObs.end(); it++) {
    978     t_eph* eph = 0;
     975    bool navAvail = false;
    979976    for (int ie = 0; ie < _ephs.size(); ie++) {
    980977      if (_ephs[ie]->prn() == it.key()) {
    981         eph = _ephs[ie];
     978        navAvail = true;
    982979        break;
    983980      }
    984981    }
    985     if (eph) {
     982    if (navAvail) {
    986983      int numExpObs = 0;
    987984      bncTime epoTime;
    988985      for (epoTime = startTime - interval; epoTime < endTime; epoTime = epoTime + interval) {
     986        // an observation is only expected if a valid ephemeris exists,
     987        // the satellite is healthy (unhealthy satellite-epochs are also
     988        // excluded from the observations, see analyzeFile) and above
     989        // the elevation mask
     990        if (unhealthyAt(it.key(), epoTime)) {
     991          continue;
     992        }
     993        t_eph* eph = ephForTime(it.key(), epoTime, true);
     994        if (!eph) {
     995          continue;
     996        }
    989997        ColumnVector xc(6);
    990998        ColumnVector vv(3);
    … …  
    10071015  }
    10081016}
     1017
     1018// A satellite is considered unhealthy at epoch tt if the valid navigation
     1019// data set closest to tt is flagged unhealthy. Its orbit is not used then
     1020// (the geometry may be erroneous) and its observations are excluded.
     1021////////////////////////////////////////////////////////////////////////////
     1022bool t_reqcAnalyze::unhealthyAt(const t_prn& prn, const bncTime& tt) const {
     1023  t_eph* eph = ephForTime(prn, tt, true, true);
     1024  return eph && eph->checkState() == t_eph::unhealthy;
     1025}
     1026
     1027// Ephemeris of the given satellite for epoch tt, see t_reqcEdit::ephForTime
     1028////////////////////////////////////////////////////////////////////////////
     1029t_eph* t_reqcAnalyze::ephForTime(const t_prn& prn, const bncTime& tt,
     1030                                 bool validOnly, bool allowUnhealthy) const {
     1031  return t_reqcEdit::ephForTime(_ephsByPrn.value(prn), prn, tt, validOnly, allowUnhealthy);
     1032}
Note: See TracChangeset for help on using the changeset viewer.