Changeset 2710 in ntrip


Ignore:
Timestamp:
Nov 18, 2010, 12:44:38 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/GPSS/gpssDecoder.cpp

    r2709 r2710  
    2121using namespace std;
    2222
    23 typedef struct epochHeader {
     23struct t_epochHeader {
    2424  double t_epoch;
    2525  int    n_svs;
    26 } EPOCHHEADER;
     26};
    2727
    2828// Cyclic Redundancy Check
     
    8080    if      (_buffer.length() > 0 && char(_buffer[1]) == 0x00) {
    8181
    82       int reqLength = 2 + sizeof(recordSize) + sizeof(EPOCHHEADER);
     82      int reqLength = 2 + sizeof(recordSize) + sizeof(t_epochHeader);
    8383
    8484      if (_buffer.length() >= reqLength) {
    85         EPOCHHEADER epochHdr;
     85        t_epochHeader epochHdr;
    8686        memcpy(&epochHdr, _buffer.data() + 2 + sizeof(recordSize),
    8787               sizeof(epochHdr));
     
    9191        if (_buffer.length() >= reqLength) {
    9292
    93           int checkLen = 2 + sizeof(recordSize) + sizeof(EPOCHHEADER) +
     93          int checkLen = 2 + sizeof(recordSize) + sizeof(t_epochHeader) +
    9494                         epochHdr.n_svs * sizeof(t_obs);
    9595          memcpy(&crc, _buffer.data() + checkLen, sizeof(crc));
  • trunk/BNC/RTCM/GPSDecoder.h

    r2709 r2710  
    114114};
    115115
    116 typedef t_obs* p_obs;
    117 
    118116class GPSDecoder {
    119117 public:
     
    121119
    122120  virtual ~GPSDecoder() {
    123     QListIterator<p_obs> it(_obsList);
     121    QListIterator<t_obs*> it(_obsList);
    124122    while (it.hasNext()) {
    125       p_obs obs = it.next();
     123      t_obs* obs = it.next();
    126124      if (obs && obs->_status == t_obs::initial) {
    127125        delete obs;
     
    151149  };
    152150
    153   QList<p_obs>     _obsList;
     151  QList<t_obs*>    _obsList;
    154152  QList<int>       _typeList;  // RTCM   message types
    155153  QStringList      _antType;   // RTCM   antenna descriptor
  • trunk/BNC/RTCM/RTCM2Decoder.cpp

    r2709 r2710  
    140140         
    141141        for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) {
    142           p_obs obs = new t_obs();
     142          t_obs* obs = new t_obs();
    143143          _obsList.push_back(obs);
    144144          if (_ObsBlock.PRN[iSat] > 100) {
     
    314314
    315315    // new observation
    316     p_obs new_obs = 0;
     316    t_obs* new_obs = 0;
    317317
    318318    // missing IOD
  • trunk/BNC/RTCM3/RTCM3Decoder.cpp

    r2709 r2710  
    237237            for (int iSat = 0; iSat < gnssData.numsats; iSat++) {
    238238
    239               p_obs obs   = new t_obs();
    240               int   satID = gnssData.satellites[iSat];
     239              t_obs* obs   = new t_obs();
     240              int    satID = gnssData.satellites[iSat];
    241241
    242242              // GPS
  • trunk/BNC/RTIGS/RTIGSDecoder.cpp

    r2709 r2710  
    116116
    117117    for (short ii = 0; ii < numObs; ii++) {
    118       p_obs obs = new t_obs();
     118      t_obs* obs = new t_obs();
    119119      _obsList.push_back(obs);
    120120      obs->satSys   = 'G';
  • trunk/BNC/bnccaster.cpp

    r2709 r2710  
    171171  }
    172172
    173   _epochs = new QMultiMap<long, p_obs>;
     173  _epochs = new QMultiMap<long, t_obs*>;
    174174
    175175  _lastDumpSec   = 0;
     
    198198  delete _nmeaSockets;
    199199  if (_epochs) {
    200     QListIterator<p_obs> it(_epochs->values());
     200    QListIterator<t_obs*> it(_epochs->values());
    201201    while (it.hasNext()) {
    202202      delete it.next();
     
    208208// New Observations
    209209////////////////////////////////////////////////////////////////////////////
    210 void bncCaster::newObs(const QByteArray staID, bool firstObs, p_obs obs) {
     210void bncCaster::newObs(const QByteArray staID, bool firstObs, t_obs* obs) {
    211211
    212212  QMutexLocker locker(&_mutex);
     
    323323void bncCaster::addGetThread(bncGetThread* getThread, bool noNewThread) {
    324324
    325   qRegisterMetaType<p_obs>("p_obs");
     325  ////  qRegisterMetaType<t_obs*>("p_obs");
    326326  qRegisterMetaType<gpsephemeris>("gpsephemeris");
    327327  qRegisterMetaType<glonassephemeris>("glonassephemeris");
    328328
    329   connect(getThread, SIGNAL(newObs(QByteArray, bool, p_obs)),
    330           this,      SLOT(newObs(QByteArray, bool, p_obs))); /// Qt::DirectConnection);
     329  connect(getThread, SIGNAL(newObs(QByteArray, bool, t_obs*)),
     330          this,      SLOT(newObs(QByteArray, bool, t_obs*))); /// Qt::DirectConnection);
    331331
    332332  connect(getThread, SIGNAL(getThreadFinished(QByteArray)),
     
    385385
    386386    bool first = true;
    387     QList<p_obs> allObs = _epochs->values(sec);
    388 
    389     QListIterator<p_obs> it(allObs);
     387    QList<t_obs*> allObs = _epochs->values(sec);
     388
     389    QListIterator<t_obs*> it(allObs);
    390390    while (it.hasNext()) {
    391       p_obs obs = it.next();
     391      t_obs* obs = it.next();
    392392
    393393      if (_samplingRate == 0 || sec % _samplingRate == 0) {
  • trunk/BNC/bnccaster.h

    r2528 r2710  
    4444
    4545 public slots:
    46    void newObs(QByteArray staID, bool firstObs, p_obs obs);
     46   void newObs(QByteArray staID, bool firstObs, t_obs* obs);
    4747   void slotReadMountPoints();
    4848   void slotNewNMEAstr(QByteArray str);
     
    6363   static int myWrite(QTcpSocket* sock, const char* buf, int bufLen);
    6464
    65    QFile*                  _outFile;
    66    int                     _port;
    67    QTextStream*            _out;
    68    QMultiMap<long, p_obs>* _epochs;
    69    long                    _lastDumpSec;
    70    QTcpServer*             _server;
    71    QTcpServer*             _uServer;
    72    QTcpServer*             _nmeaServer;
    73    QList<QTcpSocket*>*     _sockets;
    74    QList<QTcpSocket*>*     _uSockets;
    75    QList<QTcpSocket*>*     _nmeaSockets;
    76    QList<QByteArray>       _staIDs;
    77    QList<bncGetThread*>    _threads;
    78    int                     _samplingRate;
    79    long                    _waitTime;
    80    QMutex                  _mutex;
    81    int                     _confInterval;
     65   QFile*                   _outFile;
     66   int                      _port;
     67   QTextStream*             _out;
     68   QMultiMap<long, t_obs*>* _epochs;
     69   long                     _lastDumpSec;
     70   QTcpServer*              _server;
     71   QTcpServer*              _uServer;
     72   QTcpServer*              _nmeaServer;
     73   QList<QTcpSocket*>*      _sockets;
     74   QList<QTcpSocket*>*      _uSockets;
     75   QList<QTcpSocket*>*      _nmeaSockets;
     76   QList<QByteArray>        _staIDs;
     77   QList<bncGetThread*>     _threads;
     78   int                      _samplingRate;
     79   long                     _waitTime;
     80   QMutex                   _mutex;
     81   int                      _confInterval;
    8282};
    8383
  • trunk/BNC/bncgetthread.cpp

    r2709 r2710  
    374374      // Delete old observations
    375375      // -----------------------
    376       QListIterator<p_obs> itOld(_decoder->_obsList);
     376      QListIterator<t_obs*> itOld(_decoder->_obsList);
    377377      while (itOld.hasNext()) {
    378378        delete itOld.next();
     
    439439      // Loop over all observations (observations output)
    440440      // ------------------------------------------------
    441       QListIterator<p_obs> it(_decoder->_obsList);
     441      QListIterator<t_obs*> it(_decoder->_obsList);
    442442      while (it.hasNext()) {
    443         p_obs obs = it.next();
     443        t_obs* obs = it.next();
    444444     
    445445        // Check observation epoch
  • trunk/BNC/bncgetthread.h

    r2528 r2710  
    7979   void newBytes(QByteArray staID, double nbyte);
    8080   void newLatency(QByteArray staID, double clate);
    81    void newObs(QByteArray staID, bool firstObs, p_obs obs);
     81   void newObs(QByteArray staID, bool firstObs, t_obs* obs);
    8282   void newAntCrd(QByteArray staID, double xx, double yy, double zz, QByteArray antType);
    8383   void newMessage(QByteArray msg, bool showOnScreen);
  • trunk/BNC/bncpppclient.cpp

    r2709 r2710  
    119119//
    120120////////////////////////////////////////////////////////////////////////////
    121 void bncPPPclient::putNewObs(p_obs obs) {
     121void bncPPPclient::putNewObs(t_obs* obs) {
    122122  QMutexLocker locker(&_mutex);
    123123
  • trunk/BNC/bncpppclient.h

    r2583 r2710  
    120120  bncPPPclient(QByteArray staID);
    121121  ~bncPPPclient();
    122   void putNewObs(p_obs pp);
     122  void putNewObs(t_obs* pp);
    123123
    124124 public slots:
  • trunk/BNC/bncrinex.cpp

    r2709 r2710  
    107107////////////////////////////////////////////////////////////////////////////
    108108bncRinex::~bncRinex() {
    109   QListIterator<p_obs> it(_obs);
     109  QListIterator<t_obs*> it(_obs);
    110110  while (it.hasNext()) {
    111111    delete it.next();
     
    518518// Stores Observation into Internal Array
    519519////////////////////////////////////////////////////////////////////////////
    520 void bncRinex::deepCopy(const p_obs obs) {
    521   p_obs newObs = new t_obs();
     520void bncRinex::deepCopy(const t_obs* obs) {
     521  t_obs* newObs = new t_obs();
    522522  memcpy(newObs, obs, sizeof(t_obs));
    523523  _obs.push_back(newObs);
     
    530530  // Select observations older than maxTime
    531531  // --------------------------------------
    532   QList<p_obs> dumpList;
    533   QMutableListIterator<p_obs> mIt(_obs);
     532  QList<t_obs*> dumpList;
     533  QMutableListIterator<t_obs*> mIt(_obs);
    534534  while (mIt.hasNext()) {
    535     p_obs obs = mIt.next();
     535    t_obs* obs = mIt.next();
    536536    if (obs->GPSWeek * 7*24*3600 + obs->GPSWeeks < maxTime - 0.05) {
    537537      dumpList.push_back(obs);
     
    548548  // Time of Epoch
    549549  // -------------
    550   p_obs fObs = *dumpList.begin();
     550  t_obs* fObs = *dumpList.begin();
    551551  QDateTime datTim    = dateAndTimeFromGPSweek(fObs->GPSWeek, fObs->GPSWeeks);
    552552  QDateTime datTimNom = dateAndTimeFromGPSweek(fObs->GPSWeek,
     
    582582         << "  " << 0 << setw(3)  << dumpList.size();
    583583
    584     QListIterator<p_obs> it(dumpList); int iSat = 0;
     584    QListIterator<t_obs*> it(dumpList); int iSat = 0;
    585585    while (it.hasNext()) {
    586586      iSat++;
    587       p_obs obs = it.next();
     587      t_obs* obs = it.next();
    588588      _out << obs->satSys << setw(2) << obs->satNum;
    589589      if (iSat == 12 && it.hasNext()) {
     
    595595  }
    596596
    597   QListIterator<p_obs> it(dumpList);
     597  QListIterator<t_obs*> it(dumpList);
    598598  while (it.hasNext()) {
    599     p_obs obs = it.next();
     599    t_obs* obs = it.next();
    600600
    601601    // Cycle slips detection
  • trunk/BNC/bncrinex.h

    r2709 r2710  
    4242            const QByteArray& ntripVersion);
    4343   ~bncRinex();
    44    void deepCopy(const p_obs obs);
     44   void deepCopy(const t_obs* obs);
    4545   void dumpEpoch(long maxTime);
    4646   void setReconnectFlag(bool flag){_reconnectFlag = flag;}
     
    6767   QByteArray    _statID;
    6868   QByteArray    _fName;
    69    QList<p_obs> _obs;
     69   QList<t_obs*> _obs;
    7070   std::ofstream _out;
    7171   QStringList   _headerLines;
  • trunk/BNC/latencychecker.cpp

    r2709 r2710  
    307307// Perform latency checks (observations)
    308308//////////////////////////////////////////////////////////////////////////////
    309 void latencyChecker::checkObsLatency(const QList<p_obs>& obsList) {
     309void latencyChecker::checkObsLatency(const QList<t_obs*>& obsList) {
    310310
    311311  if (_perfIntr > 0 ) {
    312312
    313     QListIterator<p_obs> it(obsList);
     313    QListIterator<t_obs*> it(obsList);
    314314    while (it.hasNext()) {
    315       p_obs obs = it.next();
     315      t_obs* obs = it.next();
    316316     
    317317      _newSecGPS = static_cast<int>(obs->GPSWeeks);
  • trunk/BNC/latencychecker.h

    r1973 r2710  
    3838  void checkReconnect();
    3939  void checkOutage(bool decoded);
    40   void checkObsLatency(const QList<p_obs>& obsList);
     40  void checkObsLatency(const QList<t_obs*>& obsList);
    4141  void checkCorrLatency(int corrGPSEpochTime);
    4242  double currentLatency() const {return _curLat;}
Note: See TracChangeset for help on using the changeset viewer.