Changeset 9770 in ntrip
- Timestamp:
- Jun 22, 2022, 3:18:32 PM (3 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r9768 r9770 493 493 const QString& strV2, const QString& strV3, 494 494 const QString& strV4) { 495 QString strVx; 496 if (_rinexVers == 2) { 497 strVx = strV2; 498 } 499 else if (_rinexVers == 3) { 500 strVx = strV3; 501 } 502 else if (_rinexVers == 4) { 503 strVx = strV4; 504 } 495 505 496 506 // Output into file 497 507 // ---------------- 498 508 if (printFile && stream) { 499 if (_rinexVers == 2) { 500 *stream << strV2.toLatin1(); 501 } 502 else if (_rinexVers == 3) { 503 *stream << strV3.toLatin1(); 504 } 505 else if (_rinexVers == 4) { 506 *stream << strV4.toLatin1(); 507 } 509 *stream << strVx.toLatin1(); 508 510 stream->flush(); 509 511 } … … 516 518 QTcpSocket* sock = is.next(); 517 519 if (sock->state() == QAbstractSocket::ConnectedState) { 518 if (sock->write(strV 3.toLatin1()) == -1) {520 if (sock->write(strVx.toLatin1()) == -1) { 519 521 delete sock; 520 522 is.remove(); -
trunk/BNC/src/rinex/reqcedit.cpp
r9765 r9770 66 66 _rnxVersion = defaultRnxObsVersion2; 67 67 } 68 if (version == 3) {68 else if (version == 3) { 69 69 _rnxVersion = defaultRnxObsVersion3; 70 70 } 71 if (version == 4) {71 else if (version == 4) { 72 72 _rnxVersion = defaultRnxObsVersion4; 73 73 } -
trunk/BNC/src/rinex/rnxobsfile.cpp
r9760 r9770 65 65 bncSettings settings; 66 66 _writeRinexOnlyWithSklObsTypes = settings.value("rnxOnlyWithSKL").toBool(); 67 67 68 } 68 69 … … 71 72 t_rnxObsHeader::~t_rnxObsHeader() { 72 73 } 74 75 double t_rnxObsHeader::versionFromInt(int version) { 76 switch (version) { 77 case 2: 78 return defaultRnxObsVersion2; 79 case 3: 80 return defaultRnxObsVersion3; 81 case 4: 82 return defaultRnxObsVersion4; 83 default: 84 return defaultRnxObsVersion3; 85 } 86 } 87 73 88 74 89 // Read Header … … 175 190 else if (key == "# / TYPES OF OBSERV") { 176 191 if (_version == 0.0) { 177 _version = defaultRnxObsVersion 3;192 _version = defaultRnxObsVersion2; 178 193 } 179 194 QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly); … … 199 214 else if (key == "SYS / # / OBS TYPES") { 200 215 if (_version == 0.0) { 201 _version = defaultRnxObsVersion3; 216 bncSettings settings; 217 _version = versionFromInt(settings.value("rnxVersion").toInt()); 202 218 } 203 219 QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly); … … 315 331 _markerName = markerName; 316 332 317 if (version == 2) { 318 _version = defaultRnxObsVersion2; 319 } 320 else if (version == 3) { 321 _version = defaultRnxObsVersion3; 322 } 323 else if (version == 4) { 324 _version = defaultRnxObsVersion4; 325 } 333 _version = versionFromInt(version); 326 334 327 335 _comments << "Default set of observation types used"; -
trunk/BNC/src/rinex/rnxobsfile.h
r9760 r9770 52 52 53 53 double version() const {return _version;} 54 double versionFromInt(int version); 54 55 t_irc read(QTextStream* stream, int maxLines = 0); 55 56 void setDefault(const QString& markerName, int version);
Note:
See TracChangeset
for help on using the changeset viewer.