Changeset 10599 in ntrip for trunk/BNC/src/combination


Ignore:
Timestamp:
Jan 31, 2025, 10:30:08 AM (7 weeks ago)
Author:
stuerze
Message:

ADDED: consideration of NAV type in all applications

File:
1 edited

Legend:

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

    r10548 r10599  
    238238      int nextPar = 0;
    239239      char sys = itSys.key();
    240       unsigned maxPrn = itSys.value();
    241       unsigned flag = 0;
    242       if (sys == 'E') {
    243         flag = 1;
    244       }
     240      int maxPrn = itSys.value();
    245241      // AC
    246242      QListIterator<cmbAC*> itAc(_ACs);
     
    248244        cmbAC* AC = itAc.next();
    249245        _params[sys].push_back(new cmbParam(cmbParam::offACgnss, ++nextPar, AC->name, ""));
    250         for (unsigned iGnss = 1; iGnss <= maxPrn; iGnss++) {
     246        for (int iGnss = 1; iGnss <= maxPrn; iGnss++) {
     247          int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
    251248          QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
    252249          _params[sys].push_back(new cmbParam(cmbParam::offACSat, ++nextPar, AC->name, prn));
    253250        }
    254251      }
    255       for (unsigned iGnss = 1; iGnss <= maxPrn; iGnss++) {
     252      for (int iGnss = 1; iGnss <= maxPrn; iGnss++) {
     253        int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
    256254        QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
    257255        _params[sys].push_back(new cmbParam(cmbParam::clkSat, ++nextPar, "", prn));
     
    680678    const t_clkCorr& clkCorr = clkCorrVec[ii];
    681679    QString    staID(clkCorr._staID.c_str());
    682     QString    prn(clkCorr._prn.toInternalString().c_str());
     680    QString    prnStr(clkCorr._prn.toInternalString().c_str());
    683681    char       sys = clkCorr._prn.system();
    684682
     
    700698    // ---------------------
    701699    _newCorr                = new cmbCorr();
    702     _newCorr->_prn          = prn;
     700    _newCorr->_prn          = prnStr;
    703701    _newCorr->_time         = clkCorr._time;
    704702    _newCorr->_iod          = clkCorr._iod;
     
    727725    // Check the Ephemeris
    728726    //--------------------
    729     t_eph* ephLast = _ephUser.ephLast(prn);
    730     t_eph* ephPrev = _ephUser.ephPrev(prn);
     727    t_eph* ephLast = _ephUser.ephLast(prnStr);
     728    t_eph* ephPrev = _ephUser.ephPrev(prnStr);
    731729    if (ephLast == 0) {
    732730#ifdef BNC_DEBUG_CMB
    733       emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1(), true);
     731      emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1(), true);
    734732#endif
    735733      delete _newCorr; _newCorr = 0;
     
    741739             ephLast->checkState() == t_eph::unhealthy) {
    742740#ifdef BNC_DEBUG_CMB
    743       emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prn.mid(0,3).toLatin1(), true);
     741      emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prnStr.mid(0,3).toLatin1(), true);
    744742#endif
    745743      delete _newCorr; _newCorr = 0;
     
    759757      else {
    760758#ifdef BNC_DEBUG_CMB
    761         emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1() +
     759        emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1() +
    762760                        QString(" with IOD %1").arg(_newCorr->_iod).toLatin1(), true);
    763761#endif
     
    806804    bool available = false;
    807805    while (itCorr.hasNext()) {
    808       cmbCorr* corr = itCorr.next();
    809       QString  prn  = corr->_prn;
     806      cmbCorr* corr   = itCorr.next();
     807      QString  prnStr = corr->_prn;
    810808      QString  acName = corr->_acName;
    811809      if (_newCorr->_acName == acName &&
    812           _newCorr->_prn == prn) {
     810          _newCorr->_prn == prnStr) {
    813811        available = true;
    814812      }
     
    12631261      }
    12641262    }
    1265     unsigned flag = 0;
    1266     if (sys == 'E') {
    1267       flag = 1;
    1268     }
    12691263//    if (sys == 'R') {
    12701264//      return success;
     
    12731267    // GNSS
    12741268    for (unsigned iGnss = 1; iGnss <= _cmbSysPrn[sys]; iGnss++) {
     1269      int flag = t_corrSSR::getSsrNavTypeFlag(sys, iGnss);
    12751270      QString prn = QString("%1%2_%3").arg(sys).arg(iGnss, 2, 10, QChar('0')).arg(flag);
    12761271      ++iCond;
     
    13111306    QMutableVectorIterator<cmbCorr*> it(corrs(sys));
    13121307    while (it.hasNext()) {
    1313       cmbCorr* corr = it.next();
    1314       QString  prn  = corr->_prn;
     1308      cmbCorr* corr    = it.next();
     1309      QString  prnStr  = corr->_prn;
    13151310      bool foundMaster = false;
    13161311      QVectorIterator<cmbCorr*> itHlp(corrs(sys));
     
    13191314        QString  prnHlp  = corrHlp->_prn;
    13201315        QString  ACHlp   = corrHlp->_acName;
    1321         if (ACHlp == _masterOrbitAC[sys] && prn == prnHlp) {
     1316        if (ACHlp == _masterOrbitAC[sys] && prnStr == prnHlp) {
    13221317          foundMaster = true;
    13231318          break;
     
    16381633  while (it.hasNext()) {
    16391634    string prnStr = it.next().toLatin1().data();
    1640     if (prnStr == prn.toString() || prnStr == prn.toString().substr(0,1)) {
     1635    if (prnStr == prn.toString() ||              // prn
     1636        prnStr == prn.toString().substr(0,1)) {  // sys
    16411637      return true;
    16421638    }
Note: See TracChangeset for help on using the changeset viewer.