Ignore:
Timestamp:
Apr 24, 2024, 3:46:28 PM (12 days ago)
Author:
stuerze
Message:

two more options added to the combination procedure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/combination/bnccomb.cpp

    r10449 r10451  
    176176      newAC->name         = hlp[1];
    177177      newAC->weightFactor = hlp[2].toDouble();
    178       newAC->isAPC = bool(newAC->mountPoint.mid(0,4) == "SSRA");
     178      newAC->excludeSats  = hlp[3].split(QRegExp("[ ,]"), QString::SkipEmptyParts);
     179      newAC->isAPC        = bool(newAC->mountPoint.mid(0,4) == "SSRA");
    179180      QMapIterator<char, unsigned> itSys(_cmbSysPrn);
    180181      // init
     
    182183        itSys.next();
    183184        char sys = itSys.key();
    184         if (!_masterOrbitAC.contains(sys)) {
     185        if (!_masterOrbitAC.contains(sys) &&
     186            !newAC->excludeSats.contains(QString(sys), Qt::CaseSensitive)) {
    185187          _masterOrbitAC[sys] = newAC->name;
    186188          _masterIsAPC[sys]   = newAC->isAPC;
     
    299301  // Maximal Residuum
    300302  // ----------------
    301   _MAXRES = settings.value("cmbMaxres").toDouble();
    302   if (_MAXRES <= 0.0) {
    303     _MAXRES = 999.0;
    304   }
     303  _MAX_RES = settings.value("cmbMaxres").toDouble();
     304  if (_MAX_RES <= 0.0) {
     305    _MAX_RES = 999.0;
     306  }
     307
     308  // Maximal Displacement
     309  // --------------------
     310  _MAX_DISPLACEMENT = settings.value("cmbMaxdisplacement").toDouble();
     311  if (_MAX_DISPLACEMENT <= 0.0) {
     312    _MAX_DISPLACEMENT = 2.0;
     313  }
     314
    305315  _newCorr = 0;
    306316}
     
    395405    // ----------------------
    396406    QString acName;
     407    QStringList excludeSats;
    397408    QListIterator<cmbAC*> icAC(_ACs);
    398409    while (icAC.hasNext()) {
     
    400411      if (AC->mountPoint == staID) {
    401412        acName = AC->name;
     413        excludeSats = AC->excludeSats;
    402414        break;
    403415      }
    404416    }
    405     if (acName.isEmpty()) {
     417    if (acName.isEmpty() || excludeSat(orbCorr._prn, excludeSats)) {
    406418      continue;
    407419    }
     
    431443    // ----------------------
    432444    QString acName;
     445    QStringList excludeSats;
    433446    QListIterator<cmbAC*> icAC(_ACs);
    434447    while (icAC.hasNext()) {
     
    436449      if (AC->mountPoint == staID) {
    437450        acName = AC->name;
     451        excludeSats = AC->excludeSats;
    438452        break;
    439453      }
    440454    }
    441     if (acName.isEmpty()) {
     455    if (acName.isEmpty() || excludeSat(satCodeBias._prn, excludeSats)) {
    442456      continue;
    443457    }
     
    480494    // ----------------------
    481495    QString acName;
     496    QStringList excludeSats;
    482497    bool isAPC;
    483498    QString staID(newClk._staID.c_str());
     
    487502      if (AC->mountPoint == staID) {
    488503        acName = AC->name;
     504        QStringList excludeSats;
    489505        isAPC  = AC->isAPC;
    490506        break;
    491507      }
    492508    }
    493     if (acName.isEmpty() || isAPC != _masterIsAPC[sys]) {
     509    if (acName.isEmpty() ||
     510        isAPC != _masterIsAPC[sys] ||
     511        excludeSat(newClk._prn, excludeSats)) {
    494512      continue;
    495513    }
     
    962980        << " Maximum Residuum " << maxRes << ' '
    963981        << corrs(sys)[maxResIndex-1]->_acName << ' ' << corrs(sys)[maxResIndex-1]->_prn.mid(0,3);
    964     if (maxRes > _MAXRES) {
     982    if (maxRes > _MAX_RES) {
    965983      for (int iPar = 1; iPar <= _params[sys].size(); iPar++) {
    966984        cmbParam* pp = _params[sys][iPar-1];
     
    13681386        << corrs(sys)[maxResIndex-1]->_acName << ' ' << corrs(sys)[maxResIndex-1]->_prn.mid(0,3);
    13691387
    1370     if (maxRes > _MAXRES) {
     1388    if (maxRes > _MAX_RES) {
    13711389      out << "  Outlier" << "\n";
    13721390      delete corrs(sys)[maxResIndex-1];
     
    13981416t_irc bncComb::checkOrbits(bncTime epoTime, char sys, QTextStream& out) {
    13991417
    1400   const double MAX_DISPLACEMENT = 2.0;
    1401 
    14021418  // Switch to last ephemeris (if possible)
    14031419  // --------------------------------------
     
    15001516      else if (corr == maxDiff[prn]) {
    15011517        double norm = corr->_diffRao.NormFrobenius();
    1502         if (norm > MAX_DISPLACEMENT) {
     1518        if (norm > _MAX_DISPLACEMENT) {
    15031519          out << epoTime.datestr().c_str()    << " "
    15041520              << epoTime.timestr().c_str()    << " "
     
    15771593  }
    15781594}
     1595
     1596//
     1597////////////////////////////////////////////////////////////////////////////
     1598bool bncComb::excludeSat(const t_prn& prn, const QStringList excludeSats) const {
     1599  QStringListIterator it(excludeSats);
     1600  while (it.hasNext()) {
     1601    string prnStr = it.next().toLatin1().data();
     1602    if (prnStr == prn.toString() || prnStr == prn.toString().substr(0,1)) {
     1603      return true;
     1604    }
     1605  }
     1606  return false;
     1607}
Note: See TracChangeset for help on using the changeset viewer.