Changeset 9760 in ntrip for trunk/BNC/src/bncwindow.cpp


Ignore:
Timestamp:
Jun 9, 2022, 5:10:10 PM (23 months ago)
Author:
stuerze
Message:

initial changes to consider RINEX Version 4 in future

File:
1 edited

Legend:

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

    r9702 r9760  
    210210  _onTheFlyComboBox->setEditable(false);
    211211  _onTheFlyComboBox->addItems(QString("no,1 day,1 hour,5 min,1 min").split(","));
    212   int ii = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
    213   if (ii != -1) {
    214     _onTheFlyComboBox->setCurrentIndex(ii);
     212  int go = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
     213  if (go != -1) {
     214    _onTheFlyComboBox->setCurrentIndex(go);
    215215  }
    216216  _autoStartCheckBox  = new QCheckBox();
     
    220220  // RINEX Observations Options
    221221  // --------------------------
    222   _rnxPathLineEdit    = new QLineEdit(settings.value("rnxPath").toString());
    223   _rnxIntrComboBox    = new QComboBox();
     222  _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
     223  _rnxIntrComboBox = new QComboBox();
    224224  _rnxIntrComboBox->setEditable(false);
    225225  _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
    226   ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
     226  int ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
    227227  if (ii != -1) {
    228228    _rnxIntrComboBox->setCurrentIndex(ii);
    229229  }
    230   _rnxSamplComboBox    = new QComboBox();
     230  _rnxSamplComboBox = new QComboBox();
    231231  _rnxSamplComboBox->setEditable(false);
    232232  _rnxSamplComboBox->addItems(QString("0.1 sec,1 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
     
    240240  _rnxSkelExtComboBox->setEditable(false);
    241241  _rnxSkelExtComboBox->addItems(QString("skl, SKL").split(","));
    242   int il = _rnxSkelExtComboBox->findText(settings.value("rnxSkel").toString());
     242  int ik = _rnxSkelExtComboBox->findText(settings.value("rnxSkel").toString());
     243  if (ik != -1) {
     244    _rnxSkelExtComboBox->setCurrentIndex(ik);
     245  }
     246  _rnxSkelPathLineEdit = new QLineEdit(settings.value("rnxSkelPath").toString());
     247  _rnxScrpLineEdit = new QLineEdit(settings.value("rnxScript").toString());
     248  _rnxVersComboBox = new QComboBox();
     249  _rnxVersComboBox->setEditable(false);
     250  _rnxVersComboBox->addItems(QString("4,3,2").split(","));
     251  _rnxVersComboBox->setMaximumWidth(7*ww);
     252  int il = _rnxVersComboBox->findText(settings.value("rnxVersion").toString());
    243253  if (il != -1) {
    244     _rnxSkelExtComboBox->setCurrentIndex(il);
    245   }
    246   _rnxSkelPathLineEdit  = new QLineEdit(settings.value("rnxSkelPath").toString());
    247   _rnxScrpLineEdit    = new QLineEdit(settings.value("rnxScript").toString());
    248   _rnxV2CheckBox      = new QCheckBox();
    249   _rnxV2CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV2").toInt()));
     254    _rnxVersComboBox->setCurrentIndex(il);
     255  }
    250256  QString hlp = settings.value("rnxV2Priority").toString();
    251257  if (hlp.isEmpty()) {
     
    256262  connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotBncTextChanged()));
    257263  connect(_rnxSkelPathLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotBncTextChanged()));
    258   connect(_rnxV2CheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
     264  connect(_rnxVersComboBox, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(slotBncTextChanged()));
    259265
    260266  // RINEX Ephemeris Options
    261267  // -----------------------
    262   _ephPathLineEdit    = new QLineEdit(settings.value("ephPath").toString());
    263   _ephIntrComboBox    = new QComboBox();
     268  _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
     269  _ephIntrComboBox = new QComboBox();
    264270  _ephIntrComboBox->setEditable(false);
    265271  _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
    266   int jj = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
    267   if (jj != -1) {
    268     _ephIntrComboBox->setCurrentIndex(jj);
    269   }
    270   _ephOutPortLineEdit    = new QLineEdit(settings.value("ephOutPort").toString());
    271   _ephV2CheckBox = new QCheckBox();
    272   _ephV2CheckBox->setCheckState(Qt::CheckState(settings.value("ephV2").toInt()));
     272  int ji = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
     273  if (ji != -1) {
     274    _ephIntrComboBox->setCurrentIndex(ji);
     275  }
     276  _ephOutPortLineEdit = new QLineEdit(settings.value("ephOutPort").toString());
     277  _ephVersComboBox = new QComboBox();
     278  _ephVersComboBox->setEditable(false);
     279  _ephVersComboBox->addItems(QString("4,3,2").split(","));
     280  _ephVersComboBox->setMaximumWidth(7*ww);
     281  int jk = _ephVersComboBox->findText(settings.value("ephVersion").toString());
     282  if (jk != -1) {
     283    _ephVersComboBox->setCurrentIndex(jk);
     284  }
    273285
    274286  connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString &)),
     
    284296  _corrIntrComboBox->setEditable(false);
    285297  _corrIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
    286   int mm = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
    287   if (mm != -1) {
    288     _corrIntrComboBox->setCurrentIndex(mm);
     298  int bi = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
     299  if (bi != -1) {
     300    _corrIntrComboBox->setCurrentIndex(bi);
    289301  }
    290302  _corrPortLineEdit    = new QLineEdit(settings.value("corrPort").toString());
     
    298310  // Feed Engine Options
    299311  // -------------------
    300   _outPortLineEdit    = new QLineEdit(settings.value("outPort").toString());
    301   _outWaitSpinBox   = new QSpinBox();
     312  _outPortLineEdit = new QLineEdit(settings.value("outPort").toString());
     313  _outWaitSpinBox = new QSpinBox();
    302314  _outWaitSpinBox->setMinimum(0);
    303315  _outWaitSpinBox->setMaximum(30);
     
    305317  _outWaitSpinBox->setSuffix(" sec");
    306318  _outWaitSpinBox->setValue(settings.value("outWait").toInt());
    307   _outSamplComboBox    = new QComboBox();
     319  _outSamplComboBox = new QComboBox();
    308320  _outSamplComboBox->addItems(QString("0.1 sec,1 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
    309321  int nn = _outSamplComboBox->findText(settings.value("outSampl").toString());
     
    311323      _outSamplComboBox->setCurrentIndex(nn);
    312324    }
    313   _outFileLineEdit    = new QLineEdit(settings.value("outFile").toString());
    314   _outUPortLineEdit   = new QLineEdit(settings.value("outUPort").toString());
     325  _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
     326  _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
    315327  _outLockTimeCheckBox = new QCheckBox();
    316328  _outLockTimeCheckBox->setCheckState(Qt::CheckState(settings.value("outLockTime").toInt()));
     
    497509  _cmbMethodComboBox->setEditable(false);
    498510  _cmbMethodComboBox->addItems(QString("Kalman Filter,Single-Epoch").split(","));
    499   int im = _cmbMethodComboBox->findText(settings.value("cmbMethod").toString());
    500   if (im != -1) {
    501     _cmbMethodComboBox->setCurrentIndex(im);
     511  int cm = _cmbMethodComboBox->findText(settings.value("cmbMethod").toString());
     512  if (cm != -1) {
     513    _cmbMethodComboBox->setCurrentIndex(cm);
    502514  }
    503515
     
    802814  oLayout->addWidget(new QLabel("Script (full path)"),             5, 0);
    803815  oLayout->addWidget(_rnxScrpLineEdit,                             5, 1, 1, 15);
    804   oLayout->addWidget(new QLabel("Version 2"),                      6, 0);
    805   oLayout->addWidget(_rnxV2CheckBox,                               6, 1);
     816  oLayout->addWidget(new QLabel("Version"),                        6, 0);
     817  oLayout->addWidget(_rnxVersComboBox,                             6, 1);
    806818  oLayout->addWidget(new QLabel("Signal priority"),                6, 2, Qt::AlignRight);
    807819  oLayout->addWidget(_rnxV2Priority,                               6, 3, 1, 13);
     
    825837  eLayout->addWidget(new QLabel("Port"),                          3, 0);
    826838  eLayout->addWidget(_ephOutPortLineEdit,                         3, 1);
    827   eLayout->addWidget(new QLabel("Version 2"),                     4, 0);
    828   eLayout->addWidget(_ephV2CheckBox,                              4, 1);
     839  eLayout->addWidget(new QLabel("Version"),                       4, 0);
     840  eLayout->addWidget(_ephVersComboBox,                            4, 1);
    829841  eLayout->setRowStretch(5, 999);
    830842
     
    11311143  _reqcActionComboBox->setEditable(false);
    11321144  _reqcActionComboBox->addItems(QString(",Edit/Concatenate,Analyze").split(","));
    1133   int ik = _reqcActionComboBox->findText(settings.value("reqcAction").toString());
    1134   if (ik != -1) {
    1135     _reqcActionComboBox->setCurrentIndex(ik);
     1145  int ip = _reqcActionComboBox->findText(settings.value("reqcAction").toString());
     1146  if (ip != -1) {
     1147    _reqcActionComboBox->setCurrentIndex(ip);
    11361148  }
    11371149  connect(_reqcActionComboBox, SIGNAL(currentIndexChanged(const QString &)),
     
    13791391  _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>"));
    13801392  _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>'I:ABCX' (System specific signal priorities for IRNSS) </li><li>'G:12&PWCSLX 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&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:128&DPX C:7&DPZ I:ABCX S:1&C S:5&IQX'. <i>[key: rnxV2Priority]</i></p>"));
    1381   _rnxV2CheckBox->setWhatsThis(tr("<p>The default format for RINEX Observation files is RINEX Version 3.</p><p>Select 'Version 2' if you want to save observations in RINEX Version 2 format. <i>[key: rnxV2]</i></p>"));
     1393  _rnxVersComboBox->setWhatsThis(tr("<p>Select the format for RINEX Observation files. <i>[key: rnxVersion]</i></p>"));
    13821394
    13831395  // WhatsThis, RINEX Ephemeris
     
    13861398  _ephIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Navigation file. <i>[key: ephIntr]</i></p>"));
    13871399  _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>"));
    1388   _ephV2CheckBox->setWhatsThis(tr("<p>The default format for output of RINEX Navigation data containing Broadcast Ephemeris is RINEX Version 3.</p><p>Select 'Version 2' if you want to output ephemeris in RINEX Version 2 format. <i>[key: ephV2]</i></p>"));
     1400  _ephVersComboBox->setWhatsThis(tr("<p>Select the format for RINEX Navigation files. <i>[key: ephVersion]</i></p>"));
    13891401
    13901402  // WhatsThis, RINEX Editing & QC
     
    15931605  delete _rnxFileCheckBox;
    15941606  delete _rnxScrpLineEdit;
    1595   delete _rnxV2CheckBox;
     1607  delete _rnxVersComboBox;
    15961608  delete _rnxV2Priority;
    15971609  delete _ephPathLineEdit;
    15981610  delete _ephIntrComboBox;
    15991611  delete _ephOutPortLineEdit;
    1600   delete _ephV2CheckBox;
     1612  delete _ephVersComboBox;
    16011613  delete _corrPathLineEdit;
    16021614  delete _corrIntrComboBox;
     
    20582070  settings.setValue("rnxScript",    _rnxScrpLineEdit->text());
    20592071  settings.setValue("rnxV2Priority",_rnxV2Priority->text());
    2060   settings.setValue("rnxV2",        _rnxV2CheckBox->checkState());
     2072  settings.setValue("rnxVersion",   _rnxVersComboBox->currentText());
    20612073// RINEX Ephemeris
    20622074  settings.setValue("ephPath",       _ephPathLineEdit->text());
    20632075  settings.setValue("ephIntr",       _ephIntrComboBox->currentText());
    20642076  settings.setValue("ephOutPort",    _ephOutPortLineEdit->text());
    2065   settings.setValue("ephV2",         _ephV2CheckBox->checkState());
     2077  settings.setValue("ephVersion",    _ephVersComboBox->currentText());
    20662078// Broadcast Corrections
    20672079  settings.setValue("corrPath",    _corrPathLineEdit->text());
     
    25552567    enableWidget(enable, _rnxScrpLineEdit);
    25562568    enableWidget(enable, _rnxV2Priority);
    2557     enableWidget(enable, _rnxV2CheckBox);
     2569    enableWidget(enable, _rnxVersComboBox);
    25582570
    25592571    bool enable1 = true;
    2560     enable1 = _rnxV2CheckBox->isChecked();
     2572    enable1 = _rnxVersComboBox->currentText() == "2";
    25612573    if (enable && enable1) {
    25622574      enableWidget(true, _rnxV2Priority);
     
    25692581  // RINEX Observations, Signal Priority
    25702582  // -----------------------------------
    2571   if (sender() == 0 || sender() == _rnxV2CheckBox) {
     2583  if (sender() == 0 || sender() == _rnxVersComboBox) {
    25722584    if (!_rnxPathLineEdit->text().isEmpty()) {
    25732585      enableWidget(enable, _rnxIntrComboBox);
    2574       enable = _rnxV2CheckBox->isChecked();
     2586      enable = _rnxVersComboBox->currentText() == "2";
    25752587      enableWidget(enable, _rnxV2Priority);
    25762588    }
     
    25822594    enable = !_ephPathLineEdit->text().isEmpty() || !_ephOutPortLineEdit->text().isEmpty();
    25832595    enableWidget(enable, _ephIntrComboBox);
    2584     enableWidget(enable, _ephV2CheckBox);
     2596    enableWidget(enable, _ephVersComboBox);
    25852597  }
    25862598
Note: See TracChangeset for help on using the changeset viewer.