Changeset 8354 in ntrip for trunk/BNC/src/rinex
- Timestamp:
- May 18, 2018, 2:24:46 PM (7 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcedit.cpp
r8204 r8354 561 561 bool haveGPS = false; 562 562 bool haveGlonass = false; 563 QMap<t_eph::e_type, bool> haveGnss; 563 564 for (int ii = 0; ii < _ephs.size(); ii++) { 564 565 const t_eph* eph = _ephs[ii]; 565 if (eph->type() == t_eph::GPS) { 566 haveGPS = true; 567 } 568 else if (eph->type() == t_eph::GLONASS) { 569 haveGlonass = true; 566 switch (eph->type()) { 567 case t_eph::GPS: 568 haveGPS = true; 569 haveGnss[t_eph::GLONASS] = true; 570 break; 571 case t_eph::GLONASS: 572 haveGlonass = true; 573 haveGnss[t_eph::GPS] = true; 574 break; 575 case t_eph::Galileo: 576 haveGnss[t_eph::Galileo] = true; 577 break; 578 case t_eph::BDS: 579 haveGnss[t_eph::BDS] = true; 580 break; 581 case t_eph::QZSS: 582 haveGnss[t_eph::QZSS] = true; 583 break; 584 case t_eph::IRNSS: 585 haveGnss[t_eph::IRNSS] = true; 586 break; 587 case t_eph::SBAS: 588 haveGnss[t_eph::SBAS] = true; 589 break; 590 default: 591 haveGnss[t_eph::unknown] = true; 570 592 } 571 593 } … … 582 604 else { 583 605 outNavFile.setVersion(defaultRnxNavVersion2); 606 } 607 608 if (outNavFile.version() > 3.0) { 609 if (haveGnss.size() > 1) { 610 outNavFile.setGnssTypeV3(t_eph::unknown); 611 } 612 else if (haveGnss.size() == 1){ 613 outNavFile.setGnssTypeV3(haveGnss.firstKey()); 614 } 584 615 } 585 616 -
trunk/BNC/src/rinex/rnxnavfile.cpp
r8204 r8354 294 294 } 295 295 else { 296 *_stream << QString("%1 N: GNSS NAV DATA M: MIXED") 296 QString fmt; 297 t_eph::e_type sys = satSystem(); 298 switch(sys) { 299 case t_eph::GPS: 300 fmt.append("%1 N: GNSS NAV DATA G: GPS"); 301 break; 302 case t_eph::GLONASS: 303 fmt.append("%1 N: GNSS NAV DATA R: GLONASS"); 304 break; 305 case t_eph::Galileo: 306 fmt.append("%1 N: GNSS NAV DATA E: Galileo"); 307 break; 308 case t_eph::QZSS: 309 fmt.append("%1 N: GNSS NAV DATA J: QZSS"); 310 break; 311 case t_eph::BDS: 312 fmt.append("%1 N: GNSS NAV DATA C: BDS"); 313 break; 314 case t_eph::IRNSS: 315 fmt.append("%1 N: GNSS NAV DATA I: IRNSS"); 316 break; 317 case t_eph::SBAS: 318 fmt.append("%1 N: GNSS NAV DATA S: SBAS"); 319 break; 320 case t_eph::unknown: 321 fmt.append("%1 N: GNSS NAV DATA M: MIXED"); 322 break; 323 } 324 *_stream << fmt 297 325 .arg(_header._version, 9, 'f', 2) 298 326 .leftJustified(60) -
trunk/BNC/src/rinex/rnxnavfile.h
r8127 r8354 30 30 #include "bncconst.h" 31 31 #include "bnctime.h" 32 #include "ephemeris.h" 32 33 33 34 class t_pppOpt; … … 50 51 double _version; 51 52 bool _glonass; 53 t_eph::e_type _satSys; 52 54 QStringList _comments; 53 55 }; … … 62 64 bool glonass() const {return _header._glonass;} 63 65 QStringList comments() const {return _header._comments;} 66 t_eph::e_type satSystem() const {return _header._satSys;} 64 67 void setGlonass(bool glo) {_header._glonass = glo;} 68 void setGnssTypeV3(t_eph::e_type sys) {_header._satSys = sys;} 65 69 void writeHeader(const QMap<QString, QString>* txtMap = 0); 66 70 void writeEph(const t_eph* eph);
Note:
See TracChangeset
for help on using the changeset viewer.