Changeset 2710 in ntrip
- Timestamp:
- Nov 18, 2010, 12:44:38 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/GPSS/gpssDecoder.cpp
r2709 r2710 21 21 using namespace std; 22 22 23 typedef structepochHeader {23 struct t_epochHeader { 24 24 double t_epoch; 25 25 int n_svs; 26 } EPOCHHEADER;26 }; 27 27 28 28 // Cyclic Redundancy Check … … 80 80 if (_buffer.length() > 0 && char(_buffer[1]) == 0x00) { 81 81 82 int reqLength = 2 + sizeof(recordSize) + sizeof( EPOCHHEADER);82 int reqLength = 2 + sizeof(recordSize) + sizeof(t_epochHeader); 83 83 84 84 if (_buffer.length() >= reqLength) { 85 EPOCHHEADERepochHdr;85 t_epochHeader epochHdr; 86 86 memcpy(&epochHdr, _buffer.data() + 2 + sizeof(recordSize), 87 87 sizeof(epochHdr)); … … 91 91 if (_buffer.length() >= reqLength) { 92 92 93 int checkLen = 2 + sizeof(recordSize) + sizeof( EPOCHHEADER) +93 int checkLen = 2 + sizeof(recordSize) + sizeof(t_epochHeader) + 94 94 epochHdr.n_svs * sizeof(t_obs); 95 95 memcpy(&crc, _buffer.data() + checkLen, sizeof(crc)); -
trunk/BNC/RTCM/GPSDecoder.h
r2709 r2710 114 114 }; 115 115 116 typedef t_obs* p_obs;117 118 116 class GPSDecoder { 119 117 public: … … 121 119 122 120 virtual ~GPSDecoder() { 123 QListIterator< p_obs> it(_obsList);121 QListIterator<t_obs*> it(_obsList); 124 122 while (it.hasNext()) { 125 p_obsobs = it.next();123 t_obs* obs = it.next(); 126 124 if (obs && obs->_status == t_obs::initial) { 127 125 delete obs; … … 151 149 }; 152 150 153 QList< p_obs>_obsList;151 QList<t_obs*> _obsList; 154 152 QList<int> _typeList; // RTCM message types 155 153 QStringList _antType; // RTCM antenna descriptor -
trunk/BNC/RTCM/RTCM2Decoder.cpp
r2709 r2710 140 140 141 141 for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) { 142 p_obsobs = new t_obs();142 t_obs* obs = new t_obs(); 143 143 _obsList.push_back(obs); 144 144 if (_ObsBlock.PRN[iSat] > 100) { … … 314 314 315 315 // new observation 316 p_obsnew_obs = 0;316 t_obs* new_obs = 0; 317 317 318 318 // missing IOD -
trunk/BNC/RTCM3/RTCM3Decoder.cpp
r2709 r2710 237 237 for (int iSat = 0; iSat < gnssData.numsats; iSat++) { 238 238 239 p_obsobs = new t_obs();240 int satID = gnssData.satellites[iSat];239 t_obs* obs = new t_obs(); 240 int satID = gnssData.satellites[iSat]; 241 241 242 242 // GPS -
trunk/BNC/RTIGS/RTIGSDecoder.cpp
r2709 r2710 116 116 117 117 for (short ii = 0; ii < numObs; ii++) { 118 p_obsobs = new t_obs();118 t_obs* obs = new t_obs(); 119 119 _obsList.push_back(obs); 120 120 obs->satSys = 'G'; -
trunk/BNC/bnccaster.cpp
r2709 r2710 171 171 } 172 172 173 _epochs = new QMultiMap<long, p_obs>;173 _epochs = new QMultiMap<long, t_obs*>; 174 174 175 175 _lastDumpSec = 0; … … 198 198 delete _nmeaSockets; 199 199 if (_epochs) { 200 QListIterator< p_obs> it(_epochs->values());200 QListIterator<t_obs*> it(_epochs->values()); 201 201 while (it.hasNext()) { 202 202 delete it.next(); … … 208 208 // New Observations 209 209 //////////////////////////////////////////////////////////////////////////// 210 void bncCaster::newObs(const QByteArray staID, bool firstObs, p_obsobs) {210 void bncCaster::newObs(const QByteArray staID, bool firstObs, t_obs* obs) { 211 211 212 212 QMutexLocker locker(&_mutex); … … 323 323 void bncCaster::addGetThread(bncGetThread* getThread, bool noNewThread) { 324 324 325 qRegisterMetaType<p_obs>("p_obs");325 //// qRegisterMetaType<t_obs*>("p_obs"); 326 326 qRegisterMetaType<gpsephemeris>("gpsephemeris"); 327 327 qRegisterMetaType<glonassephemeris>("glonassephemeris"); 328 328 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); 331 331 332 332 connect(getThread, SIGNAL(getThreadFinished(QByteArray)), … … 385 385 386 386 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); 390 390 while (it.hasNext()) { 391 p_obsobs = it.next();391 t_obs* obs = it.next(); 392 392 393 393 if (_samplingRate == 0 || sec % _samplingRate == 0) { -
trunk/BNC/bnccaster.h
r2528 r2710 44 44 45 45 public slots: 46 void newObs(QByteArray staID, bool firstObs, p_obsobs);46 void newObs(QByteArray staID, bool firstObs, t_obs* obs); 47 47 void slotReadMountPoints(); 48 48 void slotNewNMEAstr(QByteArray str); … … 63 63 static int myWrite(QTcpSocket* sock, const char* buf, int bufLen); 64 64 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; 82 82 }; 83 83 -
trunk/BNC/bncgetthread.cpp
r2709 r2710 374 374 // Delete old observations 375 375 // ----------------------- 376 QListIterator< p_obs> itOld(_decoder->_obsList);376 QListIterator<t_obs*> itOld(_decoder->_obsList); 377 377 while (itOld.hasNext()) { 378 378 delete itOld.next(); … … 439 439 // Loop over all observations (observations output) 440 440 // ------------------------------------------------ 441 QListIterator< p_obs> it(_decoder->_obsList);441 QListIterator<t_obs*> it(_decoder->_obsList); 442 442 while (it.hasNext()) { 443 p_obsobs = it.next();443 t_obs* obs = it.next(); 444 444 445 445 // Check observation epoch -
trunk/BNC/bncgetthread.h
r2528 r2710 79 79 void newBytes(QByteArray staID, double nbyte); 80 80 void newLatency(QByteArray staID, double clate); 81 void newObs(QByteArray staID, bool firstObs, p_obsobs);81 void newObs(QByteArray staID, bool firstObs, t_obs* obs); 82 82 void newAntCrd(QByteArray staID, double xx, double yy, double zz, QByteArray antType); 83 83 void newMessage(QByteArray msg, bool showOnScreen); -
trunk/BNC/bncpppclient.cpp
r2709 r2710 119 119 // 120 120 //////////////////////////////////////////////////////////////////////////// 121 void bncPPPclient::putNewObs( p_obsobs) {121 void bncPPPclient::putNewObs(t_obs* obs) { 122 122 QMutexLocker locker(&_mutex); 123 123 -
trunk/BNC/bncpppclient.h
r2583 r2710 120 120 bncPPPclient(QByteArray staID); 121 121 ~bncPPPclient(); 122 void putNewObs( p_obspp);122 void putNewObs(t_obs* pp); 123 123 124 124 public slots: -
trunk/BNC/bncrinex.cpp
r2709 r2710 107 107 //////////////////////////////////////////////////////////////////////////// 108 108 bncRinex::~bncRinex() { 109 QListIterator< p_obs> it(_obs);109 QListIterator<t_obs*> it(_obs); 110 110 while (it.hasNext()) { 111 111 delete it.next(); … … 518 518 // Stores Observation into Internal Array 519 519 //////////////////////////////////////////////////////////////////////////// 520 void bncRinex::deepCopy(const p_obsobs) {521 p_obsnewObs = new t_obs();520 void bncRinex::deepCopy(const t_obs* obs) { 521 t_obs* newObs = new t_obs(); 522 522 memcpy(newObs, obs, sizeof(t_obs)); 523 523 _obs.push_back(newObs); … … 530 530 // Select observations older than maxTime 531 531 // -------------------------------------- 532 QList< p_obs> dumpList;533 QMutableListIterator< p_obs> mIt(_obs);532 QList<t_obs*> dumpList; 533 QMutableListIterator<t_obs*> mIt(_obs); 534 534 while (mIt.hasNext()) { 535 p_obsobs = mIt.next();535 t_obs* obs = mIt.next(); 536 536 if (obs->GPSWeek * 7*24*3600 + obs->GPSWeeks < maxTime - 0.05) { 537 537 dumpList.push_back(obs); … … 548 548 // Time of Epoch 549 549 // ------------- 550 p_obsfObs = *dumpList.begin();550 t_obs* fObs = *dumpList.begin(); 551 551 QDateTime datTim = dateAndTimeFromGPSweek(fObs->GPSWeek, fObs->GPSWeeks); 552 552 QDateTime datTimNom = dateAndTimeFromGPSweek(fObs->GPSWeek, … … 582 582 << " " << 0 << setw(3) << dumpList.size(); 583 583 584 QListIterator< p_obs> it(dumpList); int iSat = 0;584 QListIterator<t_obs*> it(dumpList); int iSat = 0; 585 585 while (it.hasNext()) { 586 586 iSat++; 587 p_obsobs = it.next();587 t_obs* obs = it.next(); 588 588 _out << obs->satSys << setw(2) << obs->satNum; 589 589 if (iSat == 12 && it.hasNext()) { … … 595 595 } 596 596 597 QListIterator< p_obs> it(dumpList);597 QListIterator<t_obs*> it(dumpList); 598 598 while (it.hasNext()) { 599 p_obsobs = it.next();599 t_obs* obs = it.next(); 600 600 601 601 // Cycle slips detection -
trunk/BNC/bncrinex.h
r2709 r2710 42 42 const QByteArray& ntripVersion); 43 43 ~bncRinex(); 44 void deepCopy(const p_obsobs);44 void deepCopy(const t_obs* obs); 45 45 void dumpEpoch(long maxTime); 46 46 void setReconnectFlag(bool flag){_reconnectFlag = flag;} … … 67 67 QByteArray _statID; 68 68 QByteArray _fName; 69 QList< p_obs>_obs;69 QList<t_obs*> _obs; 70 70 std::ofstream _out; 71 71 QStringList _headerLines; -
trunk/BNC/latencychecker.cpp
r2709 r2710 307 307 // Perform latency checks (observations) 308 308 ////////////////////////////////////////////////////////////////////////////// 309 void latencyChecker::checkObsLatency(const QList< p_obs>& obsList) {309 void latencyChecker::checkObsLatency(const QList<t_obs*>& obsList) { 310 310 311 311 if (_perfIntr > 0 ) { 312 312 313 QListIterator< p_obs> it(obsList);313 QListIterator<t_obs*> it(obsList); 314 314 while (it.hasNext()) { 315 p_obsobs = it.next();315 t_obs* obs = it.next(); 316 316 317 317 _newSecGPS = static_cast<int>(obs->GPSWeeks); -
trunk/BNC/latencychecker.h
r1973 r2710 38 38 void checkReconnect(); 39 39 void checkOutage(bool decoded); 40 void checkObsLatency(const QList< p_obs>& obsList);40 void checkObsLatency(const QList<t_obs*>& obsList); 41 41 void checkCorrLatency(int corrGPSEpochTime); 42 42 double currentLatency() const {return _curLat;}
Note:
See TracChangeset
for help on using the changeset viewer.