Changeset 8351 in ntrip
- Timestamp:
- May 18, 2018, 9:56:20 AM (7 years ago)
- Location:
- branches/BNC_2.12/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/bnccore.cpp
r8286 r8351 305 305 QString ephFileNameGPS = _ephPath + "BRDC"; 306 306 307 bool ephV3 filenames = settings.value("ephV3filenames").toBool();307 bool ephV3 = (_rinexVers == 3) ? true : false; 308 308 309 309 QString hlpStr = bncRinex::nextEpochStr(datTim, 310 settings.value("ephIntr").toString(), ephV3 filenames);310 settings.value("ephIntr").toString(), ephV3); 311 311 312 312 if (_rinexVers == 3) { 313 if (ephV3filenames) { 314 QString country = "WRD"; // WORLD 315 QString monNum = "0"; 316 QString recNum = "0"; 317 ephFileNameGPS += QString("%1").arg(monNum, 1, 10) + 318 QString("%1").arg(recNum, 1, 10) + 319 country + 320 "_S_" + // stream 321 QString("%1").arg(datTim.date().year()) + 322 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 323 hlpStr + // HM_period 324 "_MN.rnx"; // mixed BRDC 325 } 326 else { // RNX v3 with old filenames 327 ephFileNameGPS += QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 328 hlpStr + datTim.toString(".yyP"); 329 } 313 QString country = "WRD"; // WORLD 314 QString monNum = "0"; 315 QString recNum = "0"; 316 ephFileNameGPS += QString("%1").arg(monNum, 1, 10) + 317 QString("%1").arg(recNum, 1, 10) + 318 country + 319 "_S_" + // stream 320 QString("%1").arg(datTim.date().year()) + 321 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 322 hlpStr + // HM_period 323 "_MN.rnx"; // mixed BRDC 330 324 } 331 325 else { // RNX v2.11 -
branches/BNC_2.12/src/bncmain.cpp
r8172 r8351 109 109 " rnxV2Priority {Priority of signal attributes [character string, list separated by blank character, example: G:12&PWCSLXYN G:5&IQX C:IQX]}\n" 110 110 " rnxV3 {Produce version 3 file contents [integer number: 0=no,2=yes]}\n" 111 " rnxV3filenames {Produce version 3 filenames [integer number: 0=no,2=yes]}\n"112 111 "\n" 113 112 "RINEX Ephemeris Panel keys:\n" … … 116 115 " ephOutPort {Output port [integer number]}\n" 117 116 " ephV3 {Produce version 3 file contents [integer number: 0=no,2=yes]}\n" 118 " ephV3filenames {Produce version 3 filenames [integer number: 0=no,2=yes]}\n"119 117 "\n" 120 118 "RINEX Editing and QC Panel keys:\n" -
branches/BNC_2.12/src/bncrinex.cpp
r8289 r8351 94 94 _writeRinexFileOnlyWithSkl = settings.value("rnxOnlyWithSKL").toBool(); 95 95 96 _rnxV3 filenames = settings.value("rnxV3filenames").toBool();96 _rnxV3 = (Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) ? true : false; 97 97 } 98 98 … … 209 209 //////////////////////////////////////////////////////////////////////////// 210 210 QString bncRinex::nextEpochStr(const QDateTime& datTim, 211 const QString& intStr, bool rnxV3 filenames,211 const QString& intStr, bool rnxV3, 212 212 QDateTime* nextEpoch) { 213 213 … … 221 221 if ( indHlp != -1) { 222 222 int step = intStr.left(indHlp-1).toInt(); 223 if (rnxV3 filenames) {223 if (rnxV3) { 224 224 epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H 225 225 } else { … … 248 248 } 249 249 } 250 if (rnxV3 filenames) {250 if (rnxV3) { 251 251 epoStr += QString("_%1M").arg(step, 2, 10, QChar('0')); // period 252 252 } … … 254 254 else if (intStr == "1 hour") { 255 255 int step = intStr.left(indHlp-1).toInt(); 256 if (rnxV3 filenames) {256 if (rnxV3) { 257 257 epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H 258 258 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // M … … 272 272 else { 273 273 int step = intStr.left(indHlp-1).toInt(); 274 if (rnxV3 filenames) {274 if (rnxV3) { 275 275 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // H 276 276 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // M … … 303 303 304 304 QString hlpStr = nextEpochStr(datTim, settings.value("rnxIntr").toString(), 305 _rnxV3 filenames, &_nextCloseEpoch);305 _rnxV3, &_nextCloseEpoch); 306 306 307 307 int statIDlength = _statID.size() -1; … … 335 335 } 336 336 337 if (_rnxV3 filenames) {337 if (_rnxV3) { 338 338 QString country; 339 339 QString monNum = "0"; … … 362 362 "_MO" + // mixed OBS 363 363 distStr + 364 ".rnx"; 364 ".rnx"; 365 365 } 366 366 else { -
branches/BNC_2.12/src/bncrinex.h
r7179 r8351 47 47 static QString nextEpochStr(const QDateTime& datTim, 48 48 const QString& intStr, 49 bool rnxV3 filenames,49 bool rnxV3, 50 50 QDateTime* nextEpoch = 0); 51 51 static std::string asciiSatLine(const t_satObs& obs); … … 70 70 QString _sklName; 71 71 bool _writeRinexFileOnlyWithSkl; 72 bool _rnxV3 filenames;72 bool _rnxV3; 73 73 QByteArray _latitude; 74 74 QByteArray _longitude; -
branches/BNC_2.12/src/bncsettings.cpp
r8172 r8351 92 92 setValue_p("rnxScript", ""); 93 93 setValue_p("rnxV3", "0"); 94 setValue_p("rnxV3filenames", "0");95 94 // RINEX Ephemeris 96 95 setValue_p("ephPath", ""); … … 98 97 setValue_p("ephOutPort", ""); 99 98 setValue_p("ephV3", "0"); 100 setValue_p("ephV3filenames", "0");101 99 // Reqc 102 100 setValue_p("reqcAction", ""); … … 110 108 setValue_p("reqcRnxVersion", ""); 111 109 setValue_p("reqcSampling", ""); 112 setValue_p("reqcStartDateTime", " ");113 setValue_p("reqcEndDateTime", " ");110 setValue_p("reqcStartDateTime", "1967-11-02T00:00:00"); 111 setValue_p("reqcEndDateTime", "2099-01-01T00:00:00"); 114 112 setValue_p("reqcLogSummaryOnly", ""); 115 113 setValue_p("reqcRunBy", ""); … … 121 119 setValue_p("reqcOldReceiverName", ""); 122 120 setValue_p("reqcNewReceiverName", ""); 121 setValue_p("reqcOldAntennaNumber", ""); 123 122 setValue_p("reqcNewAntennaNumber",""); 123 setValue_p("reqcOldAntennadE", ""); 124 124 setValue_p("reqcNewAntennadE", ""); 125 setValue_p("reqcOldAntennadN", ""); 125 126 setValue_p("reqcNewAntennadN", ""); 127 setValue_p("reqcOldAntennadU", ""); 126 128 setValue_p("reqcNewAntennadU", ""); 129 setValue_p("reqcOldReceiverNumber", ""); 127 130 setValue_p("reqcNewReceiverNumber", ""); 128 setValue_p("reqcOldAntennaNumber", ""); 129 setValue_p("reqcOldAntennadE", ""); 130 setValue_p("reqcOldAntennadN", ""); 131 setValue_p("reqcOldAntennadU", ""); 132 setValue_p("reqcOldReceiverNumber", ""); 131 133 132 setValue_p("reqcUseObsTypes", ""); 134 133 setValue_p("reqcV2Priority", "G:12&PWCSLXYN_ G:5&IQX_ R:12&PC_ R:3&IQX_ E:16&BCX_ E:578&IQX_ J:1&SLXCZ_ J:26&SLX_ J:5&IQX_ C:IQX_ I:ABCX_ S:1&C_ S:5&IQX_"); -
branches/BNC_2.12/src/bncwindow.cpp
r8280 r8351 219 219 _rnxV3CheckBox = new QCheckBox(); 220 220 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt())); 221 _rnxV3filenameCheckBox = new QCheckBox();222 _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt()));223 221 QString hlp = settings.value("rnxV2Priority").toString(); 224 222 if (hlp.isEmpty()) { … … 245 243 _ephV3CheckBox = new QCheckBox(); 246 244 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt())); 247 248 _ephV3filenameCheckBox = new QCheckBox();249 _ephV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("ephV3filenames").toInt()));250 245 251 246 connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString &)), … … 698 693 oLayout->addWidget(new QLabel("Version 3"), 6, 0); 699 694 oLayout->addWidget(_rnxV3CheckBox, 6, 1); 700 oLayout->addWidget(new QLabel("Version 3 filenames"), 6, 2);701 oLayout->addWidget(_rnxV3filenameCheckBox, 6, 3);702 695 oLayout->addWidget(new QLabel(""), 7, 1); 703 696 oLayout->setRowStretch(8, 999); … … 721 714 eLayout->addWidget(new QLabel("Version 3"), 4, 0); 722 715 eLayout->addWidget(_ephV3CheckBox, 4, 1); 723 eLayout->addWidget(new QLabel("Version 3 filenames"), 4, 2);724 eLayout->addWidget(_ephV3filenameCheckBox, 4, 3);725 716 eLayout->setRowStretch(5, 999); 726 717 … … 1251 1242 _rnxV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified as equal for all systems, as system specific or as system and freq. specific. For example: </li><ul><li>'CWPX_?' (General signal priorities valid for all GNSS) </li><li>'C:IQX I:ABCX' (System specific signal priorities for BDS and IRNSS) </li><li>'G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities) </li></ul>Default is the following priority list 'G:12&PWCSLXYN_ G:5&IQX_ R:12&PC_ R:3&IQX_ E:16&BCX_ E:578&IQX_ J:1&SLXCZ_ J:26&SLX_ J:5&IQX_ C:IQX_ I:ABCX_ S:1&C_ S:5&IQX_'.</p>")); 1252 1243 _rnxV3CheckBox->setWhatsThis(tr("<p>The default format for RINEX Observation files is RINEX Version 2.</p><p>Select 'Version 3' if you want to save observations in RINEX Version 3 format.</p>")); 1253 _rnxV3filenameCheckBox->setWhatsThis(tr("<p>Tick 'Version 3 filenames' to let BNC create so-called extended filenames following the RINEX Version 3 standard.</p><p>Default is an empty check box, meaning to create filenames following the RINEX Version 2 standard although the file content is saved in RINEX Version 3 format.</p>"));1254 1244 1255 1245 // WhatsThis, RINEX Ephemeris … … 1259 1249 _ephOutPortLineEdit->setWhatsThis(tr("<p>BNC can produce ephemeris data in RINEX Navigation ASCII format on your local host through an IP port.</p><p>Specify a port number here to activate this function.</p>")); 1260 1250 _ephV3CheckBox->setWhatsThis(tr("<p>The default format for output of RINEX Navigation data containing Broadcast Ephemeris is RINEX Version 2.</p><p>Select 'Version 3' if you want to output ephemeris in RINEX Version 3 format.</p>")); 1261 _ephV3filenameCheckBox->setWhatsThis(tr("<p>Tick 'Version 3 filenames' to let BNC create so-called extended filenames following the RINEX Version 3 standard.</p><p>Default is an empty check box, meaning to create filenames following the RINEX Version 2 standard although the file content is saved in RINEX Version 3 format.</p>"));1262 1251 1263 1252 // WhatsThis, RINEX Editing & QC … … 1455 1444 delete _rnxScrpLineEdit; 1456 1445 delete _rnxV3CheckBox; 1457 delete _rnxV3filenameCheckBox;1458 1446 delete _rnxV2Priority; 1459 1447 delete _ephPathLineEdit; … … 1461 1449 delete _ephOutPortLineEdit; 1462 1450 delete _ephV3CheckBox; 1463 delete _ephV3filenameCheckBox;1464 1451 delete _corrPathLineEdit; 1465 1452 delete _corrIntrComboBox; … … 1869 1856 settings.setValue("rnxSkel", _rnxSkelLineEdit->text()); 1870 1857 settings.setValue("rnxOnlyWithSKL",_rnxFileCheckBox->checkState()); 1871 settings.setValue("rnxV3filenames",_rnxV3filenameCheckBox->checkState());1872 1858 settings.setValue("rnxScript", _rnxScrpLineEdit->text()); 1873 (_rnxV3filenameCheckBox->checkState()) ?1874 settings.setValue("rnxV3", _rnxV3filenameCheckBox->checkState()) :1875 settings.setValue("rnxV3", _rnxV3CheckBox->checkState());1876 1859 settings.setValue("rnxV2Priority",_rnxV2Priority->text()); 1877 1860 // RINEX Ephemeris … … 1879 1862 settings.setValue("ephIntr", _ephIntrComboBox->currentText()); 1880 1863 settings.setValue("ephOutPort", _ephOutPortLineEdit->text()); 1881 settings.setValue("ephV3filenames", _ephV3filenameCheckBox->checkState());1882 (_ephV3filenameCheckBox->checkState()) ?1883 settings.setValue("ephV3", _ephV3filenameCheckBox->checkState()) :1884 settings.setValue("ephV3", _ephV3CheckBox->checkState());1885 1864 // Broadcast Corrections 1886 1865 settings.setValue("corrPath", _corrPathLineEdit->text()); … … 2393 2372 enableWidget(enable, _ephIntrComboBox); 2394 2373 enableWidget(enable, _ephV3CheckBox); 2395 enableWidget(enable, _ephV3filenameCheckBox);2396 2374 } 2397 2375 -
branches/BNC_2.12/src/bncwindow.h
r7513 r8351 158 158 QLineEdit* _rnxV2Priority; 159 159 QCheckBox* _ephV3CheckBox; 160 QCheckBox* _ephV3filenameCheckBox;161 160 QLineEdit* _rnxSkelLineEdit; 162 161 QCheckBox* _rnxFileCheckBox; 163 QCheckBox* _rnxV3filenameCheckBox;164 162 QLineEdit* _rnxScrpLineEdit; 165 163 QLineEdit* _logFileLineEdit; -
branches/BNC_2.12/src/rinex/reqcedit.cpp
r8286 r8351 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.keys().first()); 614 } 584 615 } 585 616 -
branches/BNC_2.12/src/rinex/rnxnavfile.cpp
r8167 r8351 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::e_type::GPS: 300 fmt.append("%1 N: GNSS NAV DATA G: GPS"); 301 break; 302 case t_eph::e_type::GLONASS: 303 fmt.append("%1 N: GNSS NAV DATA R: GLONASS"); 304 break; 305 case t_eph::e_type::Galileo: 306 fmt.append("%1 N: GNSS NAV DATA E: Galileo"); 307 break; 308 case t_eph::e_type::QZSS: 309 fmt.append("%1 N: GNSS NAV DATA J: QZSS"); 310 break; 311 case t_eph::e_type::BDS: 312 fmt.append("%1 N: GNSS NAV DATA C: BDS"); 313 break; 314 case t_eph::e_type::IRNSS: 315 fmt.append("%1 N: GNSS NAV DATA I: IRNSS"); 316 break; 317 case t_eph::e_type::SBAS: 318 fmt.append("%1 N: GNSS NAV DATA S: SBAS"); 319 break; 320 case t_eph::e_type::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) -
branches/BNC_2.12/src/rinex/rnxnavfile.h
r8286 r8351 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.