Changeset 5833 in ntrip


Ignore:
Timestamp:
Aug 6, 2014, 2:59:49 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
2 edited

Legend:

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

    r5832 r5833  
    143143}
    144144
    145 //
    146 ////////////////////////////////////////////////////////////////////////////
    147 void t_pppRun::slotNewCorrections(QStringList corrList) {
    148   QMutexLocker locker(&_mutex);
    149 
    150   QStringListIterator it(corrList);
    151   while (it.hasNext()) {
    152     it.next();
    153   }
    154 
    155   // _pppClient->putOrbCorrections(const std::vector<t_orbCorr*>& corr);
    156   // _pppClient->putClkCorrections(const std::vector<t_clkCorr*>& corr);
    157   // _pppClient->putBiases(const std::vector<t_satBiases*>& biases);   
    158 }
    159145//
    160146////////////////////////////////////////////////////////////////////////////
     
    178164    // Find the corresponding data epoch or create a new one
    179165    // -----------------------------------------------------
    180     t_pppEpoData* epoData = 0;
    181     deque<t_pppEpoData*>::const_iterator it;
    182     for (it = _pppEpochs.begin(); it != _pppEpochs.end(); it++) {
     166    t_epoData* epoch = 0;
     167    deque<t_epoData*>::const_iterator it;
     168    for (it = _epoData.begin(); it != _epoData.end(); it++) {
    183169      if (newObs->_time == (*it)->_time) {
    184         epoData = *it;
     170        epoch = *it;
    185171        break;
    186172      }
    187173    }
    188     if (epoData == 0) {
    189       if (_pppEpochs.empty() || newObs->_time > _pppEpochs.back()->_time) {
    190         epoData = new t_pppEpoData;
    191         epoData->_time = newObs->_time;
    192         _pppEpochs.push_back(epoData);
     174    if (epoch == 0) {
     175      if (_epoData.empty() || newObs->_time > _epoData.back()->_time) {
     176        epoch = new t_epoData;
     177        epoch->_time = newObs->_time;
     178        _epoData.push_back(epoch);
    193179      }
    194180    }
     
    196182    // Fill the new observation and add it to the corresponding epoch
    197183    // --------------------------------------------------------------
    198     if (epoData != 0) {
    199       epoData->_satObs.push_back(newObs);
     184    if (epoch != 0) {
     185      epoch->_satObs.push_back(newObs);
    200186      map<string, t_frqObs*> frqObsMap;
    201187      for (unsigned iEntry = 0; iEntry < GNSSENTRY_NUMBER; iEntry++) {
     
    231217  // Process the oldest epoch
    232218  // ------------------------
    233   if (_pppEpochs.size() > 1) {
    234 
    235     const vector<t_satObs*>& satObs = _pppEpochs.front()->_satObs;
     219  if (_epoData.size() > 1) {
     220
     221    const vector<t_satObs*>& satObs = _epoData.front()->_satObs;
    236222
    237223    t_output output;
    238224    _pppClient->processEpoch(satObs, &output);
    239225
    240     delete _pppEpochs.front(); _pppEpochs.pop_front();
     226    delete _epoData.front(); _epoData.pop_front();
    241227   
    242228    emit newMessage(QByteArray(output._log.c_str()), true);
     
    244230}
    245231   
     232//
     233////////////////////////////////////////////////////////////////////////////
     234void t_pppRun::slotNewCorrections(QStringList corrList) {
     235  QMutexLocker locker(&_mutex);
     236
     237  QStringListIterator it(corrList);
     238  while (it.hasNext()) {
     239    it.next();
     240  }
     241
     242  // _pppClient->putOrbCorrections(const std::vector<t_orbCorr*>& corr);
     243  // _pppClient->putClkCorrections(const std::vector<t_clkCorr*>& corr);
     244  // _pppClient->putBiases(const std::vector<t_satBiases*>& biases);   
     245}
  • trunk/BNC/src/PPP/pppThread.h

    r5823 r5833  
    2929
    3030 private:
    31   class t_pppEpoData {
     31  class t_epoData {
    3232   public:
    33     t_pppEpoData() {}
    34     ~t_pppEpoData() {
     33    t_epoData() {}
     34    ~t_epoData() {
    3535      for (unsigned ii = 0; ii < _satObs.size(); ii++) {
    3636        delete _satObs[ii];
     
    4141  };
    4242
    43   QMutex                    _mutex;
    44   const t_pppOptions*          _opt;
    45   t_pppClient*              _pppClient;
    46   std::deque<t_pppEpoData*> _pppEpochs;
     43  QMutex                 _mutex;
     44  const t_pppOptions*    _opt;
     45  t_pppClient*           _pppClient;
     46  std::deque<t_epoData*> _epoData;
    4747};
    4848
     
    5959 private:
    6060  const t_pppOptions* _opt;
    61   t_pppRun*        _pppRun;
     61  t_pppRun*           _pppRun;
    6262};
    6363
Note: See TracChangeset for help on using the changeset viewer.