Changeset 10614 in ntrip for trunk/BNC/src/rinex/reqcedit.cpp
- Timestamp:
- Feb 28, 2025, 5:53:12 PM (9 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcedit.cpp
r10603 r10614 75 75 _begTime = bncTime(settings.value("reqcStartDateTime").toString().toLatin1().data()); 76 76 _endTime = bncTime(settings.value("reqcEndDateTime").toString().toLatin1().data()); 77 78 _checkEph = false; 77 79 78 80 } … … 171 173 while (it.hasNext()) { 172 174 QString fileName = it.next(); 173 if (fileName.indexOf('*') != -1 || fileName.indexOf('?') != -1) { 175 if (fileName.indexOf('*') != -1 || 176 fileName.indexOf('?') != -1) { 174 177 QFileInfo fileInfo(fileName); 175 178 QDir dir = fileInfo.dir(); … … 316 319 t_rnxObsFile* obsFile = _rnxObsFiles[ii]; 317 320 if (_log) { 318 *_log << " ProcessingFile: " << obsFile->fileName() << " start: "321 *_log << "Input Obs File: " << obsFile->fileName() << " start: " 319 322 << obsFile->startTime().datestr().c_str() << ' ' 320 323 << obsFile->startTime().timestr(0).c_str() << Qt::endl; … … 520 523 //////////////////////////////////////////////////////////////////////////// 521 524 void t_reqcEdit::readEphemerides(const QStringList& navFileNames, 522 QVector<t_eph*>& ephs) { 525 QVector<t_eph*>& ephs, QTextStream* log, 526 bool checkEph) { 523 527 524 528 QStringListIterator it(navFileNames); 525 529 while (it.hasNext()) { 526 530 QString fileName = it.next(); 527 if (fileName.indexOf('*') != -1 || fileName.indexOf('?') != -1) { 531 if (fileName.indexOf('*') != -1 || 532 fileName.indexOf('?') != -1) { 528 533 QFileInfo fileInfo(fileName); 529 534 QDir dir = fileInfo.dir(); … … 532 537 while (it.hasNext()) { 533 538 QString filePath = it.next().filePath(); 534 appendEphemerides(filePath, ephs );539 appendEphemerides(filePath, ephs, log, checkEph); 535 540 } 536 541 } 537 542 else { 538 appendEphemerides(fileName, ephs );543 appendEphemerides(fileName, ephs, log, checkEph); 539 544 } 540 545 } … … 565 570 while (it.hasNext()) { 566 571 QString fileName = it.next(); 572 567 573 t_rnxNavFile rnxNavFile(fileName, t_rnxNavFile::input); 568 574 QStringListIterator itCmnt(rnxNavFile.comments()); … … 580 586 // Read Ephemerides 581 587 // ---------------- 582 t_reqcEdit::readEphemerides(_navFileNames, _ephs );588 t_reqcEdit::readEphemerides(_navFileNames, _ephs, _log, _checkEph); 583 589 584 590 // Check Satellite Systems … … 709 715 //////////////////////////////////////////////////////////////////////////// 710 716 void t_reqcEdit::appendEphemerides(const QString& fileName, 711 QVector<t_eph*>& ephs) { 717 QVector<t_eph*>& ephs, QTextStream* log, 718 bool checkEph) { 712 719 t_rnxNavFile rnxNavFile(fileName, t_rnxNavFile::input); 720 unsigned numOK = 0; 721 unsigned numBad = 0; 722 unsigned numUnhealthy = 0; 723 bncEphUser ephUser(false); 724 725 if (log) { 726 QFileInfo navFi(rnxNavFile.fileName()); 727 *log << "Input Nav File : " << navFi.fileName() << Qt::endl; 728 if (checkEph) { 729 *log << "RINEX Version : " << rnxNavFile.version() << Qt::endl; 730 } 731 } 732 713 733 for (unsigned ii = 0; ii < rnxNavFile.ephs().size(); ii++) { 714 734 t_eph* eph = rnxNavFile.ephs()[ii]; … … 724 744 725 745 if (isNew) { 726 if (eph->system() == t_eph::GPS && 727 eph->type() == t_eph::LNAV) { 746 747 if (checkEph) { 748 ephUser.putNewEph(eph, false); 749 if (eph->checkState() == t_eph::bad) { 750 ++numBad; 751 } 752 else if (eph->checkState() == t_eph::unhealthy) { 753 ++numUnhealthy; 754 } 755 else { 756 ++numOK; 757 } 758 if (eph->checkState() == t_eph::bad) { 759 continue; 760 } 761 } 762 763 if (eph->system() == t_eph::GPS) { 728 764 ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph))); 729 765 } 730 else if (eph->system() == t_eph::GLONASS && 731 eph->type() == t_eph::FDMA_M) { 766 else if (eph->system() == t_eph::GLONASS) { 732 767 ephs.append(new t_ephGlo(*dynamic_cast<t_ephGlo*>(eph))); 733 768 } 734 else if (eph->system() == t_eph::Galileo && 735 eph->type() == t_eph::INAV) { 769 else if (eph->system() == t_eph::Galileo) { 736 770 ephs.append(new t_ephGal(*dynamic_cast<t_ephGal*>(eph))); 737 771 } 738 else if (eph->system() == t_eph::QZSS && 739 eph->type() == t_eph::LNAV) { 772 else if (eph->system() == t_eph::QZSS) { 740 773 ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph))); 741 774 } 742 else if (eph->system() == t_eph::SBAS && 743 eph->type() == t_eph::SBASL1) { 775 else if (eph->system() == t_eph::SBAS) { 744 776 ephs.append(new t_ephSBAS(*dynamic_cast<t_ephSBAS*>(eph))); 745 777 } 746 else if (eph->system() == t_eph::BDS && 747 (eph->type() == t_eph::D1 || 748 eph->type() == t_eph::D2)) { 778 else if (eph->system() == t_eph::BDS) { 749 779 ephs.append(new t_ephBDS(*dynamic_cast<t_ephBDS*>(eph))); 750 780 } 751 else if (eph->system() == t_eph::IRNSS && 752 eph->type() == t_eph::LNAV) { 781 else if (eph->system() == t_eph::IRNSS) { 753 782 ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph))); 754 783 } 755 784 } 785 } 786 787 if (log && checkEph) { 788 *log << "Ephemeris Check : " << numOK << " OK " 789 << numUnhealthy << " UNHEALTHY " 790 << numBad << " WRONG\n"; 791 if (numBad > 0) { 792 for (unsigned ii = 0; ii < rnxNavFile.ephs().size(); ii++) { 793 t_eph* eph = rnxNavFile.ephs()[ii]; 794 QFileInfo navFi(fileName); 795 if (eph->checkState() == t_eph::bad) { 796 if (log) { 797 *log << " : " 798 << QString("WRONG %2:%3\n") 799 .arg(eph->typeStr(eph->type(), eph->prn(), 99.0)) 800 .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1(); 801 } 802 } 803 } 804 } 805 *log << Qt::endl; 756 806 } 757 807 }
Note:
See TracChangeset
for help on using the changeset viewer.