Changeset 3528 in ntrip


Ignore:
Timestamp:
Dec 16, 2011, 5:23:35 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM/GPSDecoder.h

    r3342 r3528  
    3333
    3434#include "bncconst.h"
     35#include "bncrinex.h"
    3536
    3637class t_obs {
     
    119120class GPSDecoder {
    120121 public:
    121   virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg) = 0;
     122  GPSDecoder();
    122123
    123   virtual ~GPSDecoder() {}
     124  virtual ~GPSDecoder() {delete _rnx;}
     125
     126  virtual t_irc Decode(char* buffer, int bufLen,
     127                       std::vector<std::string>& errmsg) = 0;
     128
    124129
    125130  virtual int corrGPSEpochTime() const {return -1;}
     131
     132  void dumpRinexEpoch(const t_obs& obs, const QByteArray& format);
     133
     134  void setRinexReconnectFlag(bool flag);
    126135
    127136  struct t_antInfo {
     
    145154
    146155  QList<t_obs>     _obsList;
    147   QList<int>       _typeList;  // RTCM   message types
    148   QStringList      _antType;   // RTCM   antenna descriptor
    149   QList<t_antInfo> _antList;   // RTCM   antenna XYZ
     156  QList<int>       _typeList;  // RTCM message types
     157  QStringList      _antType;   // RTCM antenna descriptor
     158  QList<t_antInfo> _antList;   // RTCM antenna XYZ
     159  bncRinex*        _rnx;       // RINEX writer
    150160};
    151161
  • trunk/BNC/bnc.pro

    r3504 r3528  
    8282          upload/bncrtnetuploadcaster.cpp upload/bnccustomtrafo.cpp   \
    8383          upload/bncephuploadcaster.cpp                               \
    84           RTCM/RTCM2.cpp RTCM/RTCM2Decoder.cpp                        \
     84          RTCM/GPSDecoder.cpp RTCM/RTCM2.cpp RTCM/RTCM2Decoder.cpp    \
    8585          RTCM/RTCM2_2021.cpp RTCM/rtcm_utils.cpp                     \
    8686          RTCM3/RTCM3Decoder.cpp RTCM3/rtcm3torinex/rtcm3torinex.c    \
  • trunk/BNC/bncgetthread.cpp

    r3527 r3528  
    5252#include "bncapp.h"
    5353#include "bncutils.h"
    54 #include "bncrinex.h"
    5554#include "bnczerodecoder.h"
    5655#include "bncnetqueryv0.h"
     
    116115void bncGetThread::initialize() {
    117116
     117  bncSettings settings;
     118
    118119  setTerminationEnabled(true);
    119120
     
    127128  _nextSleep     = 0;
    128129  _PPPclient     = 0;
    129 
    130   bncSettings settings;
    131 
    132   _miscMount = settings.value("miscMount").toString();
    133 
    134   // RINEX writer
    135   // ------------
    136   _samplingRate = settings.value("rnxSampl").toInt();
    137   if ( settings.value("rnxPath").toString().isEmpty() ) {
    138     _rnx = 0;
    139   }
    140   else {
    141     _rnx = new bncRinex(_staID, _mountPoint, _latitude, _longitude,
    142                         _nmea, _ntripVersion);
    143   }
     130  _miscMount     = settings.value("miscMount").toString();
    144131
    145132  // Serial Port
     
    364351    delete it.value();
    365352  }
    366   delete _rnx;
    367353  delete _rawFile;
    368354  delete _serialOutFile;
     
    515501        _prnLastEpo[prn] = obsTime;
    516502
    517         // RINEX Output
    518         // ------------
    519         if (_rnx) {
    520           if (_samplingRate == 0 || iSec % _samplingRate == 0) {
    521             _rnx->deepCopy(obs);
    522           }
    523           _rnx->dumpEpoch(_format, obsTime);
    524         }
    525      
     503        decoder()->dumpRinexEpoch(obs, _format);
     504
    526505        // PPP Client
    527506        // ----------
     
    560539  if (_query && _query->status() == bncNetQuery::running) {
    561540    _nextSleep = 0;
    562     if (_rnx) {
    563       _rnx->setReconnectFlag(false);
     541    QMapIterator<QString, GPSDecoder*> itDec(_decoders);
     542    while (itDec.hasNext()) {
     543      itDec.next();
     544      GPSDecoder* decoder = itDec.value();
     545      decoder->setRinexReconnectFlag(false);
    564546    }
    565547    return success;
     
    623605  }
    624606
    625   if (_rnx) {
    626     _rnx->setReconnectFlag(true);
     607  QMapIterator<QString, GPSDecoder*> itDec(_decoders);
     608  while (itDec.hasNext()) {
     609    itDec.next();
     610    GPSDecoder* decoder = itDec.value();
     611    decoder->setRinexReconnectFlag(false);
    627612  }
    628613
  • trunk/BNC/bncgetthread.h

    r3527 r3528  
    3838#include "bncrawfile.h"
    3939
    40 class bncRinex;
    4140class QextSerialPort;
    4241class latencyChecker;
     
    117116   int                        _nextSleep;
    118117   int                        _iMount;
    119    int                        _samplingRate;
    120    bncRinex*                  _rnx;
    121118   bncRawFile*                _rawFile;
    122119   QextSerialPort*            _serialPort;
  • trunk/BNC/bncrinex.cpp

    r3525 r3528  
    101101
    102102  _approxPos[0] = _approxPos[1] = _approxPos[2] = 0.0;
     103
     104  _samplingRate = settings.value("rnxSampl").toInt();
    103105}
    104106
  • trunk/BNC/bncrinex.h

    r3525 r3528  
    2626#define BNCRINEX_H
    2727
    28 #include <QByteArray>
    29 #include <QDateTime>
    30 #include <QList>
    31 
     28#include <QtCore>
    3229#include <fstream>
    3330
    3431#include "bncconst.h"
    35 #include "RTCM/GPSDecoder.h"
     32
     33class t_obs;
    3634
    3735class bncRinex {
     
    4745                               const QString& intStr,
    4846                               QDateTime* nextEpoch = 0);
     47
     48   int samplingRate() const {return _samplingRate;}
    4949
    5050   void setApproxPos(double stax, double stay, double staz) {
     
    9090   bool          _reloadDone;
    9191   double        _approxPos[3];
     92   int           _samplingRate;
    9293
    9394   QMap<QString, int>  _slip_cnt_L1;
Note: See TracChangeset for help on using the changeset viewer.