Changeset 9184 in ntrip for trunk


Ignore:
Timestamp:
Oct 23, 2020, 9:52:07 PM (4 years ago)
Author:
stuerze
Message:

an option for the specification of a local skeleton directory is added

Location:
trunk/BNC/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncmain.cpp

    r9159 r9184  
    108108      "\n"
    109109      "RINEX Observations Panel keys:\n"
    110       "   rnxPath        {Directory [character string]}\n"
     110      "   rnxPath        {Directory for RINEX files [character string]}\n"
    111111      "   rnxIntr        {File interval [character string: 1 min|2 min|5 min|10 min|15 min|30 min|1 hour|1 day]}\n"
    112112      "   rnxSampl       {File sampling rate [character string: 0.1 sec|1 sec|5 sec|10 sec|15 sec|30 sec|60 sec]}\n"
    113113      "   rnxSkel        {RINEX skeleton file extension [character string]}\n"
     114      "   rnxSkelPath    {Directory for local skeleton files [character string]}\n"
    114115      "   rnxOnlyWithSKL {Using RINEX skeleton file is mandatory [integer number: 0=no,2=yes]}\n"
    115116      "   rnxScript      {File upload script, full path [character string]}\n"
     
    256257      "   cmbMaxres       {Clock outlier residuum threshold in meters [floating-point number]\n"
    257258      "   cmbSampl        {Clock sampling rate [integer number of seconds: 10|20|30|40|50|60]}\n"
    258       "   cmbUseGlonass   {Use GLONASS in combination [integer number: 0=no,2=yes]\n"
    259259      "\n"
    260260      "Upload Corrections Panel keys:\n"
  • trunk/BNC/src/bncrinex.cpp

    r9158 r9184  
    175175    staID =            _mountPoint.path().mid(1,stIdLength).toUpper() + ".skl";
    176176    staIDalternative = _mountPoint.path().mid(1,stIdLength).toLower() + ".skl";
    177     url = sklDir + "/" + staID;
    178177    if (url.port() == -1) {
    179178      if (sklDir.contains("https", Qt::CaseInsensitive)) {
     
    187186    bncNetQuery* query = new bncNetQueryV2(true);
    188187    QByteArray outData;
     188    url = sklDir + "/" + staID;
    189189    query->waitForRequestResult(url, outData);
    190190    if (query->status() == bncNetQuery::finished &&
     
    222222      readDone = true;
    223223    }
    224   } else if ( sklAlt.exists() && sklAlt.open(QIODevice::ReadOnly) ) {
     224  }
     225  else if ( sklAlt.exists() && sklAlt.open(QIODevice::ReadOnly) ) {
    225226    QTextStream in(&sklAlt);
    226227    if (_sklHeader.read(&in) == success) {
     
    335336
    336337  bncSettings settings;
    337   QString path = settings.value("rnxPath").toString();
    338   expandEnvVar(path);
    339 
    340   if ( path.length() > 0 && path[path.length()-1] != QDir::separator() ) {
    341     path += QDir::separator();
     338  QString rnxPath = settings.value("rnxPath").toString();
     339  expandEnvVar(rnxPath);
     340
     341  if ( rnxPath.length() > 0 && rnxPath[rnxPath.length()-1] != QDir::separator() ) {
     342    rnxPath += QDir::separator();
    342343  }
    343344
     
    374375  }
    375376
    376   QString sklExt = settings.value("rnxSkel").toString();
    377   if (!sklExt.isEmpty()) {
    378     _localSklName            = path + ID           + distStr + "." + sklExt;
    379     _localSklNameAlternative = path + ID.toLower() + distStr + "." + sklExt;
    380   }
     377  // Local Skeleton file
     378  // -------------------
     379  QString sklExt  = settings.value("rnxSkel").toString();
     380  QString sklPath = settings.value("rnxSkelPath").toString();
     381  expandEnvVar(sklPath);
     382  if (sklPath.length() > 0 &&
     383      sklPath[sklPath.length()-1] != QDir::separator()) {
     384    sklPath += QDir::separator();
     385  }
     386  if (sklPath.isEmpty()) {
     387    sklPath = rnxPath;
     388  }
     389  _localSklName            = sklPath + ID           + distStr + "." + sklExt;
     390  _localSklNameAlternative = sklPath + ID.toLower() + distStr + "." + sklExt;
    381391
    382392  if (!_rnxV2) {
     
    398408    }
    399409
    400     path += ID.left(4) +
     410    rnxPath += ID.left(4) +
    401411            QString("%1").arg(monNum, 1, 10) +
    402412            QString("%1").arg(recNum, 1, 10) +
     
    412422  }
    413423  else {
    414     path += ID.left(4) +
     424    rnxPath += ID.left(4) +
    415425            QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) +
    416426            hlpStr + distStr + datTim.toString(".yyO");
    417427  }
    418428
    419   _fName = path.toLatin1();
     429  _fName = rnxPath.toLatin1();
    420430}
    421431
  • trunk/BNC/src/bncsettings.cpp

    r9158 r9184  
    8888    setValue_p("rnxOnlyWithSKL",      "");
    8989    setValue_p("rnxSampl",            "1 sec");
    90     setValue_p("rnxSkel",             "SKL");
     90    setValue_p("rnxSkel",             "skl");
     91    setValue_p("rnxSkelPath",         "");
    9192    setValue_p("rnxV2Priority",       "");
    9293    setValue_p("rnxScript",           "");
     
    173174    setValue_p("cmbMaxres",           "");
    174175    setValue_p("cmbSampl",            "10");
    175     setValue_p("cmbUseGlonass",       "");
    176176    // Upload (clk)
    177177    setValue_p("uploadMountpointsOut","");
  • trunk/BNC/src/bncwindow.cpp

    r9158 r9184  
    236236  _rnxFileCheckBox = new QCheckBox();
    237237  _rnxFileCheckBox->setCheckState(Qt::CheckState(settings.value("rnxOnlyWithSKL").toInt()));
    238   _rnxSkelLineEdit    = new QLineEdit(settings.value("rnxSkel").toString());
    239   _rnxSkelLineEdit->setMaximumWidth(5*ww);
     238  _rnxSkelExtComboBox  = new QComboBox();
     239  _rnxSkelExtComboBox->setEditable(false);
     240  _rnxSkelExtComboBox->addItems(QString("skl, SKL").split(","));
     241  int il = _rnxSkelExtComboBox->findText(settings.value("rnxSkel").toString());
     242  if (il != -1) {
     243    _rnxSkelExtComboBox->setCurrentIndex(il);
     244  }
     245  _rnxSkelPathLineEdit  = new QLineEdit(settings.value("rnxSkelPath").toString());
    240246  _rnxScrpLineEdit    = new QLineEdit(settings.value("rnxScript").toString());
    241247  _rnxV2CheckBox      = new QCheckBox();
     
    248254
    249255  connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotBncTextChanged()));
     256  connect(_rnxSkelPathLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotBncTextChanged()));
    250257  connect(_rnxV2CheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
    251258
     
    472479
    473480  _cmbMaxresLineEdit = new QLineEdit(settings.value("cmbMaxres").toString());
    474   _cmbUseGlonass     = new QCheckBox();
    475   _cmbUseGlonass->setCheckState(Qt::CheckState(settings.value("cmbUseGlonass").toInt()));
    476481
    477482  _cmbSamplSpinBox = new QSpinBox;
     
    502507    enableWidget(true, _cmbMaxresLineEdit);
    503508    enableWidget(true, _cmbSamplSpinBox);
    504     enableWidget(true, _cmbUseGlonass);
    505509  }
    506510  else {
     
    508512    enableWidget(false, _cmbMaxresLineEdit);
    509513    enableWidget(false, _cmbSamplSpinBox);
    510     enableWidget(false, _cmbUseGlonass);
    511514  }
    512515
     
    746749  _rnxIntrComboBox->setMaximumWidth(9*ww);
    747750  _rnxSamplComboBox->setMaximumWidth(9*ww);
     751  _rnxSkelExtComboBox->setMaximumWidth(9*ww);
    748752
    749753  oLayout->addWidget(new QLabel("Saving RINEX observation files.<br>"),0, 0, 1,50);
     
    753757  oLayout->addWidget(_rnxIntrComboBox,                             2, 1);
    754758  oLayout->addWidget(new QLabel("  Sampling"),                     2, 2, Qt::AlignRight);
    755   oLayout->addWidget(_rnxSamplComboBox,                            2, 3, Qt::AlignLeft);
     759  oLayout->addWidget(_rnxSamplComboBox,                            2, 3, Qt::AlignRight);
    756760  oLayout->addWidget(new QLabel("Skeleton extension"),             3, 0);
    757   oLayout->addWidget(_rnxSkelLineEdit,                             3, 1, Qt::AlignLeft);
    758   oLayout->addWidget(new QLabel("Skeleton mandatory"),             3, 2);
     761  oLayout->addWidget(_rnxSkelExtComboBox,                          3, 1, Qt::AlignLeft);
     762  oLayout->addWidget(new QLabel("Skeleton mandatory"),             3, 2, Qt::AlignRight);
    759763  oLayout->addWidget(_rnxFileCheckBox,                             3, 3);
    760   oLayout->addWidget(new QLabel("Script (full path)"),             4, 0);
    761   oLayout->addWidget(_rnxScrpLineEdit,                             4, 1, 1, 15);
    762   oLayout->addWidget(new QLabel("Version 2 signal priority"),      5, 0);
    763   oLayout->addWidget(_rnxV2Priority,                               5, 1, 1, 15);
     764  oLayout->addWidget(new QLabel("Skeleton Directory"),             4, 0);
     765  oLayout->addWidget(_rnxSkelPathLineEdit,                          4, 1, 1, 15);
     766  oLayout->addWidget(new QLabel("Script (full path)"),             5, 0);
     767  oLayout->addWidget(_rnxScrpLineEdit,                             5, 1, 1, 15);
    764768  oLayout->addWidget(new QLabel("Version 2"),                      6, 0);
    765769  oLayout->addWidget(_rnxV2CheckBox,                               6, 1);
     770  oLayout->addWidget(new QLabel("Signal priority"),                6, 2, Qt::AlignRight);
     771  oLayout->addWidget(_rnxV2Priority,                               6, 3, 1, 13);
    766772  oLayout->addWidget(new QLabel(""),                               7, 1);
    767773  oLayout->setRowStretch(8, 999);
     
    12151221  cmbLayout->addWidget(new QLabel("Sampling"),                               5, 6, Qt::AlignRight);
    12161222  cmbLayout->addWidget(_cmbSamplSpinBox,                                     5, 7);
    1217   cmbLayout->addWidget(new QLabel("   Use GLONASS"),                         6, 6, Qt::AlignRight);
    1218   cmbLayout->addWidget(_cmbUseGlonass,                                       6, 7);
    1219   cmbLayout->setRowStretch(7, 999);
     1223  cmbLayout->setRowStretch(5, 999);
    12201224
    12211225  connect(addCmbRowButton, SIGNAL(clicked()), this, SLOT(slotAddCmbRow()));
     
    13081312  _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file. <i>[key: rnxIntr]</i></p>"));
    13091313  _rnxSamplComboBox->setWhatsThis(tr("<p>Select the RINEX Observation sampling interval in seconds. <i>[key: rnxSampl]</i></p>"));
    1310   _rnxSkelLineEdit->setWhatsThis(tr("<p>BNC allows using personal RINEX skeleton files that contain the RINEX header records you would like to include. You can derive a skeleton file from information given in an up to date sitelog.</p><p>A file in the RINEX Observations 'Directory' with a 'Skeleton extension' skl or SKL is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream. <i>[key: rnxSkel]</i></p>"));
     1314  _rnxSkelExtComboBox->setWhatsThis(tr("<p>BNC allows using personal RINEX skeleton files that contain the RINEX header records you would like to include. You can derive a skeleton file from information given in an up to date sitelog.</p><p>A file in the RINEX Observations 'Directory' with a 'Skeleton extension' skl or SKL is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream. <i>[key: rnxSkel]</i></p>"));
     1315  _rnxSkelPathLineEdit->setWhatsThis(tr("<p>Here you specify the path to where local skeleton files are located.</p><p> If no directory is specified, the path is assumed to where the RINEX Observation files will stored. <i>[key: rnxSkelPath]</i></p>"));
    13111316  _rnxFileCheckBox->setWhatsThis(tr("<p>Tick check box 'Skeleton mandatory' in case you want that RINEX files are only produced if skeleton files are available for BNC. If no skeleton file is available for a particular source then no RINEX Observation file will be produced from the affected stream.</p><p>Note that a skeleton file contains RINEX header information such as receiver and antenna types. In case of stream conversion to RINEX Version 3, a skeleton file should also contain information on potentially available observation types. A missing skeleton file will therefore enforce BNC to only save a default set of RINEX 3 observation types. <i>[key: rnxOnlyWithSKL]</i></p>"));
    13121317  _rnxScrpLineEdit->setWhatsThis(tr("<p>Whenever a RINEX Observation file is finally saved, you may want to compress, copy or upload it immediately, for example via FTP. BNC allows you to execute a script/batch file to carry out such operation.</p><p>Specify the full path of a script or batch file. BNC will pass the full RINEX Observation file path to the script as command line parameter (%1 on Windows systems, $1 on Unix/Linux/Mac systems). <i>[key: rnxScript]</i></p>"));
     
    14251430  _cmbMaxresLineEdit->setWhatsThis(tr("<p>BNC combines all incoming clocks according to specified weights. Individual clock estimates that differ by more than 'Maximal residuum' meters from the average of all clocks will be ignored.<p></p>It is suggested to specify a value of about 0.2 m for the Kalman filter combination approach and a value of about 3.0 meters for the Single-Epoch combination approach.</p><p>Default is a value of '999.0'. <i>[key: cmbMaxres]</i></p>"));
    14261431  _cmbSamplSpinBox->setWhatsThis(tr("<p>Select a combination Sampling interval for the clocks. Clock corrections will be produced following that interval.</p><p>A value of 10 sec may be an appropriate choice. <i>[key: cmbSampl]</i></p>"));
    1427   _cmbUseGlonass->setWhatsThis(tr("<p>In case the incoming orbit and clock correction stream(s) support GLONASS, you can tick 'Use GLONASS' to produce a GPS plus GLONASS combination solution.</p><p>Default is a GPS-only combination. <i>[key: cmbUseGlonass]</i></p>"));
    14281432
    14291433  // WhatsThis, Upload Corrections
     
    15101514  delete _rnxIntrComboBox;
    15111515  delete _rnxSamplComboBox;
     1516  delete _rnxSkelExtComboBox;
     1517  delete _rnxSkelPathLineEdit;
    15121518  delete _rnxFileCheckBox;
    1513   delete _rnxSkelLineEdit;
    15141519  delete _rnxScrpLineEdit;
    15151520  delete _rnxV2CheckBox;
     
    15521557  _cmbTable->deleteLater();
    15531558  delete _cmbMaxresLineEdit;
    1554   delete _cmbUseGlonass;
    15551559  delete _cmbSamplSpinBox;
    15561560  delete _cmbMethodComboBox;;
     
    19651969  settings.setValue("rnxIntr",      _rnxIntrComboBox->currentText());
    19661970  settings.setValue("rnxSampl",     _rnxSamplComboBox->currentText());
    1967   settings.setValue("rnxSkel",      _rnxSkelLineEdit->text());
     1971  settings.setValue("rnxSkel",      _rnxSkelExtComboBox->currentText());
     1972  settings.setValue("rnxSkelPath",  _rnxSkelPathLineEdit->text());
    19681973  settings.setValue("rnxOnlyWithSKL",_rnxFileCheckBox->checkState());
    19691974  settings.setValue("rnxScript",    _rnxScrpLineEdit->text());
     
    20322037  settings.setValue("cmbMaxres",     _cmbMaxresLineEdit->text());
    20332038  settings.setValue("cmbSampl",      _cmbSamplSpinBox->value());
    2034   settings.setValue("cmbUseGlonass", _cmbUseGlonass->checkState());
    20352039// Upload Corrections
    20362040  if (!uploadMountpointsOut.isEmpty()) {
     
    24532457    enableWidget(enable, _rnxIntrComboBox);
    24542458    enableWidget(enable, _rnxSamplComboBox);
    2455     enableWidget(enable, _rnxSkelLineEdit);
     2459    enableWidget(enable, _rnxSkelExtComboBox);
     2460    enableWidget(enable, _rnxSkelPathLineEdit);
    24562461    enableWidget(enable, _rnxFileCheckBox);
    24572462    enableWidget(enable, _rnxScrpLineEdit);
     
    25472552      enableWidget(true, _cmbMaxresLineEdit);
    25482553      enableWidget(true, _cmbSamplSpinBox);
    2549       enableWidget(true, _cmbUseGlonass);
    25502554    }
    25512555    else {
     
    25532557      enableWidget(false, _cmbMaxresLineEdit);
    25542558      enableWidget(false, _cmbSamplSpinBox);
    2555       enableWidget(false, _cmbUseGlonass);
    25562559    }
    25572560  }
     
    26512654    enableWidget(false, _cmbMaxresLineEdit);
    26522655    enableWidget(false, _cmbSamplSpinBox);
    2653     enableWidget(false, _cmbUseGlonass);
    26542656  }
    26552657}
  • trunk/BNC/src/bncwindow.h

    r9158 r9184  
    142142    QLineEdit* _corrPortLineEdit;
    143143    QLineEdit* _rnxPathLineEdit;
     144    QLineEdit* _rnxSkelPathLineEdit;
    144145    QLineEdit* _ephPathLineEdit;
    145146    QLineEdit* _corrPathLineEdit;
     
    165166    QLineEdit* _rnxV2Priority;
    166167    QCheckBox* _ephV2CheckBox;
    167     QLineEdit* _rnxSkelLineEdit;
    168168    QCheckBox* _rnxFileCheckBox;
    169169    QLineEdit* _rnxScrpLineEdit;
     
    174174    QComboBox* _corrIntrComboBox;
    175175    QComboBox*  _rnxSamplComboBox;
     176    QComboBox*  _rnxSkelExtComboBox;
    176177    QComboBox*  _outSamplComboBox;
    177178    QCheckBox* _rnxAppendCheckBox;
     
    217218    QComboBox*     _cmbMethodComboBox;
    218219    QSpinBox*      _cmbSamplSpinBox;
    219     QCheckBox*     _cmbUseGlonass;
    220220
    221221    QTableWidget*  _uploadTable;
Note: See TracChangeset for help on using the changeset viewer.