Changeset 3453 in ntrip for trunk/BNC


Ignore:
Timestamp:
Sep 23, 2011, 9:12:39 AM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/combination
Files:
2 edited

Legend:

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

    r3452 r3453  
    122122      newAC->name       = hlp[1];
    123123      newAC->weight     = hlp[2].toDouble();
     124      if (_masterOrbitAC.isEmpty()) {
     125        _masterOrbitAC = newAC->name;
     126      }
    124127      _ACs.append(newAC);
    125128    }
     
    361364  // Observation Statistics
    362365  // ----------------------
     366  bool    masterPresent = false;
     367
    363368  QListIterator<cmbAC*> icAC(_ACs);
    364369  while (icAC.hasNext()) {
     
    370375      if (corr->acName == AC->name) {
    371376        AC->numObs += 1;
     377        if (AC->name == _masterOrbitAC) {
     378          masterPresent = true;
     379        }
    372380      }
    373381    }
    374382    out << AC->name.toAscii().data() << ": " << AC->numObs << endl;
     383  }
     384
     385  // If Master not present, switch to another one
     386  // --------------------------------------------
     387  if (!masterPresent) {
     388    QListIterator<cmbAC*> icAC(_ACs);
     389    while (icAC.hasNext()) {
     390      cmbAC* AC = icAC.next();
     391      if (AC->numObs > 0) {
     392        out << "Switching Master AC "
     393            << _masterOrbitAC.toAscii().data() << " --> "
     394            << AC->name.toAscii().data()   << " "
     395            << _resTime.datestr().c_str()    << " "
     396            << _resTime.timestr().c_str()    << endl;
     397        _masterOrbitAC = AC->name;
     398      }
     399    }
    375400  }
    376401
     
    425450    ++iObs;
    426451
    427     if (numObs[prn] >= 3 && resCorr.find(prn) == resCorr.end()) {
     452    if (corr->acName == _masterOrbitAC && resCorr.find(prn) == resCorr.end()) {
    428453      resCorr[prn] = new t_corr(*corr);
    429454    }
  • trunk/BNC/combination/bnccomb.h

    r3450 r3453  
    8888  bncAntex*               _antex;
    8989  double                  _MAXRES;
     90  QString                 _masterOrbitAC;
    9091};
    9192
Note: See TracChangeset for help on using the changeset viewer.