Changeset 2776 in ntrip for trunk/BNC/bncpppclient.cpp


Ignore:
Timestamp:
Dec 12, 2010, 4:58:27 PM (13 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpppclient.cpp

    r2711 r2776  
    6969  }
    7070
     71  _useGalileo = true; // TODO
     72
    7173  if (settings.value("pppSPP").toString() == "PPP") {
    7274    _pppMode = true;
     
    8486  connect(((bncApp*)qApp), SIGNAL(newEphGlonass(glonassephemeris)),
    8587          this, SLOT(slotNewEphGlonass(glonassephemeris)));
     88
     89  connect(((bncApp*)qApp), SIGNAL(newEphGalileo(galileoephemeris)),
     90          this, SLOT(slotNewEphGalileo(galileoephemeris)));
    8691
    8792  connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),
     
    122127  QMutexLocker locker(&_mutex);
    123128
    124   if (obs.satSys != 'G' && !_useGlonass) {
     129  if      (obs.satSys == 'R' && !_useGlonass) {
     130    return;
     131  }
     132  else if (obs.satSys == 'E' && !_useGalileo) {
     133    return;
     134  }
     135  else if (obs.satSys != 'G') {
    125136    return;
    126137  }
     
    554565}
    555566
     567//
     568////////////////////////////////////////////////////////////////////////////
     569void bncPPPclient::slotNewEphGalileo(galileoephemeris galeph) {
     570  QMutexLocker locker(&_mutex);
     571
     572  QString prn = QString("E%1").arg(galeph.satellite, 2, 10, QChar('0'));
     573
     574  if (_eph.contains(prn)) {
     575    t_ephGal* eLast = static_cast<t_ephGal*>(_eph.value(prn)->last);
     576    if ( (eLast->GPSweek() <  galeph.Week) ||
     577         (eLast->GPSweek() == galeph.Week && 
     578          eLast->TOC()     <  galeph.TOC) ) {
     579      delete static_cast<t_ephGal*>(_eph.value(prn)->prev);
     580      _eph.value(prn)->prev = _eph.value(prn)->last;
     581      _eph.value(prn)->last = new t_ephGal();
     582      static_cast<t_ephGal*>(_eph.value(prn)->last)->set(&galeph);
     583    }
     584  }
     585  else {
     586    t_ephGal* eLast = new t_ephGal();
     587    eLast->set(&galeph);
     588    _eph.insert(prn, new t_ephPair());
     589    _eph[prn]->last = eLast;
     590  }
     591}
Note: See TracChangeset for help on using the changeset viewer.