Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r809 r811 50 50 // --------------------------------- 51 51 _outSocket = 0; 52 _outFile = 0; 53 QFile outFile(settings.value("outFile").toString()); 54 if (outFile.open(QFile::WriteOnly | QFile::Truncate)) { 55 _outFile = new QTextStream(&outFile); 56 } 52 57 } 53 58 … … 105 110 106 111 QSettings settings; 107 QString host = settings.value("outHost").toString();108 int port = settings.value("outPort").toInt();109 112 110 113 _outSocket = new QTcpSocket(); 111 _outSocket->connectToHost(host, port); 114 _outSocket->connectToHost(settings.value("outHost").toString(), 115 settings.value("outPort").toInt()); 112 116 113 117 QString mountpoint = settings.value("mountpoint").toString(); … … 169 173 _bnseph->start(); 170 174 171 // Open the connection to NTRIP Caster172 // -----------------------------------173 openCaster();174 175 175 // Endless loop 176 176 // ------------ … … 178 178 if (_clkSocket && _clkSocket->state() == QAbstractSocket::ConnectedState) { 179 179 if ( _clkSocket->canReadLine()) { 180 if (_outSocket == 0) { 181 openCaster(); 182 } 180 183 readEpoch(); 181 184 } … … 249 252 XYZ_to_RSW(xB.Rows(1,3), vv, dx, rsw); 250 253 251 cout.setf(ios::showpoint | ios::fixed); 252 cout << GPSweek << " " 253 << setprecision(1) << GPSweeks << " " << ep->prn.toAscii().data() 254 << " " << int(ep->IODC) << " " << int(ep->IODE) << " " 255 << setw(8) << setprecision(3) << dClk << " " 256 << setw(8) << setprecision(3) << rsw.t(); 257 } 254 QString line; 255 line.sprintf("%d %.1f %s %d %d %8.3f %8.3f %8.3f %8.3f\n", 256 GPSweek, GPSweeks, ep->prn.toAscii().data(), 257 int(ep->IODC), int(ep->IODE), dClk, rsw(1), rsw(2), rsw(3)); 258 259 if (_outFile) { 260 *_outFile << line; 261 } 262 if (_outSocket) { 263 _outSocket->write(line.toAscii()); 264 } 265 } -
trunk/BNS/bns.h
r799 r811 52 52 QTcpSocket* _clkSocket; 53 53 QTcpSocket* _outSocket; 54 QTextStream* _outFile; 54 55 t_bnseph* _bnseph; 55 56 QMutex _mutex;
Note:
See TracChangeset
for help on using the changeset viewer.