Changeset 10614 in ntrip
- Timestamp:
- Feb 28, 2025, 5:53:12 PM (4 hours ago)
- Location:
- trunk/BNC/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/ephemeris.cpp
r10603 r10614 266 266 ////////////////////////////////////////////////////////////////////////////// 267 267 t_ephGPS::t_ephGPS(double rnxVersion, const QStringList &lines, QString typeStr) { 268 268 269 269 setType(typeStr); 270 270 271 271 int nLines = 8; // LNAV 272 272 // Source RINEX version < 4 … … 1057 1057 // Source RINEX version < 4 1058 1058 if (type() == t_eph::undefined) { 1059 _type = t_eph::FDMA; 1059 // cannot be determined from input data 1060 // but is set to be able to work with old RINEX files in BNC applications 1061 _type = t_eph::FDMA_M; 1060 1062 } 1061 1063 … … 1065 1067 _M_delta_tau = 0.9999e9; // unknown 1066 1068 _M_FT = 1.5e1; // unknown 1069 _statusflags_unknown = true; 1070 _healthflags_unknown = true; 1067 1071 } 1068 1072 … … 1150 1154 // ===================== 1151 1155 else if (iLine == 2) { 1152 if (type() == t_eph::FDMA) { 1156 if (type() == t_eph::FDMA || 1157 type() == t_eph::FDMA_M) { 1153 1158 if ( readDbl(line, pos[0], fieldLen, _y_pos) 1154 1159 || readDbl(line, pos[1], fieldLen, _y_vel) … … 1174 1179 // ===================== 1175 1180 else if (iLine == 3) { 1176 if (type() == t_eph::FDMA) { 1181 if (type() == t_eph::FDMA || 1182 type() == t_eph::FDMA_M) { 1177 1183 if ( readDbl(line, pos[0], fieldLen, _z_pos) 1178 1184 || readDbl(line, pos[1], fieldLen, _z_vel) … … 1206 1212 // ===================== 1207 1213 else if (iLine == 4) { 1208 if (type() == t_eph::FDMA) { 1214 if (type() == t_eph::FDMA || 1215 type() == t_eph::FDMA_M) { 1209 1216 if (readDbl(line, pos[0], fieldLen, statusflags)) { 1210 1217 //status flags BLK, do nothing … … 1239 1246 _M_tau_GPS = 0.0; 1240 1247 _M_delta_tau = 0.0; 1248 _type = t_eph::FDMA; 1241 1249 } 1242 1250 else { -
trunk/BNC/src/ephemeris.h
r10603 r10614 276 276 _angular_rate_max = 0.0; 277 277 _data_validity = 0; 278 _healthflags_unknown = false;279 _statusflags_unknown = false;278 _healthflags_unknown = true; 279 _statusflags_unknown = true; 280 280 _almanac_health = 0.0; 281 281 _almanac_health_availablility_indicator = 0.0; -
trunk/BNC/src/rinex/reqcanalyze.cpp
r10605 r10614 75 75 analyzePlotSignals(); 76 76 77 _checkEph = true; 78 77 79 qRegisterMetaType< QVector<t_skyPlotData> >("QVector<t_skyPlotData>"); 78 80 … … 121 123 } 122 124 123 // Check Ephemerides124 // -----------------125 checkEphemerides();126 127 125 // Initialize RINEX Observation Files 128 126 // ---------------------------------- … … 131 129 // Read Ephemerides 132 130 // ---------------- 133 t_reqcEdit::readEphemerides(_navFileNames, _ephs );131 t_reqcEdit::readEphemerides(_navFileNames, _ephs, _log, _checkEph); 134 132 135 133 // Loop over all RINEX Files … … 968 966 // 969 967 //////////////////////////////////////////////////////////////////////////// 970 void t_reqcAnalyze::checkEphemerides() {971 972 QString navFileName;973 QStringListIterator namIt(_navFileNames);974 bool firstName = true;975 while (namIt.hasNext()) {976 QFileInfo navFi(namIt.next());977 if (firstName) {978 firstName = false;979 navFileName += navFi.fileName();980 }981 else {982 navFileName += ", " + navFi.fileName();983 }984 }985 if (_log) {986 *_log << "Navigation File(s) : " << navFileName << Qt::endl;987 }988 QStringListIterator it(_navFileNames);989 while (it.hasNext()) {990 const QString& fileName = it.next();991 unsigned numOK = 0;992 unsigned numBad = 0;993 unsigned numUnhealthy = 0;994 bncEphUser ephUser(false);995 t_rnxNavFile rnxNavFile(fileName, t_rnxNavFile::input);996 for (unsigned ii = 0; ii < rnxNavFile.ephs().size(); ii++) {997 t_eph* eph = rnxNavFile.ephs()[ii];998 ephUser.putNewEph(eph, false);999 if (eph->checkState() == t_eph::bad) {1000 ++numBad;1001 }1002 else if (eph->checkState() == t_eph::unhealthy) {1003 ++numUnhealthy;1004 }1005 else {1006 ++numOK;1007 }1008 }1009 if (_log) {1010 *_log << "Ephemeris : " << numOK << " OK "1011 << numUnhealthy << " UNHEALTHY "1012 << numBad << " WRONG\n";1013 if (numBad > 0) {1014 for (unsigned ii = 0; ii < rnxNavFile.ephs().size(); ii++) {1015 t_eph* eph = rnxNavFile.ephs()[ii];1016 QFileInfo navFi(fileName);1017 if (eph->checkState() == t_eph::bad) {1018 *_log << " "1019 << navFi.fileName() << ' ' << QString(": WRONG %2:%3\n")1020 .arg(eph->typeStr(eph->type(), eph->prn(), 99.0))1021 .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1();1022 }1023 }1024 }1025 *_log << Qt::endl;1026 }1027 }1028 }1029 1030 968 void t_reqcAnalyze::setExpectedObs(const bncTime& startTime, const bncTime& endTime, 1031 969 double interval, const ColumnVector& xyzSta) { 1032 1033 1034 970 for(QMap<t_prn, int>::iterator it = _numExpObs.begin(); it != _numExpObs.end(); it++) { 1035 971 t_eph* eph = 0; -
trunk/BNC/src/rinex/reqcanalyze.h
r8756 r10614 179 179 180 180 private: 181 void checkEphemerides();182 181 183 182 void analyzePlotSignals(); … … 202 201 203 202 static bool mpLessThan(const t_polarPoint* p1, const t_polarPoint* p2); 204 203 205 204 QString _logFileName; 206 205 QFile* _logFile; 207 206 QTextStream* _log; 207 bool _checkEph; 208 208 QStringList _obsFileNames; 209 209 QVector<t_rnxObsFile*> _rnxObsFiles; -
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 } -
trunk/BNC/src/rinex/reqcedit.h
r8397 r10614 51 51 QTextStream* log); 52 52 static void readEphemerides(const QStringList& navFileNames, 53 QVector<t_eph*>& ephs); 54 static void appendEphemerides(const QString& fileName, QVector<t_eph*>& ephs); 53 QVector<t_eph*>& ephs, QTextStream* log, 54 bool checkEph); 55 static void appendEphemerides(const QString& fileName, 56 QVector<t_eph*>& ephs, 57 QTextStream* log, bool checkEph); 55 58 56 59 private: … … 65 68 QFile* _logFile; 66 69 QTextStream* _log; 70 bool _checkEph; 67 71 QStringList _obsFileNames; 68 72 QVector<t_rnxObsFile*> _rnxObsFiles; -
trunk/BNC/src/rinex/rnxnavfile.h
r10587 r10614 62 62 t_eph* getNextEph(const bncTime& tt, const QMap<QString, unsigned int>* corrIODs); 63 63 const std::vector<t_eph*> ephs() const {return _ephs;} 64 const QString& fileName() const {return _fileName;} 64 65 double version() const {return _header._version;} 65 66 void setVersion(double version) {_header._version = version;}
Note:
See TracChangeset
for help on using the changeset viewer.