Changeset 5840 in ntrip for trunk/BNC/src/PPP/pppThread.cpp


Ignore:
Timestamp:
Aug 6, 2014, 4:39:18 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppThread.cpp

    r5838 r5840  
    104104    connect(BNC_CORE, SIGNAL(newCorrections(QStringList)),
    105105            this, SLOT(slotNewCorrections(QStringList)));
     106
     107    for (unsigned iPrn = 0; iPrn <= t_prn::MAXPRN; iPrn++) {
     108      _lastOrbCorrIOD[iPrn]   = -1;
     109      _lastClkCorrValue[iPrn] = 0.0;
     110    }
    106111
    107112    _pppClient = new t_pppClient(_opt);
     
    279284               messageType == COTYPE_GPSORBIT    || messageType == COTYPE_GLONASSORBIT    ) {
    280285        t_orbCorr* cc = new t_orbCorr();
    281         orbCorr.push_back(cc);
    282286        cc->_prn.set(corr.prn.toAscii().data());
    283287        cc->_iod       = corr.iod;
     
    290294        cc->_dotXr[0]  = corr.dotRao[1];
    291295        cc->_dotXr[0]  = corr.dotRao[2];
     296        cout << "ORB: " << cc->_prn.toString() << ' ' << cc->_iod << endl;
     297        orbCorr.push_back(cc);
     298
     299        _lastOrbCorrIOD[cc->_prn.toInt()] = cc->_iod;
    292300      }
    293301      else if (messageType == COTYPE_GPSCOMBINED || messageType == COTYPE_GLONASSCOMBINED ||
    294302               messageType == COTYPE_GPSCLOCK    || messageType == COTYPE_GLONASSCLOCK    ) {
    295303        t_clkCorr* cc = new t_clkCorr();
    296         clkCorr.push_back(cc);       
    297304        cc->_prn.set(corr.prn.toAscii().data());
    298305        cc->_iod         = corr.iod;
     
    302309        cc->_dotDotDClk  = corr.dotDotDClk;
    303310        cc->_clkPartial  = 0.0;
     311        if (messageType == COTYPE_GPSCLOCK || messageType == COTYPE_GLONASSCLOCK) {
     312          int lastIOD = _lastOrbCorrIOD[cc->_prn.toInt()];
     313          if (lastIOD != -1) {
     314            cc->_iod = lastIOD;
     315          }
     316          else {
     317            delete cc;
     318            cc = 0;
     319          }
     320        }
     321        if (cc) {
     322          cout << "CLK: " << cc->_prn.toString() << ' ' << cc->_iod << endl;
     323          clkCorr.push_back(cc);       
     324        }
    304325      }
    305326    }
Note: See TracChangeset for help on using the changeset viewer.