- Timestamp:
- Jul 26, 2008, 10:10:54 AM (17 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/RTCM3coDecoder.cpp
r971 r974 68 68 _out = 0; 69 69 70 connect(this, SIGNAL(newCorrLine(QString, QString )),71 (bncApp*) qApp, SLOT(slotNewCorrLine(QString, QString )));70 connect(this, SIGNAL(newCorrLine(QString, QString, long)), 71 (bncApp*) qApp, SLOT(slotNewCorrLine(QString, QString, long))); 72 72 } 73 73 … … 175 175 _co.Sat[ii].Orbit.DeltaAlongTrack, 176 176 _co.Sat[ii].Orbit.DeltaCrossTrack); 177 printLine(line); 177 long coTime = GPSweek * 7*24*3600 + long(floor(GPSweeks+0.5)); 178 printLine(line, coTime); 178 179 } 179 180 for(int ii = CLOCKORBIT_NUMGPS; … … 186 187 _co.Sat[ii].Orbit.DeltaAlongTrack, 187 188 _co.Sat[ii].Orbit.DeltaCrossTrack); 188 printLine(line); 189 long coTime = GPSweek * 7*24*3600 + long(floor(GPSweeks+0.5)); 190 printLine(line, coTime); 189 191 } 190 192 _buffer = _buffer.substr(bytesused); … … 202 204 // 203 205 //////////////////////////////////////////////////////////////////////////// 204 void RTCM3coDecoder::printLine(const QString& line ) {206 void RTCM3coDecoder::printLine(const QString& line, long coTime) { 205 207 if (_out) { 206 208 *_out << line.toAscii().data() << endl; … … 208 210 } 209 211 210 emit newCorrLine(line, _staID );211 } 212 emit newCorrLine(line, _staID, coTime); 213 } -
trunk/BNC/RTCM3/RTCM3coDecoder.h
r971 r974 45 45 46 46 signals: 47 void newCorrLine(QString line, QString staID );47 void newCorrLine(QString line, QString staID, long coTime); 48 48 49 49 private: 50 50 void reopen(); 51 void printLine(const QString& line );51 void printLine(const QString& line, long coTime); 52 52 53 53 int _port; -
trunk/BNC/bncapp.cpp
r973 r974 597 597 // 598 598 //////////////////////////////////////////////////////////////////////////// 599 void bncApp::slotNewCorrLine(QString line, QString staID) { 600 if (_socketsCorr) { 601 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 602 while (is.hasNext()) { 603 QTcpSocket* sock = is.next(); 604 if (sock->state() == QAbstractSocket::ConnectedState) { 605 if (sock->write(QString(line + " " + staID + "\n").toAscii()) == -1) { 606 delete sock; 607 is.remove(); 608 } 609 } 610 else if (sock->state() != QAbstractSocket::ConnectingState) { 599 void bncApp::slotNewCorrLine(QString line, QString staID, long coTime) { 600 601 QMutexLocker locker(&_mutex); 602 603 if (!_socketsCorr) { 604 return; 605 } 606 607 // First time, set the _lastDumpSec immediately 608 // -------------------------------------------- 609 if (_lastDumpCoSec == 0) { 610 _lastDumpCoSec = coTime - 1; 611 } 612 613 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 614 while (is.hasNext()) { 615 QTcpSocket* sock = is.next(); 616 if (sock->state() == QAbstractSocket::ConnectedState) { 617 if (sock->write(QString(line + " " + staID + "\n").toAscii()) == -1) { 611 618 delete sock; 612 619 is.remove(); 613 620 } 614 621 } 615 } 616 } 622 else if (sock->state() != QAbstractSocket::ConnectingState) { 623 delete sock; 624 is.remove(); 625 } 626 } 627 } -
trunk/BNC/bncapp.h
r973 r974 46 46 void slotNewGPSEph(gpsephemeris* gpseph); 47 47 void slotNewGlonassEph(glonassephemeris* glonasseph); 48 void slotNewCorrLine(QString line, QString staID );48 void slotNewCorrLine(QString line, QString staID, long coTime); 49 49 void slotQuit(); 50 50
Note:
See TracChangeset
for help on using the changeset viewer.