Changeset 8351 in ntrip


Ignore:
Timestamp:
May 18, 2018, 9:56:20 AM (6 years ago)
Author:
stuerze
Message:

individual satellite system will be considerred now during concatenation of ephemeris files

Location:
branches/BNC_2.12/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/bnccore.cpp

    r8286 r8351  
    305305    QString ephFileNameGPS = _ephPath + "BRDC";
    306306
    307     bool ephV3filenames = settings.value("ephV3filenames").toBool();
     307    bool ephV3 = (_rinexVers == 3) ? true : false;
    308308
    309309    QString hlpStr = bncRinex::nextEpochStr(datTim,
    310                          settings.value("ephIntr").toString(), ephV3filenames);
     310                         settings.value("ephIntr").toString(), ephV3);
    311311
    312312    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
    330324    }
    331325    else { // RNX v2.11
  • branches/BNC_2.12/src/bncmain.cpp

    r8172 r8351  
    109109      "   rnxV2Priority  {Priority of signal attributes [character string, list separated by blank character, example: G:12&PWCSLXYN G:5&IQX C:IQX]}\n"
    110110      "   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"
    112111      "\n"
    113112      "RINEX Ephemeris Panel keys:\n"
     
    116115      "   ephOutPort     {Output port [integer number]}\n"
    117116      "   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"
    119117      "\n"
    120118      "RINEX Editing and QC Panel keys:\n"
  • branches/BNC_2.12/src/bncrinex.cpp

    r8289 r8351  
    9494  _writeRinexFileOnlyWithSkl = settings.value("rnxOnlyWithSKL").toBool();
    9595
    96   _rnxV3filenames = settings.value("rnxV3filenames").toBool();
     96  _rnxV3 = (Qt::CheckState(settings.value("rnxV3").toInt()) == Qt::Checked) ? true : false;
    9797}
    9898
     
    209209////////////////////////////////////////////////////////////////////////////
    210210QString bncRinex::nextEpochStr(const QDateTime& datTim,
    211                                const QString& intStr, bool rnxV3filenames,
     211                               const QString& intStr, bool rnxV3,
    212212                               QDateTime* nextEpoch) {
    213213
     
    221221  if ( indHlp != -1) {
    222222    int step = intStr.left(indHlp-1).toInt();
    223     if (rnxV3filenames) {
     223    if (rnxV3) {
    224224      epoStr +=  QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H
    225225    } else {
     
    248248      }
    249249    }
    250     if (rnxV3filenames) {
     250    if (rnxV3) {
    251251      epoStr += QString("_%1M").arg(step, 2, 10, QChar('0'));                // period
    252252    }
     
    254254  else if (intStr == "1 hour") {
    255255    int step = intStr.left(indHlp-1).toInt();
    256     if (rnxV3filenames) {
     256    if (rnxV3) {
    257257      epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0'));  // H
    258258      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                     // M
     
    272272  else {
    273273    int step = intStr.left(indHlp-1).toInt();
    274     if (rnxV3filenames) {
     274    if (rnxV3) {
    275275      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // H
    276276      epoStr += QString("%1").arg(0, 2, 10, QChar('0'));                    // M
     
    303303
    304304  QString hlpStr = nextEpochStr(datTim, settings.value("rnxIntr").toString(),
    305                                 _rnxV3filenames, &_nextCloseEpoch);
     305                                _rnxV3, &_nextCloseEpoch);
    306306
    307307  int statIDlength = _statID.size() -1;
     
    335335  }
    336336
    337   if (_rnxV3filenames) {
     337  if (_rnxV3) {
    338338    QString country;
    339339    QString monNum = "0";
     
    362362            "_MO" + // mixed OBS
    363363            distStr +
    364             ".rnx"; 
     364            ".rnx";
    365365  }
    366366  else {
  • branches/BNC_2.12/src/bncrinex.h

    r7179 r8351  
    4747   static QString nextEpochStr(const QDateTime& datTim,
    4848                               const QString& intStr,
    49                                bool rnxV3filenames,
     49                               bool rnxV3,
    5050                               QDateTime* nextEpoch = 0);
    5151   static std::string asciiSatLine(const t_satObs& obs);
     
    7070   QString         _sklName;
    7171   bool            _writeRinexFileOnlyWithSkl;
    72    bool            _rnxV3filenames;
     72   bool            _rnxV3;
    7373   QByteArray      _latitude;
    7474   QByteArray      _longitude;
  • branches/BNC_2.12/src/bncsettings.cpp

    r8172 r8351  
    9292    setValue_p("rnxScript",           "");
    9393    setValue_p("rnxV3",               "0");
    94     setValue_p("rnxV3filenames",      "0");
    9594    // RINEX Ephemeris
    9695    setValue_p("ephPath",             "");
     
    9897    setValue_p("ephOutPort",          "");
    9998    setValue_p("ephV3",               "0");
    100     setValue_p("ephV3filenames",      "0");
    10199    // Reqc
    102100    setValue_p("reqcAction",          "");
     
    110108    setValue_p("reqcRnxVersion",      "");
    111109    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");
    114112    setValue_p("reqcLogSummaryOnly",  "");
    115113    setValue_p("reqcRunBy",           "");
     
    121119    setValue_p("reqcOldReceiverName", "");
    122120    setValue_p("reqcNewReceiverName", "");
     121   setValue_p("reqcOldAntennaNumber", "");
    123122    setValue_p("reqcNewAntennaNumber","");
     123    setValue_p("reqcOldAntennadE",    "");
    124124    setValue_p("reqcNewAntennadE",    "");
     125    setValue_p("reqcOldAntennadN",    "");
    125126    setValue_p("reqcNewAntennadN",    "");
     127    setValue_p("reqcOldAntennadU",    "");
    126128    setValue_p("reqcNewAntennadU",    "");
     129    setValue_p("reqcOldReceiverNumber", "");
    127130    setValue_p("reqcNewReceiverNumber", "");
    128     setValue_p("reqcOldAntennaNumber", "");
    129     setValue_p("reqcOldAntennadE",    "");
    130     setValue_p("reqcOldAntennadN",    "");
    131     setValue_p("reqcOldAntennadU",    "");
    132     setValue_p("reqcOldReceiverNumber", "");
     131
    133132    setValue_p("reqcUseObsTypes",     "");
    134133    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  
    219219  _rnxV3CheckBox      = new QCheckBox();
    220220  _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
    221   _rnxV3filenameCheckBox = new QCheckBox();
    222   _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt()));
    223221  QString hlp = settings.value("rnxV2Priority").toString();
    224222  if (hlp.isEmpty()) {
     
    245243  _ephV3CheckBox = new QCheckBox();
    246244  _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
    247 
    248   _ephV3filenameCheckBox = new QCheckBox();
    249   _ephV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("ephV3filenames").toInt()));
    250245
    251246  connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString &)),
     
    698693  oLayout->addWidget(new QLabel("Version 3"),                      6, 0);
    699694  oLayout->addWidget(_rnxV3CheckBox,                               6, 1);
    700   oLayout->addWidget(new QLabel("Version 3 filenames"),            6, 2);
    701   oLayout->addWidget(_rnxV3filenameCheckBox,                       6, 3);
    702695  oLayout->addWidget(new QLabel(""),                               7, 1);
    703696  oLayout->setRowStretch(8, 999);
     
    721714  eLayout->addWidget(new QLabel("Version 3"),                     4, 0);
    722715  eLayout->addWidget(_ephV3CheckBox,                              4, 1);
    723   eLayout->addWidget(new QLabel("Version 3 filenames"),           4, 2);
    724   eLayout->addWidget(_ephV3filenameCheckBox,                      4, 3);
    725716  eLayout->setRowStretch(5, 999);
    726717
     
    12511242  _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>"));
    12521243  _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>"));
    12541244
    12551245  // WhatsThis, RINEX Ephemeris
     
    12591249  _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>"));
    12601250  _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>"));
    12621251
    12631252  // WhatsThis, RINEX Editing & QC
     
    14551444  delete _rnxScrpLineEdit;
    14561445  delete _rnxV3CheckBox;
    1457   delete _rnxV3filenameCheckBox;
    14581446  delete _rnxV2Priority;
    14591447  delete _ephPathLineEdit;
     
    14611449  delete _ephOutPortLineEdit;
    14621450  delete _ephV3CheckBox;
    1463   delete _ephV3filenameCheckBox;
    14641451  delete _corrPathLineEdit;
    14651452  delete _corrIntrComboBox;
     
    18691856  settings.setValue("rnxSkel",     _rnxSkelLineEdit->text());
    18701857  settings.setValue("rnxOnlyWithSKL",_rnxFileCheckBox->checkState());
    1871   settings.setValue("rnxV3filenames",_rnxV3filenameCheckBox->checkState());
    18721858  settings.setValue("rnxScript",   _rnxScrpLineEdit->text());
    1873   (_rnxV3filenameCheckBox->checkState()) ?
    1874     settings.setValue("rnxV3",       _rnxV3filenameCheckBox->checkState()) :
    1875     settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
    18761859  settings.setValue("rnxV2Priority",_rnxV2Priority->text());
    18771860// RINEX Ephemeris
     
    18791862  settings.setValue("ephIntr",       _ephIntrComboBox->currentText());
    18801863  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());
    18851864// Broadcast Corrections
    18861865  settings.setValue("corrPath",    _corrPathLineEdit->text());
     
    23932372    enableWidget(enable, _ephIntrComboBox);
    23942373    enableWidget(enable, _ephV3CheckBox);
    2395     enableWidget(enable, _ephV3filenameCheckBox);
    23962374  }
    23972375
  • branches/BNC_2.12/src/bncwindow.h

    r7513 r8351  
    158158    QLineEdit* _rnxV2Priority;
    159159    QCheckBox* _ephV3CheckBox;
    160     QCheckBox* _ephV3filenameCheckBox;
    161160    QLineEdit* _rnxSkelLineEdit;
    162161    QCheckBox* _rnxFileCheckBox;
    163     QCheckBox* _rnxV3filenameCheckBox;
    164162    QLineEdit* _rnxScrpLineEdit;
    165163    QLineEdit* _logFileLineEdit;
  • branches/BNC_2.12/src/rinex/reqcedit.cpp

    r8286 r8351  
    561561  bool haveGPS     = false;
    562562  bool haveGlonass = false;
     563  QMap<t_eph::e_type, bool> haveGnss;
    563564  for (int ii = 0; ii < _ephs.size(); ii++) {
    564565    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;
    570592    }
    571593  }
     
    582604  else {
    583605    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    }
    584615  }
    585616
  • branches/BNC_2.12/src/rinex/rnxnavfile.cpp

    r8167 r8351  
    294294  }
    295295  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
    297325      .arg(_header._version, 9, 'f', 2)
    298326      .leftJustified(60)
  • branches/BNC_2.12/src/rinex/rnxnavfile.h

    r8286 r8351  
    3030#include "bncconst.h"
    3131#include "bnctime.h"
     32#include "ephemeris.h"
    3233
    3334class t_pppOpt;
     
    5051    double _version;
    5152    bool   _glonass;
     53    t_eph::e_type _satSys;
    5254    QStringList _comments;
    5355  };
     
    6264  bool   glonass() const {return _header._glonass;}
    6365  QStringList comments() const {return _header._comments;}
     66  t_eph::e_type satSystem() const {return _header._satSys;}
    6467  void   setGlonass(bool glo) {_header._glonass = glo;}
     68  void   setGnssTypeV3(t_eph::e_type sys) {_header._satSys = sys;}
    6569  void   writeHeader(const QMap<QString, QString>* txtMap = 0);
    6670  void   writeEph(const t_eph* eph);
Note: See TracChangeset for help on using the changeset viewer.