Changeset 10587 in ntrip for trunk/BNC/src/rinex
- Timestamp:
- Dec 10, 2024, 3:57:21 PM (7 weeks ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcanalyze.cpp
r10577 r10587 1019 1019 *_log << " " 1020 1020 << navFi.fileName() << ' ' << QString(": WRONG %2:%3\n") 1021 .arg(eph-> ephTypeStr(eph->ephType(), eph->prn(), 99.0))1021 .arg(eph->typeStr(eph->type(), eph->prn(), 99.0)) 1022 1022 .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1(); 1023 1023 } -
trunk/BNC/src/rinex/reqcedit.cpp
r10577 r10587 586 586 bool haveGPS = false; 587 587 bool haveGlonass = false; 588 QMap<t_eph::e_ type, bool> haveGnss;588 QMap<t_eph::e_system, bool> haveGnss; 589 589 for (int ii = 0; ii < _ephs.size(); ii++) { 590 590 const t_eph* eph = _ephs[ii]; 591 switch (eph-> type()) {591 switch (eph->system()) { 592 592 case t_eph::GPS: 593 593 haveGPS = true; … … 680 680 bncTime begTime = _begTime; 681 681 bncTime endTime = _endTime; 682 if (eph-> type() == t_eph::BDS) {682 if (eph->system() == t_eph::BDS) { 683 683 begTime += 14; 684 684 endTime += 14; … … 695 695 696 696 if (outNavFile.version() < 3.0) { 697 if (outNavFile.glonass() && eph-> type() != t_eph::GLONASS) {697 if (outNavFile.glonass() && eph->system() != t_eph::GLONASS) { 698 698 continue; 699 699 } 700 if (!outNavFile.glonass() && eph-> type() != t_eph::GPS) {700 if (!outNavFile.glonass() && eph->system() != t_eph::GPS) { 701 701 continue; 702 702 } 703 703 } 704 705 if (outNavFile.version() < 4.0) {706 if (eph->ephType() == t_eph::CNAV ||707 eph->ephType() == t_eph::CNV1 ||708 eph->ephType() == t_eph::CNV2 ||709 eph->ephType() == t_eph::CNV3) {710 continue;711 }712 }713 714 if (outNavFile.version() >= 4.0 &&715 eph->ephType() == t_eph::undefined) { // input files < version 4.0716 continue;717 }718 719 704 outNavFile.writeEph(eph); 720 705 } … … 739 724 740 725 if (isNew) { 741 if (eph-> type() == t_eph::GPS) {726 if (eph->system() == t_eph::GPS) { 742 727 ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph))); 743 728 } 744 else if (eph-> type() == t_eph::GLONASS) {729 else if (eph->system() == t_eph::GLONASS) { 745 730 ephs.append(new t_ephGlo(*dynamic_cast<t_ephGlo*>(eph))); 746 731 } 747 else if (eph-> type() == t_eph::Galileo) {732 else if (eph->system() == t_eph::Galileo) { 748 733 ephs.append(new t_ephGal(*dynamic_cast<t_ephGal*>(eph))); 749 734 } 750 else if (eph-> type() == t_eph::QZSS) {735 else if (eph->system() == t_eph::QZSS) { 751 736 ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph))); 752 737 } 753 else if (eph-> type() == t_eph::SBAS) {738 else if (eph->system() == t_eph::SBAS) { 754 739 ephs.append(new t_ephSBAS(*dynamic_cast<t_ephSBAS*>(eph))); 755 740 } 756 else if (eph-> type() == t_eph::BDS) {741 else if (eph->system() == t_eph::BDS) { 757 742 ephs.append(new t_ephBDS(*dynamic_cast<t_ephBDS*>(eph))); 758 743 } 759 else if (eph-> type() == t_eph::IRNSS) {744 else if (eph->system() == t_eph::IRNSS) { 760 745 ephs.append(new t_ephGPS(*dynamic_cast<t_ephGPS*>(eph))); 761 746 } -
trunk/BNC/src/rinex/rnxnavfile.cpp
r10577 r10587 149 149 //////////////////////////////////////////////////////////////////////////// 150 150 void t_rnxNavFile::read(QTextStream* stream) { 151 QString ephType;152 151 153 152 while (stream->status() == QTextStream::Ok && !stream->atEnd()) { … … 157 156 continue; 158 157 } 159 158 QString navType; 160 159 QStringList hlp = line.split(QRegExp("\\s+"), Qt::SkipEmptyParts); 161 QString key, prn, navSubType;160 QString prn; 162 161 char sys; 163 164 162 QString firstStr = hlp.at(0); 165 if (version() >= 3.0 && firstStr != ">") { 163 164 // RINEX version 3 165 if (version() >= 3.0 && 166 version() < 4.0 && firstStr != ">") { 166 167 prn = firstStr; 167 168 sys = prn[0].toLatin1(); 168 } 169 navType = ""; 170 } 171 // RINEX version 4 169 172 else if (version() >= 4.0 && firstStr == ">") { 170 key = hlp.at(1);173 QString key = hlp.at(1); 171 174 prn = hlp.at(2); 172 175 sys = prn[0].toLatin1(); 173 ephType = hlp.at(3);176 navType = hlp.at(3); 174 177 175 178 // ALL Non-EPH messages are currently ignored … … 194 197 sys == 'J' || sys == 'I') { 195 198 lines2skip = 3; 196 if ((sys == 'I' && ephType == "L1NV") || // I: KLOB, NEQN197 (sys == 'J' && ephType == "CNVX")) { // J: WIDE, JAPN198 navSubType = hlp.at(4);199 if ((sys == 'I' && navType == "L1NV") || // I: KLOB, NEQN 200 (sys == 'J' && navType == "CNVX")) { // J: WIDE, JAPN 201 QString navSubType = hlp.at(4); 199 202 if (navSubType == "KLOB") { 200 203 lines2skip += 1; … … 213 216 continue; 214 217 } 218 // RINEX version 2 215 219 else { 216 220 if (glonass()) { … … 226 230 lines << line; 227 231 if (sys == 'G') { 228 for (int ii = 1; ii < 8; ii++) { 232 int nLines = 8; 233 if (navType == "CNAV") { 234 nLines += 1; 235 } 236 if (navType == "CNV2") { 237 nLines += 2; 238 } 239 for (int ii = 1; ii < nLines; ii++) { 229 240 lines << stream->readLine(); 230 241 } … … 232 243 } 233 244 else if (sys == 'R') { 234 int n um= 4;245 int nLines = 4; 235 246 if (version() >= 3.05) { 236 n um+= 1;237 } 238 for (int ii = 1; ii < n um; ii++) {247 nLines += 1; 248 } 249 for (int ii = 1; ii < nLines; ii++) { 239 250 lines << stream->readLine(); 240 251 } … … 248 259 } 249 260 else if (sys == 'J') { 250 for (int ii = 1; ii < 8; ii++) { 261 int nLines = 8; 262 if (navType == "CNAV") { 263 nLines += 1; 264 } 265 if (navType == "CNV2") { 266 nLines += 2; 267 } 268 for (int ii = 1; ii < nLines; ii++) { 251 269 lines << stream->readLine(); 252 270 } … … 260 278 } 261 279 else if (sys == 'C') { 262 for (int ii = 1; ii < 8; ii++) { 280 int nLines = 8; 281 if (navType == "CNV1" || 282 navType == "CNV2") { 283 nLines += 2; 284 } 285 if (navType == "CNV3") { 286 nLines += 1; 287 } 288 for (int ii = 1; ii < nLines; ii++) { 263 289 lines << stream->readLine(); 264 290 } … … 266 292 } 267 293 else if (sys == 'I') { 268 for (int ii = 1; ii < 8; ii++) { 294 int nLines = 8; 295 if (navType == "L1NV") { 296 nLines += 1; 297 } 298 for (int ii = 1; ii < nLines; ii++) { 269 299 lines << stream->readLine(); 270 300 } … … 272 302 } 273 303 274 if (version() >= 4.0 && key == "EPH") {275 if (eph->setEphType(ephType) != success) {276 delete eph;277 continue;278 }279 }280 281 304 if (eph) { 305 eph->setType(navType); 282 306 _ephs.push_back(eph); 283 307 } 308 284 309 } 285 310 } … … 363 388 else { 364 389 QString fmt; 365 t_eph::e_ typesys = satSystem();390 t_eph::e_system sys = satSystem(); 366 391 switch(sys) { 367 392 case t_eph::GPS: -
trunk/BNC/src/rinex/rnxnavfile.h
r10127 r10587 38 38 #define defaultRnxNavVersion2 2.11 39 39 #define defaultRnxNavVersion3 3.05 40 #define defaultRnxNavVersion4 4.0 140 #define defaultRnxNavVersion4 4.02 41 41 42 42 class t_rnxNavFile { … … 52 52 double _version; 53 53 bool _glonass; 54 t_eph::e_ type_satSys;55 QStringList _comments;56 QStringList _runByDate;54 t_eph::e_system _satSys; 55 QStringList _comments; 56 QStringList _runByDate; 57 57 }; 58 58 … … 67 67 QStringList comments() const {return _header._comments;} 68 68 QStringList runByDate() const {return _header._runByDate;} 69 t_eph::e_ typesatSystem() const {return _header._satSys;}69 t_eph::e_system satSystem() const {return _header._satSys;} 70 70 void setGlonass(bool glo) {_header._glonass = glo;} 71 void setGnssTypeV3(t_eph::e_ type sys) {_header._satSys = sys;}71 void setGnssTypeV3(t_eph::e_system system) {_header._satSys = system;} 72 72 void writeHeader(const QMap<QString, QString>* txtMap = 0, int numMergedFiles = 0, int leapSecs = 0); 73 73 void writeEph(const t_eph* eph); -
trunk/BNC/src/rinex/rnxobsfile.h
r10532 r10587 40 40 #define defaultRnxObsVersion2 2.11 41 41 #define defaultRnxObsVersion3 3.05 42 #define defaultRnxObsVersion4 4.0 142 #define defaultRnxObsVersion4 4.02 43 43 44 44 class t_rnxObsHeader {
Note:
See TracChangeset
for help on using the changeset viewer.