Changeset 366 in ntrip for trunk/BNC/bncrinex.cpp
- Timestamp:
- Jan 17, 2007, 4:17:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrinex.cpp
r356 r366 62 62 //////////////////////////////////////////////////////////////////////////// 63 63 bncRinex::bncRinex(const char* StatID, const QUrl& mountPoint, 64 const QByteArray& format) { 64 const QByteArray& format, const QByteArray& latitude, 65 const QByteArray& longitude, const QByteArray& nmea) { 65 66 _statID = StatID; 66 67 _mountPoint = mountPoint; 67 68 _format = format.left(6); 69 _latitude = latitude; 70 _longitude = longitude; 71 _nmea = nmea; 68 72 _headerWritten = false; 69 73 … … 145 149 const int timeOut = 10*1000; 146 150 QString msg; 147 QTcpSocket* socket = bncGetThread::request(url, timeOut, msg); 151 QByteArray _latitude; 152 QByteArray _longitude; 153 QByteArray _nmea; 154 QTcpSocket* socket = bncGetThread::request(url, _latitude, _longitude, _nmea, timeOut, msg); 148 155 149 156 if (socket) { … … 154 161 line.chop(1); 155 162 if (line.indexOf("RINEX VERSION") != -1) { 156 _headerLines.append(" 2.1 0OBSERVATION DATA"163 _headerLines.append(" 2.11 OBSERVATION DATA" 157 164 " M (MIXED)" 158 165 " RINEX VERSION / TYPE"); … … 294 301 295 302 QSettings settings; 296 // double lat, lon;297 // int vrsstream = 0;298 // lat = settings.value("approxLat", 0).toDouble();299 // lon = settings.value("approxLon", 0).toDouble();300 // if ((lat != 0.0) && (lon != 0.0)) {vrsstream=1;}301 303 302 304 // Open the Output File … … 332 334 } 333 335 else if (line.indexOf("# / TYPES OF OBSERV") != -1) { 334 _out << " 5 C1P1 P2 L1 L2"335 " 336 _out << " 6 C1 C2 P1 P2 L1 L2" 337 " # / TYPES OF OBSERV" << endl; 336 338 } 337 339 else if (line.indexOf("TIME OF FIRST OBS") != -1) { … … 342 344 _mountPoint.path())).leftJustified(60, ' ', true); 343 345 _out << hlp.toAscii().data() << "COMMENT" << endl; 344 // hlp = QString("Approx VRS Position %1%2").arg(lat, -20, 'f', 4).arg(lon, -20, 'f', 4);345 // _out << hlp.toAscii().data() << "COMMENT" << endl;346 346 } 347 347 else { … … 357 357 double antennaNEU[3]; antennaNEU[0] = antennaNEU[1] = antennaNEU[2] = 0.0; 358 358 359 _out << " 2.1 0OBSERVATION DATA M (MIXED) RINEX VERSION / TYPE" << endl;359 _out << " 2.11 OBSERVATION DATA M (MIXED) RINEX VERSION / TYPE" << endl; 360 360 QString hlp = QDate::currentDate().toString("dd-MMM-yyyy").leftJustified(20, ' ', true); 361 361 _out << _pgmName.toAscii().data() << _userName.toAscii().data() … … 380 380 << " " << "ANTENNA: DELTA H/E/N" << endl; 381 381 _out << " 1 1 WAVELENGTH FACT L1/2" << endl; 382 _out << " 5 C1 P1 P2 L1 L2# / TYPES OF OBSERV" << endl;382 _out << " 6 C1 C2 P1 P2 L1 L2 # / TYPES OF OBSERV" << endl; 383 383 _out << datTim.toString(" yyyy MM dd" 384 384 " hh mm ss.zzz0000").toAscii().data(); … … 387 387 _mountPoint.path())).leftJustified(60, ' ', true); 388 388 _out << hlp.toAscii().data() << "COMMENT" << endl; 389 // hlp = QString("Approx VRS Position %1%2").arg(lat, -20, 'f', 4).arg(lon, -20, 'f', 4); 390 // _out << hlp.toAscii().data() << "COMMENT" << endl; 389 390 if (_nmea == "VRS") { 391 hlp = ("VRS LAT=" + _latitude + " " + "LONG=" + _longitude).leftJustified(60, ' ',true); 392 _out << hlp.toAscii().data() << "COMMENT" << endl; } 393 391 394 _out << " END OF HEADER" << endl; 392 395 } … … 469 472 char snr = ' '; 470 473 _out << setw(14) << setprecision(3) << ob->C1 << lli << snr; 474 _out << setw(14) << setprecision(3) << ob->C2 << lli << snr; 471 475 _out << setw(14) << setprecision(3) << ob->P1 << lli << snr; 472 476 _out << setw(14) << setprecision(3) << ob->P2 << lli << snr; 473 477 _out << setw(14) << setprecision(3) << ob->L1 << lli 474 << setw(1) << ob->SNR1 ;478 << setw(1) << ob->SNR1 << endl; 475 479 _out << setw(14) << setprecision(3) << ob->L2 << lli 476 480 << setw(1) << ob->SNR2;
Note:
See TracChangeset
for help on using the changeset viewer.