Changeset 2021 in ntrip for trunk/BNC/bncpppthread.cpp


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

* empty log message *

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.