Changeset 4763 in ntrip


Ignore:
Timestamp:
Oct 23, 2012, 10:42:42 AM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTRover/bncrtrover.cpp

    r4761 r4763  
    1414// Constructor
    1515////////////////////////////////////////////////////////////////////////////
    16 t_bncRtrover::t_bncRtrover() {
    17 
    18   bncSettings settings;
    19 
    20   // Processed Station, Corrections Source
    21   // -------------------------------------
    22   _pppCorrMount = settings.value("pppCorrMount").toString();
    23 
    24   // Define Input Options
    25   // --------------------
    26   rtrover_opt opt;
    27   rtrover_setOptions(&opt);
    28 
    29   // Connect to BNC Signals
    30   // ----------------------
    31   connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),
    32           this, SLOT(slotNewCorrections(QList<QString>)));
    33 
    34   connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),
    35           this, SLOT(slotNewEphGPS(gpsephemeris)));
    36 
    37   connect(((bncApp*)qApp), SIGNAL(newEphGlonass(glonassephemeris)),
    38           this, SLOT(slotNewEphGlonass(glonassephemeris)));
    39 
    40   connect(((bncApp*)qApp), SIGNAL(newEphGalileo(galileoephemeris)),
    41           this, SLOT(slotNewEphGalileo(galileoephemeris)));
     16t_bncRtrover::t_bncRtrover() : QThread(0) {
     17
    4218}
    4319
     
    5127  }
    5228  rtrover_destroy();
     29}
     30
     31// Run (virtual)
     32////////////////////////////////////////////////////////////////////////////
     33void t_bncRtrover::run() {
     34  bncSettings settings;
     35
     36  // Processed Station, Corrections Source
     37  // -------------------------------------
     38  _pppCorrMount = settings.value("pppCorrMount").toString();
     39
     40  // Define Input Options
     41  // --------------------
     42  rtrover_opt opt;
     43  rtrover_setOptions(&opt);
     44
     45  // Connect to BNC Signals
     46  // ----------------------
     47  connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)),
     48          this, SLOT(slotNewCorrections(QList<QString>)));
     49
     50  connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),
     51          this, SLOT(slotNewEphGPS(gpsephemeris)));
     52
     53  connect(((bncApp*)qApp), SIGNAL(newEphGlonass(glonassephemeris)),
     54          this, SLOT(slotNewEphGlonass(glonassephemeris)));
     55
     56  connect(((bncApp*)qApp), SIGNAL(newEphGalileo(galileoephemeris)),
     57          this, SLOT(slotNewEphGalileo(galileoephemeris)));
    5358}
    5459
     
    201206//
    202207////////////////////////////////////////////////////////////////////////////
    203 void t_bncRtrover::putNewObs(const t_obs& obsIn) {
     208void t_bncRtrover::slotNewObs(QByteArray staID, bool firstObs, t_obs obsIn) {
    204209  QMutexLocker locker(&_mutex);
    205210
  • trunk/BNC/src/RTRover/bncrtrover.h

    r4758 r4763  
    77#include "bncephuser.h"
    88
    9 class t_bncRtrover : QObject {
     9class t_bncRtrover : public QThread {
    1010 Q_OBJECT
    1111
     
    1313  t_bncRtrover();
    1414  ~t_bncRtrover();
    15   void putNewObs(const t_obs& pp);
     15  virtual void run();
    1616
    1717 public slots:
     
    2020  void slotNewEphGalileo(galileoephemeris galeph);
    2121  void slotNewCorrections(QList<QString> corrList);
     22  void slotNewObs(QByteArray staID, bool firstObs, t_obs obs);
    2223
    2324 private:
  • trunk/BNC/src/bnccaster.cpp

    r4536 r4763  
    5252#include "bncsettings.h"
    5353#include "RTCM/GPSDecoder.h"
     54#ifdef RTROVER_INTERFACE
     55#  include "RTRover/bncrtrover.h"
     56#endif
    5457
    5558using namespace std;
     
    131134  _lastDumpSec  = 0;
    132135  _confInterval = -1;
     136#ifdef RTROVER_INTERFACE
     137    _bncRtrover = new t_bncRtrover();
     138    _bncRtrover->start();
     139#endif
    133140}
    134141
     
    267274  connect(getThread, SIGNAL(newObs(QByteArray, bool, t_obs)),
    268275          this,      SLOT(newObs(QByteArray, bool, t_obs)));
     276
     277#ifdef RTROVER_INTERFACE
     278  connect(getThread, SIGNAL(newObs(QByteArray, bool, t_obs)),
     279          _bncRtrover, SLOT(slotNewObs(QByteArray, bool, t_obs)));
     280#endif
    269281
    270282  connect(getThread, SIGNAL(getThreadFinished(QByteArray)),
  • trunk/BNC/src/bnccaster.h

    r4278 r4763  
    3333
    3434class bncGetThread;
     35#ifdef RTROVER_INTERFACE
     36 class t_bncRtrover;
     37#endif
    3538
    3639class bncCaster : public QObject {
     
    8184   QMutex                   _mutex;
    8285   int                      _confInterval;
     86#ifdef RTROVER_INTERFACE
     87   t_bncRtrover*            _bncRtrover;
     88#endif
    8389};
    8490
  • trunk/BNC/src/bncgetthread.cpp

    r4757 r4763  
    6363#include "latencychecker.h"
    6464#include "bncpppclient.h"
    65 #ifdef RTROVER_INTERFACE
    66 #include "RTRover/bncrtrover.h"
    67 #endif
    6865#include "upload/bncrtnetdecoder.h"
    6966#include "RTCM/RTCM2Decoder.h"
     
    133130  _nextSleep     = 0;
    134131  _PPPclient     = 0;
    135 #ifdef RTROVER_INTERFACE
    136   _bncRtrover    = 0;
    137 #endif
    138132  _miscMount     = settings.value("miscMount").toString();
    139133  _decoder   = 0;
     
    345339    connect(_PPPclient, SIGNAL(newNMEAstr(QByteArray)),
    346340            this,       SIGNAL(newNMEAstr(QByteArray)));
    347 #ifdef RTROVER_INTERFACE
    348     _bncRtrover = new t_bncRtrover();
    349 #endif
    350341  }
    351342#endif
     
    379370  }
    380371  delete _PPPclient;
    381 #ifdef RTROVER_INTERFACE
    382     delete _bncRtrover;
    383 #endif
    384372  if (_rawFile) {
    385373    QMapIterator<QString, GPSDecoder*> it(_decodersRaw);
     
    563551        if (_PPPclient && _staID == _PPPclient->staID()) {
    564552          _PPPclient->putNewObs(obs);
    565 #ifdef RTROVER_INTERFACE
    566           _bncRtrover->putNewObs(obs);
    567 #endif
    568553        }
    569554#endif
  • trunk/BNC/src/bncgetthread.h

    r4757 r4763  
    4141class latencyChecker;
    4242class bncPPPclient;
    43 #ifdef RTROVER_INTERFACE
    44 class t_bncRtrover;
    45 #endif
    4643
    4744class bncGetThread : public QThread {
     
    128125   bool                       _rawOutput;
    129126   QMap<QString, long>        _prnLastEpo;
    130 #ifdef RTROVER_INTERFACE
    131    t_bncRtrover*              _bncRtrover;
    132 #endif
    133127   QMap<char, QVector<QString> > _rnxTypes;
    134128};
Note: See TracChangeset for help on using the changeset viewer.