Changeset 2021 in ntrip for trunk/BNC


Ignore:
Timestamp:
Nov 25, 2009, 5:29:23 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpppthread.cpp

    r2020 r2021  
    5959    wait();
    6060  }
    61   cout << "PPP Client " << _staID.data() << " destructor\n";
     61  QMapIterator<QString, t_eph*> it(_eph);
     62  while (it.hasNext()) {
     63    it.next();
     64    delete it.value();
     65  }
    6266}
    6367
     
    9498void bncPPPthread::slotNewEpochData(QList<p_obs> obsList) {
    9599  QMutexLocker locker(&_mutex);
    96   cout << "PPP Client: new observations " << obsList.size() << endl;
     100  QListIterator<p_obs> it(obsList);
     101  while (it.hasNext()) {
     102    p_obs          pp  = it.next();
     103    t_obsInternal* obs = &(pp->_o);
     104    QString staID = QString(obs->StatID);
     105    cout << obs->GPSWeek << " " << obs->GPSWeeks << " "
     106         << staID.toAscii().data() << " " << obs->satSys << obs->satNum << endl;
     107  }
    97108}
    98109
     
    104115  QString prn = QString("G%1").arg(gpseph.satellite, 2, 10, QChar('0'));
    105116
    106 
    107   cout << "PPP Client: new ephemeris " << prn.toAscii().data() << endl;
     117  if (_eph.contains(prn)) {
     118    (static_cast<t_ephGPS*>(_eph.value(prn)))->set(&gpseph);
     119  }
     120  else {
     121    t_ephGPS* ee = new t_ephGPS();
     122    ee->set(&gpseph);
     123    _eph[prn] = ee;
     124  }
    108125}
    109126
  • trunk/BNC/bncpppthread.h

    r2001 r2021  
    3030
    3131#include "RTCM/GPSDecoder.h"
    32 #include "RTCM3/rtcm3torinex.h"
     32#include "RTCM3/ephemeris.h"
    3333
    3434class bncPPPthread : public QThread {
     
    5757
    5858 private:
    59   QByteArray      _staID;
    60   bool            _isToBeDeleted;
    61   QMutex          _mutex;
     59  QByteArray            _staID;
     60  bool                  _isToBeDeleted;
     61  QMutex                _mutex;
     62  QMap<QString, t_eph*> _eph;
    6263};
    6364
Note: See TracChangeset for help on using the changeset viewer.