Changeset 9760 in ntrip for trunk/BNC/src/bnccore.cpp
- Timestamp:
- Jun 9, 2022, 5:10:10 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r9675 r9760 288 288 if (_rinexVers == 0) { 289 289 290 if ( Qt::CheckState(settings.value("ephV2").toInt()) == Qt::Checked) { 291 _rinexVers = 2; 292 } 293 else { 294 _rinexVers = 3; 295 } 290 _rinexVers = settings.value("ephVersion").toInt(); 296 291 297 292 _ephPath = settings.value("ephPath").toString(); … … 313 308 QString ephFileNameGPS = _ephPath + "BRDC"; 314 309 315 bool ephV2 = (_rinexVers == 2)? true : false;316 317 310 QString hlpStr = bncRinex::nextEpochStr(datTim, 318 settings.value("ephIntr").toString(), ephV2);319 320 if (_rinexVers == 3) {311 settings.value("ephIntr").toString(), _rinexVers); 312 313 if (_rinexVers > 2) { 321 314 QString country = "WRD"; // WORLD 322 315 QString monNum = "0"; … … 359 352 _ephStreamGPS->setDevice(_ephFileGPS); 360 353 361 if (_rinexVers == 3) {354 if (_rinexVers > 2) { 362 355 _ephFileGlonass = _ephFileGPS; 363 356 _ephStreamGlonass = _ephStreamGPS; … … 367 360 _ephStreamSBAS = _ephStreamGPS; 368 361 } 369 else if (_rinexVers == 2){362 else { 370 363 QString ephFileNameGlonass = _ephPath + "BRDC" + 371 364 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + … … 388 381 // Header - RINEX Version 3 389 382 // ------------------------ 390 if (_rinexVers == 3) {383 if (_rinexVers > 2) { 391 384 if ( ! (appendFlagGPS & QIODevice::Append)) { 392 385 QString line = QString().asprintf("%9.2f%11sN: GNSS NAV DATA M: Mixed%12sRINEX VERSION / TYPE\n", … … 415 408 // Headers - RINEX Version 2 416 409 // ------------------------- 417 else if (_rinexVers == 2){410 else { 418 411 if (! (appendFlagGPS & QIODevice::Append)) { 419 412 QString line = QString().asprintf("%9.2f%11sN: GPS NAV DATA%25sRINEX VERSION / TYPE\n", … … 470 463 QString strV2 = eph.toString(defaultRnxNavVersion2); 471 464 QString strV3 = eph.toString(defaultRnxNavVersion3); 465 QString strV4 = eph.toString(defaultRnxNavVersion4); 472 466 473 467 if (_rinexVers == 2 && eph.type() == t_eph::GLONASS) { 474 printOutputEph(printFile, _ephStreamGlonass, strV2, strV3 );468 printOutputEph(printFile, _ephStreamGlonass, strV2, strV3, strV4); 475 469 } 476 470 else if(_rinexVers == 2 && eph.type() == t_eph::GPS) { 477 printOutputEph(printFile, _ephStreamGPS, strV2, strV3 );471 printOutputEph(printFile, _ephStreamGPS, strV2, strV3, strV4); 478 472 } 479 473 else if (_rinexVers == 3) { 480 printOutputEph(printFile, _ephStreamGPS, strV2, strV3 );474 printOutputEph(printFile, _ephStreamGPS, strV2, strV3, strV4); 481 475 } 482 476 } … … 485 479 //////////////////////////////////////////////////////////////////////////// 486 480 void t_bncCore::printOutputEph(bool printFile, QTextStream* stream, 487 const QString& strV2, const QString& strV3) { 481 const QString& strV2, const QString& strV3, 482 const QString& strV4) { 488 483 489 484 // Output into file 490 485 // ---------------- 491 486 if (printFile && stream) { 492 if (_rinexVers == 2) {487 if (_rinexVers == 2) { 493 488 *stream << strV2.toLatin1(); 494 489 } 495 else {490 else if (_rinexVers == 3) { 496 491 *stream << strV3.toLatin1(); 492 } 493 else if (_rinexVers == 4) { 494 *stream << strV4.toLatin1(); 497 495 } 498 496 stream->flush();
Note:
See TracChangeset
for help on using the changeset viewer.