Changeset 4229 in ntrip
- Timestamp:
- May 30, 2012, 8:51:49 AM (12 years ago)
- Location:
- trunk/BNC/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/rinex/reqcedit.cpp
r4221 r4229 45 45 46 46 using namespace std; 47 48 const double rnxV2 = 2.11; 49 const double rnxV3 = 3.01; 47 50 48 51 // Constructor … … 58 61 int version = settings.value("reqcRnxVersion").toInt(); 59 62 if (version < 3) { 60 _rnxVersion = 2.11;63 _rnxVersion = rnxV2; 61 64 } 62 65 else { 63 _rnxVersion = 3.01;66 _rnxVersion = rnxV3; 64 67 } 65 68 _samplingRate = settings.value("reqcSampling").toInt(); … … 298 301 qStableSort(_ephs.begin(), _ephs.end(), t_eph::earlierTime); 299 302 303 // Check Satellite Systems 304 // ----------------------- 305 bool haveGPS = false; 306 bool haveGlonass = false; 307 for (int ii = 0; ii < _ephs.size(); ii++) { 308 const t_eph* eph = _ephs[ii]; 309 if (eph->type() == t_eph::GPS) { 310 haveGPS = true; 311 } 312 else if (eph->type() == t_eph::GLONASS) { 313 haveGlonass = true; 314 } 315 } 316 300 317 // Initialize output navigation file 301 318 // --------------------------------- 302 319 t_rnxNavFile outNavFile(_outNavFileName, t_rnxNavFile::output); 303 outNavFile.setVersion(_rnxVersion); 320 321 outNavFile.setGlonass(haveGlonass); 322 323 if (haveGPS && haveGlonass) { 324 outNavFile.setVersion(rnxV3); 325 } 326 else { 327 outNavFile.setVersion(_rnxVersion); 328 } 329 304 330 bncSettings settings; 305 331 QMap<QString, QString> txtMap; … … 312 338 txtMap["COMMENT"] = comment; 313 339 } 340 314 341 outNavFile.writeHeader(&txtMap); 315 342 … … 318 345 for (int ii = 0; ii < _ephs.size(); ii++) { 319 346 const t_eph* eph = _ephs[ii]; 320 if (eph->type() == t_eph::GPS || _rnxVersion >= 3.0) { 321 outNavFile.writeEph(eph); 322 } 347 outNavFile.writeEph(eph); 323 348 } 324 349 } -
trunk/BNC/rinex/rnxnavfile.h
r4219 r4229 58 58 void setVersion(double version) {_header._version = version;} 59 59 bool glonass() const {return _header._glonass;} 60 void setGlonass(bool glo) {_header._glonass = glo;} 60 61 void writeHeader(const QMap<QString, QString>* txtMap = 0); 61 62 void writeEph(const t_eph* eph);
Note:
See TracChangeset
for help on using the changeset viewer.