Changeset 2030 in ntrip for trunk


Ignore:
Timestamp:
Nov 26, 2009, 11:40:38 AM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r2001 r2030  
    252252  _threads.push_back(getThread);
    253253
    254   bncPPPthread* PPPthread = getThread->PPPthread();
    255   if (PPPthread) {
    256     connect(this, SIGNAL(newEpochData(QList<p_obs>)),
    257             PPPthread, SLOT(slotNewEpochData(QList<p_obs>)));
    258     connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),
    259             PPPthread, SLOT(slotNewEphGPS(gpsephemeris)));
    260     connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),
    261             PPPthread, SLOT(slotNewCorrections(QList<QString>)));
    262     PPPthread->start();
    263   }
    264 
    265254  getThread->start();
    266255}
     
    302291    bool first = true;
    303292    QList<p_obs> allObs = _epochs->values(sec);
    304 
    305     emit newEpochData(allObs);
    306293
    307294    QListIterator<p_obs> it(allObs);
  • trunk/BNC/bnccaster.h

    r1999 r2030  
    5151   void getThreadsFinished();   
    5252   void newMessage(QByteArray msg, bool showOnScreen);
    53    void newEpochData(QList<p_obs>);
    5453
    5554 private slots:
  • trunk/BNC/bncgetthread.cpp

    r2004 r2030  
    332332
    333333  _latencyChecker = new latencyChecker(_staID);
     334
     335  if (_PPPthread) {
     336    connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),
     337            _PPPthread, SLOT(slotNewEphGPS(gpsephemeris)));
     338    connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),
     339            _PPPthread, SLOT(slotNewCorrections(QList<QString>)));
     340    _PPPthread->start();
     341  }
    334342
    335343  msleep(100); //sleep 0.1 sec
     
    491499        }
    492500     
     501        // PPP Client
     502        // ----------
     503        if (_PPPthread) {
     504          _PPPthread->putNewObs(obs);
     505        }
     506
    493507        // Emit new observation signal
    494508        // ---------------------------
  • trunk/BNC/bncgetthread.h

    r2000 r2030  
    7373   QByteArray longitude() const {return _longitude;}
    7474   QByteArray ntripVersion() const {return _ntripVersion;}
    75    bncPPPthread* PPPthread() {return _PPPthread;}
    7675
    7776 signals:
  • trunk/BNC/bncpppthread.cpp

    r2029 r2030  
    107107//
    108108////////////////////////////////////////////////////////////////////////////
    109 void bncPPPthread::slotNewEpochData(QList<p_obs> obsList) {
    110   QMutexLocker locker(&_mutex);
    111   QListIterator<p_obs> it(obsList);
    112 
    113   delete _data;
    114   _data = new t_data();
    115 
    116   while (it.hasNext()) {
    117     p_obs          pp  = it.next();
    118     t_obsInternal* obs = &(pp->_o);
    119     QByteArray staID = QByteArray(obs->StatID);
    120     if (staID == _staID) {
    121       if (_data->tt.undef()) {
    122         _data->tt.set(obs->GPSWeek, obs->GPSWeeks);
    123       }
    124       ++_data->numSat;
    125       _data->prn[_data->numSat] =
    126           QString("%1%2").arg(obs->satSys).arg(obs->satNum, 2, 10, QChar('0'));
    127       _data->C1[_data->numSat] = obs->C1;
    128       _data->C2[_data->numSat] = obs->C2;
    129       _data->P1[_data->numSat] = obs->P1;
    130       _data->P2[_data->numSat] = obs->P2;
    131       _data->L1[_data->numSat] = obs->L1;
    132       _data->L2[_data->numSat] = obs->L2;
    133     }
    134   }
     109void bncPPPthread::putNewObs(p_obs pp) {
     110
     111  QMutexLocker locker(&_mutex);
     112
     113  t_obsInternal* obs = &(pp->_o);
     114
     115  t_time tt(obs->GPSWeek, obs->GPSWeeks);
     116
     117  QString prn =
     118        QString("%1%2").arg(obs->satSys).arg(obs->satNum, 2, 10, QChar('0'));
     119
     120  cout << tt.timestr(1) << " " << prn.toAscii().data() << endl;
     121  cout.flush();
     122
     123///  delete _data;
     124///  _data = new t_data();
     125///
     126///    QByteArray staID = QByteArray(obs->StatID);
     127///    if (staID == _staID) {
     128///      if (_data->tt.undef()) {
     129///      }
     130///      ++_data->numSat;
     131///      _data->prn[_data->numSat] =
     132///         
     133///      _data->C1[_data->numSat] = obs->C1;
     134///      _data->C2[_data->numSat] = obs->C2;
     135///      _data->P1[_data->numSat] = obs->P1;
     136///      _data->P2[_data->numSat] = obs->P2;
     137///      _data->L1[_data->numSat] = obs->L1;
     138///      _data->L2[_data->numSat] = obs->L2;
     139///    }
     140///  }
    135141}
    136142
  • trunk/BNC/bncpppthread.h

    r2028 r2030  
    7373 public:
    7474  void terminate();
     75  void putNewObs(p_obs pp);
    7576
    7677 signals:
     
    8283
    8384 public slots:
    84   void slotNewEpochData(QList<p_obs> obsList);
    8585  void slotNewEphGPS(gpsephemeris gpseph);
    8686  void slotNewCorrections(QList<QString> corrList);
Note: See TracChangeset for help on using the changeset viewer.