Changeset 8354 in ntrip
- Timestamp:
- May 18, 2018, 2:24:46 PM (7 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r8215 r8354 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 -
trunk/BNC/src/bncmain.cpp
r8252 r8354 39 39 * -----------------------------------------------------------------------*/ 40 40 41 #include <iostream>42 41 #include <unistd.h> 43 42 #include <signal.h> 44 45 43 #include <QApplication> 46 44 #include <QFile> 45 #include <iostream> 47 46 48 47 #include "app.h" … … 109 108 " rnxV2Priority {Priority of signal attributes [character string, list separated by blank character, example: G:12&PWCSLXYN G:5&IQX C:IQX]}\n" 110 109 " 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 110 "\n" 113 111 "RINEX Ephemeris Panel keys:\n" … … 116 114 " ephOutPort {Output port [integer number]}\n" 117 115 " 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 116 "\n" 120 117 "RINEX Editing and QC Panel keys:\n" -
trunk/BNC/src/bncrinex.cpp
r8288 r8354 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 { -
trunk/BNC/src/bncrinex.h
r7179 r8354 35 35 class bncRinex { 36 36 public: 37 bncRinex(const QByteArray& statID, const QUrl& mountPoint, 37 bncRinex(const QByteArray& statID, const QUrl& mountPoint, 38 38 const QByteArray& latitude, const QByteArray& longitude, 39 const QByteArray& nmea, const QByteArray& ntripVersion); 39 const QByteArray& nmea, const QByteArray& ntripVersion); 40 40 ~bncRinex(); 41 41 … … 46 46 47 47 static QString nextEpochStr(const QDateTime& datTim, 48 const QString& intStr, 49 bool rnxV3 filenames,48 const QString& intStr, 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; -
trunk/BNC/src/bncsettings.cpp
r8171 r8354 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", ""); -
trunk/BNC/src/bncwindow.cpp
r8276 r8354 240 240 _rnxV3CheckBox = new QCheckBox(); 241 241 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt())); 242 _rnxV3filenameCheckBox = new QCheckBox();243 _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt()));244 242 QString hlp = settings.value("rnxV2Priority").toString(); 245 243 if (hlp.isEmpty()) { … … 266 264 _ephV3CheckBox = new QCheckBox(); 267 265 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt())); 268 269 _ephV3filenameCheckBox = new QCheckBox();270 _ephV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("ephV3filenames").toInt()));271 266 272 267 connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString &)), … … 764 759 oLayout->addWidget(new QLabel("Version 3"), 6, 0); 765 760 oLayout->addWidget(_rnxV3CheckBox, 6, 1); 766 oLayout->addWidget(new QLabel("Version 3 filenames"), 6, 2);767 oLayout->addWidget(_rnxV3filenameCheckBox, 6, 3);768 761 oLayout->addWidget(new QLabel(""), 7, 1); 769 762 oLayout->setRowStretch(8, 999); … … 787 780 eLayout->addWidget(new QLabel("Version 3"), 4, 0); 788 781 eLayout->addWidget(_ephV3CheckBox, 4, 1); 789 eLayout->addWidget(new QLabel("Version 3 filenames"), 4, 2);790 eLayout->addWidget(_ephV3filenameCheckBox, 4, 3);791 782 eLayout->setRowStretch(5, 999); 792 783 … … 1310 1301 _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_'. <i>[key: rnxV2Priority]</i></p>")); 1311 1302 _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. <i>[key: rnxV3]</i></p>")); 1312 _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. <i>[key: rnxV3filenames]</i></p>"));1313 1303 1314 1304 // WhatsThis, RINEX Ephemeris … … 1318 1308 _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. <i>[key: ephOutPort]</i></p>")); 1319 1309 _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. <i>[key: ephV3]</i></p>")); 1320 _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. <i>[key: ephV3filenames]</i></p>"));1321 1310 1322 1311 // WhatsThis, RINEX Editing & QC … … 1512 1501 delete _rnxScrpLineEdit; 1513 1502 delete _rnxV3CheckBox; 1514 delete _rnxV3filenameCheckBox;1515 1503 delete _rnxV2Priority; 1516 1504 delete _ephPathLineEdit; … … 1518 1506 delete _ephOutPortLineEdit; 1519 1507 delete _ephV3CheckBox; 1520 delete _ephV3filenameCheckBox;1521 1508 delete _corrPathLineEdit; 1522 1509 delete _corrIntrComboBox; … … 1962 1949 settings.setValue("rnxSkel", _rnxSkelLineEdit->text()); 1963 1950 settings.setValue("rnxOnlyWithSKL",_rnxFileCheckBox->checkState()); 1964 settings.setValue("rnxV3filenames",_rnxV3filenameCheckBox->checkState());1965 1951 settings.setValue("rnxScript", _rnxScrpLineEdit->text()); 1966 (_rnxV3filenameCheckBox->checkState()) ?1967 settings.setValue("rnxV3", _rnxV3filenameCheckBox->checkState()) :1968 settings.setValue("rnxV3", _rnxV3CheckBox->checkState());1969 1952 settings.setValue("rnxV2Priority",_rnxV2Priority->text()); 1970 1953 // RINEX Ephemeris … … 1972 1955 settings.setValue("ephIntr", _ephIntrComboBox->currentText()); 1973 1956 settings.setValue("ephOutPort", _ephOutPortLineEdit->text()); 1974 settings.setValue("ephV3filenames", _ephV3filenameCheckBox->checkState());1975 (_ephV3filenameCheckBox->checkState()) ?1976 settings.setValue("ephV3", _ephV3filenameCheckBox->checkState()) :1977 settings.setValue("ephV3", _ephV3CheckBox->checkState());1978 1957 // Broadcast Corrections 1979 1958 settings.setValue("corrPath", _corrPathLineEdit->text()); … … 2485 2464 enableWidget(enable, _ephIntrComboBox); 2486 2465 enableWidget(enable, _ephV3CheckBox); 2487 enableWidget(enable, _ephV3filenameCheckBox);2488 2466 } 2489 2467 -
trunk/BNC/src/bncwindow.h
r8252 r8354 164 164 QLineEdit* _rnxV2Priority; 165 165 QCheckBox* _ephV3CheckBox; 166 QCheckBox* _ephV3filenameCheckBox;167 166 QLineEdit* _rnxSkelLineEdit; 168 167 QCheckBox* _rnxFileCheckBox; 169 QCheckBox* _rnxV3filenameCheckBox;170 168 QLineEdit* _rnxScrpLineEdit; 171 169 QLineEdit* _logFileLineEdit; -
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.