source: ntrip/trunk/BNC/bncwindow.cpp@ 3613

Last change on this file since 3613 was 3613, checked in by mervart, 13 years ago
File size: 112.6 KB
RevLine 
[280]1// Part of BNC, a utility for retrieving decoding and
[464]2// converting GNSS data streams from NTRIP broadcasters.
[280]3//
[464]4// Copyright (C) 2007
[280]5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
[464]7// Czech Technical University Prague, Department of Geodesy
[280]8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
[35]24
25/* -------------------------------------------------------------------------
[93]26 * BKG NTRIP Client
[35]27 * -------------------------------------------------------------------------
28 *
29 * Class: bncWindow
30 *
31 * Purpose: This class implements the main application window.
32 *
33 * Author: L. Mervart
34 *
35 * Created: 24-Dec-2005
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
[1175]41#include <iostream>
42
[274]43#include <unistd.h>
[35]44#include "bncwindow.h"
[149]45#include "bncapp.h"
[35]46#include "bncgetthread.h"
47#include "bnctabledlg.h"
[1610]48#include "bncipport.h"
[1780]49#include "bncudpport.h"
[1737]50#include "bncserialport.h"
[177]51#include "bnchlpdlg.h"
[168]52#include "bnchtml.h"
[366]53#include "bnctableitem.h"
[1535]54#include "bncsettings.h"
[1932]55#include "bncfigure.h"
[1972]56#include "bncfigurelate.h"
[2141]57#include "bncfigureppp.h"
[2012]58#include "bncversion.h"
[3245]59#include "bncbytescounter.h"
[3357]60#include "bncsslconfig.h"
[3239]61#include "upload/bnccustomtrafo.h"
[3249]62#include "upload/bncephuploadcaster.h"
[3602]63#include "qtfilechooser.h"
[35]64
65using namespace std;
66
[1925]67// Constructor
68////////////////////////////////////////////////////////////////////////////
[35]69bncWindow::bncWindow() {
70
[3249]71 _caster = 0;
72 _casterEph = 0;
[609]73
[1932]74 _bncFigure = new bncFigure(this);
[1972]75 _bncFigureLate = new bncFigureLate(this);
[2141]76 _bncFigurePPP = new bncFigurePPP(this);
[1912]77
[91]78 int ww = QFontMetrics(this->font()).width('w');
[199]79
[2269]80 static const QStringList labels = QString("account, Streams: resource loader / mountpoint, decoder, lat, long, nmea, ntrip, bytes").split(",");
[35]81
[2801]82 setMinimumSize(85*ww, 65*ww);
[375]83
[2012]84 setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION));
[91]85
[1299]86 connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)),
87 this, SLOT(slotWindowMessage(QByteArray,bool)));
[1171]88
[35]89 // Create Actions
90 // --------------
[108]91 _actHelp = new QAction(tr("&Help Contents"),this);
92 connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
[35]93
[108]94 _actAbout = new QAction(tr("&About BNC"),this);
95 connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
96
[996]97 _actFlowchart = new QAction(tr("&Flow Chart"),this);
[989]98 connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
99
[261]100 _actFontSel = new QAction(tr("Select &Font"),this);
[110]101 connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
102
[1905]103 _actSaveOpt = new QAction(tr("&Save && Reread Configuration"),this);
[35]104 connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
105
106 _actQuit = new QAction(tr("&Quit"),this);
107 connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
108
[1874]109 _actAddMountPoints = new QAction(tr("Add &Stream"),this);
[35]110 connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
111
[1874]112 _actDeleteMountPoints = new QAction(tr("&Delete Stream"),this);
[35]113 connect(_actDeleteMountPoints, SIGNAL(triggered()), SLOT(slotDeleteMountPoints()));
[83]114 _actDeleteMountPoints->setEnabled(false);
[35]115
[182]116 _actGetData = new QAction(tr("Sta&rt"),this);
[35]117 connect(_actGetData, SIGNAL(triggered()), SLOT(slotGetData()));
118
[3608]119 _actPostProcessing = new QAction(tr("Start PP"),this);
120 connect(_actPostProcessing, SIGNAL(triggered()), SLOT(slotPostProcessing()));
121
[3610]122 _postProgressBar = new QProgressBar;
123 _postProgressBar->setTextVisible(true);
124 _postProgressBar->setMinimum(0);
125 _postProgressBar->setMaximum(100);
126 _postProgressBar->setMinimumWidth(20*ww);
127 _postProgressBar->setMaximumWidth(20*ww);
128
[182]129 _actStop = new QAction(tr("Sto&p"),this);
130 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
131 _actStop->setEnabled(false);
132
[2596]133 _actwhatsthis= new QAction(tr("Help ?=Shift+F1"),this);
[399]134 connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
135
[679]136 CreateMenu();
137 AddToolbar();
[35]138
[1535]139 bncSettings settings;
[1678]140
[3356]141 // Netowrk Options
142 // ---------------
[35]143 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
144 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
[565]145
[2128]146 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
147 this, SLOT(slotBncTextChanged()));
148
[3356]149 _sslCaCertPathLineEdit = new QLineEdit(settings.value("sslCaCertPath").toString());
150 _ignoreSslErrorsCheckBox = new QCheckBox();
151 _ignoreSslErrorsCheckBox->setCheckState(Qt::CheckState(
152 settings.value("ignoreSslErrors").toInt()));
153
[1678]154 // General Options
155 // ---------------
156 _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
[2386]157 _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString());
[259]158 _rnxAppendCheckBox = new QCheckBox();
159 _rnxAppendCheckBox->setCheckState(Qt::CheckState(
160 settings.value("rnxAppend").toInt()));
[1678]161 _onTheFlyComboBox = new QComboBox();
162 _onTheFlyComboBox->setEditable(false);
163 _onTheFlyComboBox->addItems(QString("1 day,1 hour,1 min").split(","));
164 int ii = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
165 if (ii != -1) {
166 _onTheFlyComboBox->setCurrentIndex(ii);
167 }
[1333]168 _autoStartCheckBox = new QCheckBox();
169 _autoStartCheckBox->setCheckState(Qt::CheckState(
170 settings.value("autoStart").toInt()));
[1678]171
172 // RINEX Observations Options
173 // --------------------------
174 _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
[106]175 _rnxIntrComboBox = new QComboBox();
176 _rnxIntrComboBox->setEditable(false);
[405]177 _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
[1678]178 ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
[106]179 if (ii != -1) {
180 _rnxIntrComboBox->setCurrentIndex(ii);
181 }
[1678]182 _rnxSamplSpinBox = new QSpinBox();
183 _rnxSamplSpinBox->setMinimum(0);
184 _rnxSamplSpinBox->setMaximum(60);
185 _rnxSamplSpinBox->setSingleStep(5);
186 _rnxSamplSpinBox->setValue(settings.value("rnxSampl").toInt());
187 _rnxSamplSpinBox->setSuffix(" sec");
188 _rnxSkelLineEdit = new QLineEdit(settings.value("rnxSkel").toString());
189 _rnxSkelLineEdit->setMaximumWidth(5*ww);
190 _rnxScrpLineEdit = new QLineEdit(settings.value("rnxScript").toString());
191 _rnxV3CheckBox = new QCheckBox();
192 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
193
[2128]194 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
195 this, SLOT(slotBncTextChanged()));
196
[1678]197 // RINEX Ephemeris Options
198 // -----------------------
199 _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
[560]200 _ephIntrComboBox = new QComboBox();
201 _ephIntrComboBox->setEditable(false);
[647]202 _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
[560]203 int jj = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
204 if (jj != -1) {
205 _ephIntrComboBox->setCurrentIndex(jj);
206 }
[1678]207 _outEphPortLineEdit = new QLineEdit(settings.value("outEphPort").toString());
208 _ephV3CheckBox = new QCheckBox();
209 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
210
[2128]211 connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
212 this, SLOT(slotBncTextChanged()));
213
214 connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
215 this, SLOT(slotBncTextChanged()));
216
[1682]217 // Broadcast Corrections Options
[1678]218 // -----------------------------
219 _corrPathLineEdit = new QLineEdit(settings.value("corrPath").toString());
[934]220 _corrIntrComboBox = new QComboBox();
221 _corrIntrComboBox->setEditable(false);
222 _corrIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
223 int mm = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
224 if (mm != -1) {
225 _corrIntrComboBox->setCurrentIndex(mm);
226 }
[1678]227 _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
[967]228 _corrTimeSpinBox = new QSpinBox();
[3109]229 _corrTimeSpinBox->setMinimum(0);
[2436]230 _corrTimeSpinBox->setMaximum(60);
[967]231 _corrTimeSpinBox->setSingleStep(1);
232 _corrTimeSpinBox->setSuffix(" sec");
233 _corrTimeSpinBox->setValue(settings.value("corrTime").toInt());
[740]234
[2128]235 connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
236 this, SLOT(slotBncTextChanged()));
237
238 connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),
239 this, SLOT(slotBncTextChanged()));
240
[1678]241 // Feed Engine Options
242 // -------------------
243 _outPortLineEdit = new QLineEdit(settings.value("outPort").toString());
244 _waitTimeSpinBox = new QSpinBox();
245 _waitTimeSpinBox->setMinimum(1);
246 _waitTimeSpinBox->setMaximum(30);
247 _waitTimeSpinBox->setSingleStep(1);
248 _waitTimeSpinBox->setSuffix(" sec");
249 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
[740]250 _binSamplSpinBox = new QSpinBox();
251 _binSamplSpinBox->setMinimum(0);
252 _binSamplSpinBox->setMaximum(60);
253 _binSamplSpinBox->setSingleStep(5);
254 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
255 _binSamplSpinBox->setSuffix(" sec");
[1678]256 _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
257 _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
[740]258
[2128]259 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
260 this, SLOT(slotBncTextChanged()));
261
262 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
263 this, SLOT(slotBncTextChanged()));
264
[1746]265 // Serial Output Options
266 // ---------------------
[1678]267 _serialMountPointLineEdit = new QLineEdit(settings.value("serialMountPoint").toString());
[1327]268 _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
[1329]269 _serialBaudRateComboBox = new QComboBox();
[1332]270 _serialBaudRateComboBox->addItems(QString("110,300,600,"
271 "1200,2400,4800,9600,19200,38400,57600,115200").split(","));
[1678]272 int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
[1329]273 if (kk != -1) {
274 _serialBaudRateComboBox->setCurrentIndex(kk);
275 }
[1678]276 _serialFlowControlComboBox = new QComboBox();
277 _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(","));
278 kk = _serialFlowControlComboBox->findText(settings.value("serialFlowControl").toString());
[1329]279 if (kk != -1) {
[1678]280 _serialFlowControlComboBox->setCurrentIndex(kk);
[1329]281 }
282 _serialDataBitsComboBox = new QComboBox();
283 _serialDataBitsComboBox->addItems(QString("5,6,7,8").split(","));
284 kk = _serialDataBitsComboBox->findText(settings.value("serialDataBits").toString());
285 if (kk != -1) {
286 _serialDataBitsComboBox->setCurrentIndex(kk);
287 }
[1678]288 _serialParityComboBox = new QComboBox();
289 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(","));
290 kk = _serialParityComboBox->findText(settings.value("serialParity").toString());
291 if (kk != -1) {
292 _serialParityComboBox->setCurrentIndex(kk);
293 }
[1329]294 _serialStopBitsComboBox = new QComboBox();
295 _serialStopBitsComboBox->addItems(QString("1,2").split(","));
296 kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString());
297 if (kk != -1) {
298 _serialStopBitsComboBox->setCurrentIndex(kk);
299 }
[1595]300 _serialAutoNMEAComboBox = new QComboBox();
301 _serialAutoNMEAComboBox->addItems(QString("Auto,Manual").split(","));
302 kk = _serialAutoNMEAComboBox->findText(settings.value("serialAutoNMEA").toString());
303 if (kk != -1) {
304 _serialAutoNMEAComboBox->setCurrentIndex(kk);
305 }
[1601]306 _serialFileNMEALineEdit = new QLineEdit(settings.value("serialFileNMEA").toString());
[1595]307 _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString());
[1678]308
[2128]309 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
310 this, SLOT(slotBncTextChanged()));
311
312 connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
313 this, SLOT(slotBncTextChanged()));
314
[1678]315 // Outages Options
316 // ---------------
317 _obsRateComboBox = new QComboBox();
318 _obsRateComboBox->setEditable(false);
319 _obsRateComboBox->addItems(QString(",0.1 Hz,0.2 Hz,0.5 Hz,1 Hz,5 Hz").split(","));
320 kk = _obsRateComboBox->findText(settings.value("obsRate").toString());
321 if (kk != -1) {
322 _obsRateComboBox->setCurrentIndex(kk);
323 }
324 _adviseFailSpinBox = new QSpinBox();
325 _adviseFailSpinBox->setMinimum(0);
326 _adviseFailSpinBox->setMaximum(60);
327 _adviseFailSpinBox->setSingleStep(1);
328 _adviseFailSpinBox->setSuffix(" min");
329 _adviseFailSpinBox->setValue(settings.value("adviseFail").toInt());
330 _adviseRecoSpinBox = new QSpinBox();
331 _adviseRecoSpinBox->setMinimum(0);
332 _adviseRecoSpinBox->setMaximum(60);
333 _adviseRecoSpinBox->setSingleStep(1);
334 _adviseRecoSpinBox->setSuffix(" min");
335 _adviseRecoSpinBox->setValue(settings.value("adviseReco").toInt());
336 _adviseScriptLineEdit = new QLineEdit(settings.value("adviseScript").toString());
337
[2128]338 connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
339 this, SLOT(slotBncTextChanged()));
340
[1678]341 // Miscellaneous Options
342 // ---------------------
343 _miscMountLineEdit = new QLineEdit(settings.value("miscMount").toString());
[2003]344 _perfIntrComboBox = new QComboBox();
[728]345 _perfIntrComboBox->setEditable(false);
[1472]346 _perfIntrComboBox->addItems(QString(",2 sec, 10 sec,1 min,5 min,15 min,1 hour,6 hours,1 day").split(","));
[728]347 int ll = _perfIntrComboBox->findText(settings.value("perfIntr").toString());
[709]348 if (ll != -1) {
[728]349 _perfIntrComboBox->setCurrentIndex(ll);
[709]350 }
[1678]351 _scanRTCMCheckBox = new QCheckBox();
352 _scanRTCMCheckBox->setCheckState(Qt::CheckState(
353 settings.value("scanRTCM").toInt()));
[709]354
[2128]355 connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
356 this, SLOT(slotBncTextChanged()));
357
[2003]358 // PPP Options
359 // -----------
[2719]360 _pppMountLineEdit = new QLineEdit(settings.value("pppMount").toString());
[2967]361 _pppCorrMountLineEdit = new QLineEdit(settings.value("pppCorrMount").toString());
[2719]362 _pppNMEALineEdit = new QLineEdit(settings.value("nmeaFile").toString());
363 _pppNMEAPortLineEdit = new QLineEdit(settings.value("nmeaPort").toString());
364 _pppSigCLineEdit = new QLineEdit(settings.value("pppSigmaCode").toString());
365 _pppSigPLineEdit = new QLineEdit(settings.value("pppSigmaPhase").toString());
366 _pppSigCrd0 = new QLineEdit(settings.value("pppSigCrd0").toString());
367 _pppSigCrdP = new QLineEdit(settings.value("pppSigCrdP").toString());
368 _pppSigTrp0 = new QLineEdit(settings.value("pppSigTrp0").toString());
369 _pppSigTrpP = new QLineEdit(settings.value("pppSigTrpP").toString());
370 _pppAverageLineEdit = new QLineEdit(settings.value("pppAverage").toString());
371 _pppQuickStartLineEdit = new QLineEdit(settings.value("pppQuickStart").toString());
[3112]372 _pppMaxSolGapLineEdit = new QLineEdit(settings.value("pppMaxSolGap").toString());
[2719]373 _pppRefCrdXLineEdit = new QLineEdit(settings.value("pppRefCrdX").toString());
374 _pppRefCrdYLineEdit = new QLineEdit(settings.value("pppRefCrdY").toString());
375 _pppRefCrdZLineEdit = new QLineEdit(settings.value("pppRefCrdZ").toString());
[3284]376 _pppRefdNLineEdit = new QLineEdit(settings.value("pppRefdN").toString());
377 _pppRefdELineEdit = new QLineEdit(settings.value("pppRefdE").toString());
378 _pppRefdULineEdit = new QLineEdit(settings.value("pppRefdU").toString());
[2811]379 _pppSync = new QLineEdit(settings.value("pppSync").toString());
[2941]380 _pppAntennaLineEdit = new QLineEdit(settings.value("pppAntenna").toString());
381 _pppAntexLineEdit = new QLineEdit(settings.value("pppAntex").toString());
[2473]382
[2941]383
[2341]384 _pppSPPComboBox = new QComboBox();
385 _pppSPPComboBox->setEditable(false);
[3605]386 _pppSPPComboBox->addItems(QString("PPP,SPP,Post-Processing").split(","));
[2341]387 int ik = _pppSPPComboBox->findText(settings.value("pppSPP").toString());
388 if (ik != -1) {
389 _pppSPPComboBox->setCurrentIndex(ik);
390 }
[2083]391 _pppUsePhaseCheckBox = new QCheckBox();
392 _pppUsePhaseCheckBox->setCheckState(Qt::CheckState(
393 settings.value("pppUsePhase").toInt()));
[2086]394 _pppEstTropoCheckBox = new QCheckBox();
395 _pppEstTropoCheckBox->setCheckState(Qt::CheckState(
396 settings.value("pppEstTropo").toInt()));
[2137]397 _pppGLONASSCheckBox = new QCheckBox();
398 _pppGLONASSCheckBox->setCheckState(Qt::CheckState(
399 settings.value("pppGLONASS").toInt()));
[2794]400 _pppGalileoCheckBox = new QCheckBox();
401 _pppGalileoCheckBox->setCheckState(Qt::CheckState(
402 settings.value("pppGalileo").toInt()));
[2003]403
[2718]404 _pppPlotCoordinates = new QCheckBox();
405 _pppPlotCoordinates->setCheckState(Qt::CheckState(
406 settings.value("pppPlotCoordinates").toInt()));
407
[2949]408 _pppApplySatAntCheckBox = new QCheckBox();
409 _pppApplySatAntCheckBox->setCheckState(Qt::CheckState(
410 settings.value("pppApplySatAnt").toInt()));
[2941]411
[2128]412 connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
413 this, SLOT(slotBncTextChanged()));
414
[2967]415 connect(_pppCorrMountLineEdit, SIGNAL(textChanged(const QString &)),
416 this, SLOT(slotBncTextChanged()));
417
[2727]418 connect(_pppUsePhaseCheckBox, SIGNAL(stateChanged(int)),
[2303]419 this, SLOT(slotBncTextChanged()));
420
[2727]421 connect(_pppRefCrdXLineEdit, SIGNAL(textChanged(const QString &)),
[2473]422 this, SLOT(slotBncTextChanged()));
[2727]423 connect(_pppRefCrdYLineEdit, SIGNAL(textChanged(const QString &)),
424 this, SLOT(slotBncTextChanged()));
425 connect(_pppRefCrdZLineEdit, SIGNAL(textChanged(const QString &)),
426 this, SLOT(slotBncTextChanged()));
[3284]427 connect(_pppRefdNLineEdit, SIGNAL(textChanged(const QString &)),
428 this, SLOT(slotBncTextChanged()));
429 connect(_pppRefdELineEdit, SIGNAL(textChanged(const QString &)),
430 this, SLOT(slotBncTextChanged()));
431 connect(_pppRefdULineEdit, SIGNAL(textChanged(const QString &)),
432 this, SLOT(slotBncTextChanged()));
[2473]433
[2727]434 connect(_pppEstTropoCheckBox, SIGNAL(stateChanged(int)),
435 this, SLOT(slotBncTextChanged()));
436
[2811]437 connect(_pppSync, SIGNAL(textChanged(const QString &)),
438 this, SLOT(slotBncTextChanged()));
439
[2815]440 connect(_pppSPPComboBox, SIGNAL(currentIndexChanged(const QString &)),
441 this, SLOT(slotBncTextChanged()));
442
[2946]443 connect(_pppAntexLineEdit, SIGNAL(textChanged(const QString &)),
444 this, SLOT(slotBncTextChanged()));
445
[3112]446 connect(_pppQuickStartLineEdit, SIGNAL(textChanged(const QString &)),
447 this, SLOT(slotBncTextChanged()));
448
[1678]449 // Streams
450 // -------
[1352]451 _mountPointsTable = new QTableWidget(0,8);
[375]452
[679]453 _mountPointsTable->horizontalHeader()->resizeSection(1,34*ww);
[366]454 _mountPointsTable->horizontalHeader()->resizeSection(2,9*ww);
455 _mountPointsTable->horizontalHeader()->resizeSection(3,7*ww);
456 _mountPointsTable->horizontalHeader()->resizeSection(4,7*ww);
457 _mountPointsTable->horizontalHeader()->resizeSection(5,5*ww);
[1678]458 _mountPointsTable->horizontalHeader()->resizeSection(6,5*ww);
[199]459 _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
[203]460 _mountPointsTable->horizontalHeader()->setStretchLastSection(true);
[2269]461 _mountPointsTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
[199]462 _mountPointsTable->setHorizontalHeaderLabels(labels);
[115]463 _mountPointsTable->setGridStyle(Qt::NoPen);
464 _mountPointsTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
[35]465 _mountPointsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
466 _mountPointsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
[111]467 _mountPointsTable->hideColumn(0);
[83]468 connect(_mountPointsTable, SIGNAL(itemSelectionChanged()),
469 SLOT(slotSelectionChanged()));
[1178]470 populateMountPointsTable();
[35]471
[399]472 _log = new QTextBrowser();
[83]473 _log->setReadOnly(true);
[35]474
[3059]475 // Combination
476 // -----------
477 _cmbTable = new QTableWidget(0,3);
478 _cmbTable->setHorizontalHeaderLabels(QString("Mountpoint, AC Name, Weight").split(","));
479 _cmbTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
480 _cmbTable->setSelectionBehavior(QAbstractItemView::SelectRows);
481 _cmbTable->setMaximumWidth(30*ww);
482 _cmbTable->horizontalHeader()->resizeSection(0,10*ww);
483 _cmbTable->horizontalHeader()->resizeSection(1,8*ww);
484 _cmbTable->horizontalHeader()->resizeSection(2,8*ww);
485 _cmbTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
486 _cmbTable->horizontalHeader()->setStretchLastSection(true);
487 _cmbTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
[3328]488
489 _cmbMaxresLineEdit = new QLineEdit(settings.value("cmbMaxres").toString());
[3059]490
491 QPushButton* addCmbRowButton = new QPushButton("Add Row");
492 QPushButton* delCmbRowButton = new QPushButton("Delete");
493
[3066]494 connect(_cmbTable, SIGNAL(itemSelectionChanged()),
495 SLOT(slotBncTextChanged()));
496
[3469]497 _cmbMethodComboBox = new QComboBox();
498 _cmbMethodComboBox->setEditable(false);
[3480]499 _cmbMethodComboBox->addItems(QString("Filter,Single-Epoch").split(","));
[3469]500 int im = _cmbMethodComboBox->findText(settings.value("cmbMethod").toString());
501 if (im != -1) {
502 _cmbMethodComboBox->setCurrentIndex(im);
503 }
504
[3164]505 // Upload Results
[3152]506 // -------------
[3193]507 _uploadTable = new QTableWidget(0,9);
508 _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mount, Password, System, CoM, SP3 File, RNX File, bytes").split(","));
[3164]509 _uploadTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
510 _uploadTable->setSelectionBehavior(QAbstractItemView::SelectRows);
511 _uploadTable->horizontalHeader()->resizeSection(0,13*ww);
512 _uploadTable->horizontalHeader()->resizeSection(1,5*ww);
513 _uploadTable->horizontalHeader()->resizeSection(2,6*ww);
514 _uploadTable->horizontalHeader()->resizeSection(3,8*ww);
515 _uploadTable->horizontalHeader()->resizeSection(4,11*ww);
516 _uploadTable->horizontalHeader()->resizeSection(5,4*ww);
[3193]517 _uploadTable->horizontalHeader()->resizeSection(6,15*ww);
518 _uploadTable->horizontalHeader()->resizeSection(7,15*ww);
519 _uploadTable->horizontalHeader()->resizeSection(8,10*ww);
[3164]520 _uploadTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
[3193]521 _uploadTable->horizontalHeader()->setStretchLastSection(true);
[3164]522 _uploadTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
[3152]523
[3585]524 connect(_uploadTable, SIGNAL(itemSelectionChanged()),
525 SLOT(slotBncTextChanged()));
526
[3164]527 QPushButton* addUploadRowButton = new QPushButton("Add Row");
[3193]528 QPushButton* delUploadRowButton = new QPushButton("Del Row");
529 QPushButton* setUploadTrafoButton = new QPushButton("Custom Trafo");
[3197]530 _uploadIntrComboBox = new QComboBox;
531 _uploadIntrComboBox->setEditable(false);
[3271]532 _uploadIntrComboBox->addItems(QString("1 day,1 hour, 30 min,15 min,10 min,5 min,2 min,1 min").split(","));
[3197]533 ii = _uploadIntrComboBox->findText(settings.value("uploadIntr").toString());
534 if (ii != -1) {
535 _uploadIntrComboBox->setCurrentIndex(ii);
536 }
537 _uploadSamplSpinBox = new QSpinBox;
[3584]538 _uploadSamplSpinBox->setMinimum(5);
[3197]539 _uploadSamplSpinBox->setMaximum(60);
540 _uploadSamplSpinBox->setSingleStep(5);
541 _uploadSamplSpinBox->setMaximumWidth(9*ww);
542 _uploadSamplSpinBox->setValue(settings.value("uploadSampl").toInt());
543 _uploadSamplSpinBox->setSuffix(" sec");
[3152]544
[3585]545 _uploadSamplOrbSpinBox = new QSpinBox;
546 _uploadSamplOrbSpinBox->setMinimum(0);
547 _uploadSamplOrbSpinBox->setMaximum(60);
548 _uploadSamplOrbSpinBox->setSingleStep(5);
549 _uploadSamplOrbSpinBox->setMaximumWidth(9*ww);
550 _uploadSamplOrbSpinBox->setValue(settings.value("uploadSamplOrb").toInt());
551 _uploadSamplOrbSpinBox->setSuffix(" sec");
[3152]552
[3240]553 // Upload RTCM3 Ephemeris
554 // ----------------------
555 _uploadEphHostLineEdit = new QLineEdit(settings.value("uploadEphHost").toString());
556 _uploadEphPortLineEdit = new QLineEdit(settings.value("uploadEphPort").toString());
557 _uploadEphPasswordLineEdit = new QLineEdit(settings.value("uploadEphPassword").toString());
558 _uploadEphPasswordLineEdit->setEchoMode(QLineEdit::PasswordEchoOnEdit);
559 _uploadEphMountpointLineEdit = new QLineEdit(settings.value("uploadEphMountpoint").toString());
560 _uploadEphSampleSpinBox = new QSpinBox;
[3271]561 _uploadEphSampleSpinBox->setMinimum(5);
[3240]562 _uploadEphSampleSpinBox->setMaximum(60);
563 _uploadEphSampleSpinBox->setSingleStep(5);
564 _uploadEphSampleSpinBox->setMaximumWidth(9*ww);
565 _uploadEphSampleSpinBox->setValue(settings.value("uploadEphSample").toInt());
566 _uploadEphSampleSpinBox->setSuffix(" sec");
[3245]567 _uploadEphBytesCounter = new bncBytesCounter;
[3240]568
[683]569 // WhatsThis
570 // ---------
[684]571 _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNC within a protected Local Area Network (LAN), you might need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator.</p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the NTRIP broadcasters. If these are not possible, you might need to run BNC outside your LAN on a network that has unobstructed connection to the Internet.</p>"));
[1442]572 _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC.</p>"));
[1467]573 _waitTimeSpinBox->setWhatsThis(tr("<p>When feeding a real-time GNSS network engine waiting for synchronized input epoch by epoch, BNC drops whatever is received later than 'Wait for full epoch' seconds. A value of 3 to 5 seconds is recommended, depending on the latency of the incoming streams and the delay acceptable to your real-time GNSS network engine or products.</p>"));
[683]574 _outFileLineEdit->setWhatsThis(tr("Specify the full path to a file where synchronized observations are saved in plain ASCII format. Beware that the size of this file can rapidly increase depending on the number of incoming streams."));
[3163]575 _outPortLineEdit->setWhatsThis(tr("BNC can produce synchronized observations in a plain ASCII format on your local host through an IP port. Specify a port number here to activate this function."));
576 _outUPortLineEdit->setWhatsThis(tr("BNC can produce unsynchronized observations in a plain ASCII format on your local host through an IP port. Specify a port number here to activate this function."));
[683]577 _outEphPortLineEdit->setWhatsThis(tr("BNC can produce ephemeris data in RINEX ASCII format on your local host through an IP port. Specify a port number here to activate this function."));
[951]578 _corrPortLineEdit->setWhatsThis(tr("BNC can produce Broadcast Ephemeris Corrections on your local host through an IP port. Specify a port number here to activate this function."));
[3122]579 _corrTimeSpinBox->setWhatsThis(tr("<p>Concerning output through IP port, BNC drops Broadcast Ephemeris Corrections received later than 'Wait for full epoch' seconds. A value of 2 to 5 seconds is recommended, depending on the latency of the incoming correction stream(s) and the delay acceptable to your real-time application.</p><p>Specifying a value of '0' means that BNC immediately outputs all incoming Broadcast Epemeris Corrections and does not drop any of them for latency reasons.</p>"));
[683]580 _rnxPathLineEdit->setWhatsThis(tr("Here you specify the path to where the RINEX Observation files will be stored. If the specified directory does not exist, BNC will not create RINEX Observation files."));
581 _ephPathLineEdit->setWhatsThis(tr("Specify the path for saving Broadcast Ephemeris data as RINEX Navigation files. If the specified directory does not exist, BNC will not create RINEX Navigation files."));
[968]582 _corrPathLineEdit->setWhatsThis(tr("Specify a directory for saving Broadcast Ephemeris Correction files. If the specified directory does not exist, BNC will not create the files."));
[1440]583 _rnxScrpLineEdit->setWhatsThis(tr("<p>Whenever a RINEX Observation file is saved, you might want to compress, copy or upload it immediately via FTP. BNC allows you to execute a script/batch file to carry out these operations. To do that specify the full path of the script/batch file here. BNC will pass the full RINEX Observation file path to the script as a command line parameter (%1 on Windows systems, $1 onUnix/Linux systems).</p>"));
[1543]584 _rnxSkelLineEdit->setWhatsThis(tr("<p>BNC allows using personal skeleton files that contain the header records you would like to include. You can derive a personal RINEX header skeleton file from the information given in an up to date sitelog.</p><p>A file in the RINEX Observations 'Directory' with a 'Skeleton extension' suffix is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream.</p>"));
[683]585 _rnxAppendCheckBox->setWhatsThis(tr("<p>When BNC is started, new files are created by default and any existing files with the same name will be overwritten. However, users might want to append already existing files following a restart of BNC, a system crash or when BNC crashed. Tick 'Append files' to continue with existing files and keep what has been recorded so far.</p>"));
[1333]586 _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNC at startup time in window mode with preassigned processing options.</p>"));
[2392]587 _rawOutFileLineEdit->setWhatsThis(tr("<p>Save all data coming in through various streams in the received order and format in one file.</p>"));
588
[1916]589 _onTheFlyComboBox->setWhatsThis(tr("<p>When operating BNC online in 'no window' mode, some configuration parameters can be changed on-the-fly without interrupting the running process. For that BNC rereads parts of its configuration in pre-defined intervals.<p></p>Select '1 min', '1 hour', or '1 day' to force BNC to reread its configuration every full minute, hour, or day and let in between edited configuration options become effective on-the-fly without terminating uninvolved threads.</p><p>Note that when operating BNC in window mode, on-the-fly changeable configuration options become effective immediately through 'Save & Reread Configuration'.</p>"));
[683]590 _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file.</p>"));
591 _ephIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Navigation file.</p>"));
[951]592 _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of the Broadcast Ephemeris Correction files.</p>"));
[683]593 _rnxSamplSpinBox->setWhatsThis(tr("<p>Select the RINEX Observation sampling interval in seconds. A value of zero '0' tells BNC to store all received epochs into RINEX.</p>"));
[1440]594 _binSamplSpinBox->setWhatsThis(tr("<p>Select the synchronized observation sampling interval in seconds. A value of zero '0' tells BNC to send/store all received epochs.</p>"));
[1453]595 _obsRateComboBox->setWhatsThis(tr("<p>BNC can collect all returns (success or failure) coming from a decoder within a certain short time span to then decide whether a stream has an outage or its content is corrupted. The procedure needs a rough estimate of the expected 'Observation rate' of the incoming streams. When a continuous problem is detected, BNC can inform its operator about this event through an advisory note.</p>"));
[1440]596 _adviseRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of bad observations, an advisory note is generated when valid observations are received again throughout the 'Recovery threshold' time span. A value of about 5min (default) is recommended.</p><p>A value of zero '0' means that for any stream recovery, however short, BNC immediately generates an advisory note.</p>"));
597 _adviseFailSpinBox->setWhatsThis(tr("<p>An advisory note is generated when no (or only corrupted) observations are seen throughout the 'Failure threshold' time span. A value of 15 min (default) is recommended.</p><p>A value of zero '0' means that for any stream failure, however short, BNC immediately generates an advisory note.</p>"));
[1955]598 _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab on the bottom of this window. They can be saved into a file when a valid path is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date."));
[1892]599 _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle advisory notes generated in the event of corrupted streams or stream outages. The affected mountpoint and one of the comments 'Begin_Outage', 'End_Outage', 'Begin_Corrupted', or 'End_Corrupted' are passed on to the script as command line parameters.</p><p>The script may have the task to send the advisory notes by email to BNC's operator and/or to the affected stream provider. An empty option field (default) or invalid path means that you don't want to use this option.</p>"));
[1955]600 _perfIntrComboBox->setWhatsThis(tr("<p>BNC can average latencies per stream over a certain period of GPS time. The resulting mean latencies are recorded in the 'Log' tab at the end of each 'Log latency' interval together with results of a statistical evaluation (approximate number of covered epochs, data gaps).</p><p>Select a 'Log latency' interval or select the empty option field if you do not want BNC to log latencies and statistical information.</p>"));
[3345]601 _mountPointsTable->setWhatsThis(tr("<p>Streams selected for retrieval are listed in the 'Streams' section. Clicking on 'Add Stream' button will open a window that allows the user to select data streams from an NTRIP broadcaster according to their mountpoints. To remove a stream from the 'Streams' list, highlight it by clicking on it and hit the 'Delete Stream' button. You can also remove multiple streams by highlighting them using +Shift and +Ctrl.</p><p>BNC automatically allocates one of its internal decoders to a stream based on the stream's 'format' as given in the sourcetable. BNC allows users to change this selection by editing the decoder string. Double click on the 'decoder' field, enter your preferred decoder and then hit Enter. The accepted decoder strings are 'RTCM_2.x' and 'RTCM_3.x'.</p><p>In case you need to log the raw data as is, BNC allows users to by-pass its decoders and and directly save the input in daily log files. To do this specify the decoder string as 'ZERO'.</p><p>BNC can also retrieve streams from virtual reference stations (VRS). VRS streams are indicated by a 'yes' in the 'nmea' column. To initiate these streams, the approximate latitude/longitude rover position is sent to the NTRIP broadcaster. The default values can be change according to your requirement. Double click on 'lat' and 'long' fields, enter the values you wish to send and then hit Enter.</p>"));
[1955]602 _log->setWhatsThis(tr("Records of BNC's activities are shown in the 'Log' tab. The message log covers the communication status between BNC and the NTRIP broadcaster as well as any problems that occur in the communication link, stream availability, stream delay, stream conversion etc."));
603 _bncFigure->setWhatsThis(tr("The bandwidth consumtion per stream is shown in the 'Throughput' tab in bits per second (bps) or kilo bits per second (kbps)."));
[2008]604 _bncFigureLate->setWhatsThis(tr("The individual latency of observations in each incoming stream is shown in the 'Latency' tab. Streams not carrying observations (i.e. those providing only broadcast ephemeris messages) are not considered here. Note that the calculation of correct latencies requires the clock of the host computer to be properly synchronized."));
[1454]605 _ephV3CheckBox->setWhatsThis(tr("The default format for output of RINEX Navigation data containing Broadcast Ephemeris is RINEX Version 2.11. Select 'Version 3' if you want to output the ephemeris in RINEX Version 3 format."));
[683]606 _rnxV3CheckBox->setWhatsThis(tr("The default format for RINEX Observation files is RINEX Version 2.11. Select 'Version 3' if you want to save the observations in RINEX Version 3 format."));
[1340]607 _miscMountLineEdit->setWhatsThis(tr("<p>Specify a mountpoint to apply any of the options shown below. Enter 'ALL' if you want to apply these options to all configured streams.</p><p>An empty option field (default) means that you don't want BNC to apply any of these options.</p>"));
[1453]608 _scanRTCMCheckBox->setWhatsThis(tr("<p>Tick 'Scan RTCM' to log the numbers of incomming message types as well as contained antenna coordinates, antenna heigt, and antenna descriptor.</p>"));
[1746]609 _serialMountPointLineEdit->setWhatsThis(tr("<p>Enter a 'Mountpoint' to forward the corresponding stream to a serial connected receiver.</p>"));
610 _serialPortNameLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected receiver. Valid port names are</p><pre>Windows: COM1, COM2<br>Linux: /dev/ttyS0, /dev/ttyS1<br>FreeBSD: /dev/ttyd0, /dev/ttyd1<br>Digital Unix: /dev/tty01, /dev/tty02<br>HP-UX: /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX: /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>Note that you must plug a serial cable in the port defined here before you start BNC.</p>"));
611 _serialBaudRateComboBox->setWhatsThis(tr("<p>Select a 'Baud rate' for the serial output link.</p><p>Note that your selection must equal the baud rate configured to the serial connected receiver. Note further that using a high baud rate is recommended.</p>"));
612 _serialParityComboBox->setWhatsThis(tr("<p>Select the 'Parity' for the serial output link.</p><p>Note that your selection must equal the parity selection configured to the serial connected receiver. Note further that parity is often set to 'NONE'.</p>"));
613 _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial output link.</p><p>Note that your selection must equal the number of data bits configured to the serial connected receiver. Note further that often 8 data bits are used.</p>"));
614 _serialStopBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Stop bits' for the serial output link.</p><p>Note that your selection must equal the number of stop bits configured to the serial connected receiver. Note further that often 1 stop bit is used.</p>"));
615 _serialFlowControlComboBox->setWhatsThis(tr("<p>Select a 'Flow control' for the serial output link.</p><p>Note that your selection must equal the flow control configured to the serial connected receiver. Select 'OFF' if you don't know better.</p>"));
616 _serialAutoNMEAComboBox->setWhatsThis(tr("<p>Select 'Auto' to automatically forward NMEA-GGA messages coming from your serial connected receiver to the NTRIP broadcaster and/or save them in a file.</p><p>Select 'Manual' only when handling a VRS stream and your serial connected receiver doesn't generate NMEA-GGA messages.</p>"));
617 _serialFileNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where NMEA messages coming from your serial connected receiver are saved.</p>"));
[1617]618 _serialHeightNMEALineEdit->setWhatsThis(tr("<p>Specify an approximate 'Height' above mean sea level in meter for your VRS to simulate an inital NMEA-GGA message.</p><p>The setting of this option is ignored in case of streams coming from physical reference stations.</p>"));
[2979]619 _pppMountLineEdit->setWhatsThis(tr("<p>Specify an observations stream by its mountpoint from the 'Streams' list compiled below if you want BNC to estimate coordinates for the affected receiver position through a PPP solution. Example: 'FFMJ1'</p><p>Note that PPP in BNC requires to also pull a stream carrying RTCM Version 3 satellite orbit and clock corrections to Broadcast Ephemeris referring to the satellites' Antenna Phase Centers (APC). Stream CLK11 on NTRIP broadcaster products.igs-ip.net is an example.</p><p>Pulling in addition a third stream carrying Broadcast Ephemeris messages in high repetition rate is suggested if such messages are comeing from the receiver in low repetition rate or don't come at all from there.</p>"));
620 _pppCorrMountLineEdit->setWhatsThis(tr("<p>You must specify an orbit/clock corrections stream by its mountpoint from the 'Streams' list compiled below. Example: 'CLK10'</p>"));
[2733]621 _pppSPPComboBox->setWhatsThis(tr("<p>Choose between plain Single Point Positioning (SPP) and Precise Point Positioning (PPP).</p>"));
[2089]622 _pppUsePhaseCheckBox->setWhatsThis(tr("<p>By default BNC applies a PPP solution using an ionosphere free P3 linear combination of code observations.</p><p>Tick 'Use phase obs' for an ionosphere free L3 linear combination of phase observations.</p>"));
[2087]623 _pppEstTropoCheckBox->setWhatsThis(tr("<p>By default BNC does not introduce troposphere parameters when estimating coordinates.</p><p>Tick 'Estimate tropo' to introduce troposphere parameters when estimating coordinates.</p>"));
[2139]624 _pppGLONASSCheckBox->setWhatsThis(tr("<p>By default BNC does not use GLONASS observations in PPP mode.</p><p>Tick 'Use GLONASS' for a combined processing of both, GPS and GLONASS observations in PPP mode.</p>"));
[2794]625 _pppGalileoCheckBox->setWhatsThis(tr("<p>By default BNC does not use Galileo observations in PPP mode.</p><p>Tick 'Use Galileo' for a combined processing of both, GPS and Galileo observations in PPP mode.</p>"));
[2801]626 _pppPlotCoordinates->setWhatsThis(tr("<p>BNC will plot PPP results in the 'PPP Plot' tab as North (red), East (green) and Up (blue) displacements when this option is selected. Values will be either referred to an XYZ reference coordinate (if specified) or referred to the first estimated coordinate. The sliding PPP time series window will cover the period of the latest 5 minutes.</p><p>Note that a PPP time series makes only sense for a stationary operated receiver."));
[2135]627 _pppNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where PPP results are saved as NMEA messages.</p>"));
[2188]628 _pppNMEAPortLineEdit->setWhatsThis(tr("<p>Specify an IP port number to output PPP results as NMEA messages through an IP port.</p>"));
[2733]629 _pppSigCLineEdit->setWhatsThis(tr("<p>Enter a sigma for your code observations in meters.</p><p>The higher the sigma you enter, the less the contribution of code observations to a PPP solution based on a combination of code and phase data. 5.0 (default) is likely to be an appropriate choice.</p>"));
[2939]630 _pppQuickStartLineEdit->setWhatsThis(tr("<p>Enter the lenght of a startup period in seconds for which you want to fix the PPP solution to a known XYZ coordinate as introduced above and adjust a sigma 'XYZ Ini' according to the coordinate's precision. Fixing the coordinate is done in BNC through setting the 'Sigma XYZ Noise' you define below temporarily to zero.</p><p>This so-called Quick-Start option allows the PPP solution to rapidly converge. It requires that the antenna remains unmoved on the know position throughout the startup period.</p><p>A value of 120 is likely to be an appropriate choice for 'Quick-Start'. Default is an empty option field, meaning that you don't want BNC to operate in Quick-Start mode.</p>"));
[3129]631 _pppMaxSolGapLineEdit->setWhatsThis(tr("<p>Specify a 'Maximum Solution Gap' in seconds. Should the time span between two consecutive solutions exceed this limit, the algorithm returns into the Quick-Start mode and fixes the introduced reference coordinate for the specified Quick-Start period. A value of '120' seconds could be an appropriate choice.</p><p>This option makes only sense for a stationary operated receiver where solution convergence can be enforced because a good approximation for the rover position is known. Default is an empty option field, meaning that you don't want BNC to return into the Quick-Start mode after failures caused i.e. by longer lasting outages.</p>"));
[2733]632 _pppSigPLineEdit->setWhatsThis(tr("<p>Enter a sigma for your phase observations in meters.</p><p>The higher the sigma you enter, the less the contribution of phase observations to a PPP solutions based on a combination of code and phase data. 0.02 (default) is likely to be an appropriate choice.</p>"));
633 _pppAverageLineEdit->setWhatsThis(tr("<p>Enter the length of a sliding time window in minutes. BNC will continuously output moving average positions computed from those individual positions obtained most recently throughout this period.</p><p>An empty option field (default) means that you don't want BNC to output moving average positions.</p>"));
[2763]634 _pppSigCrd0->setWhatsThis(tr("<p>Enter a sigma in meters for the initial XYZ coordinate componentes. A value of 100.0 (default) may be an appropriate choice. However, this value may be significantly smaller (i.e. 0.01) when starting for example from a station with known XZY position in Quick-Start mode."));
[2939]635 _pppSigCrdP->setWhatsThis(tr("<p>Enter a sigma in meters for the white noise of estimated XYZ coordinate components. A value of 100.0 (default) may be appropriate considering the potential movement of a rover position.</p>"));
[2737]636 _pppSigTrp0->setWhatsThis(tr("<p>Enter a sigma in meters for the a-priory model based tropospheric delay estimation. A value of 0.1 (default) may be an appropriate choice.</p>"));
[2944]637 _pppSigTrpP->setWhatsThis(tr("<p>Enter a sigma in meters per second to describe the expected variation of the tropospheric effect.</p><p>Supposing 1Hz observation data, a value of 1e-6 (default) would mean that the tropospheric effect may vary for 3600 * 1e-6 = 0.0036 meters per hour.</p>"));
[2648]638 _pppRefCrdXLineEdit->setWhatsThis(tr("<p>Enter reference coordinate X of the receiver's position.</p>"));
639 _pppRefCrdYLineEdit->setWhatsThis(tr("<p>Enter reference coordinate Y of the receiver's position.</p>"));
640 _pppRefCrdZLineEdit->setWhatsThis(tr("<p>Enter reference coordinate Z of the receiver's position.</p>"));
[3284]641 _pppRefdNLineEdit->setWhatsThis(tr("<p>Enter north antenna excentricity.</p>"));
642 _pppRefdELineEdit->setWhatsThis(tr("<p>Enter east antenna excentricity.</p>"));
643 _pppRefdULineEdit->setWhatsThis(tr("<p>Enter up antenna excentricity.</p>"));
[2733]644 _bncFigurePPP->setWhatsThis(tr("PPP time series of North (red), East (green) and Up (blue) coordinate components are shown in the 'PPP Plot' tab when the corresponting option is selected above. Values are either referred to an XYZ reference coordinate (if specified) or referred to the first estimated set of coordinate compoments. The sliding PPP time series window covers the period of the latest 5 minutes."));
[2820]645 _pppSync->setWhatsThis(tr(
[2944]646 "<p> Zero value (or empty field, default) means that BNC processes each epoch of data "
[2820]647 "immediately after its arrival using satellite clock corrections available at "
[2944]648 "that time.</p><p> Non-zero value 'Sync Corr' (i.e. 5) means that the epochs of data "
[2822]649 "are buffered and the processing of each epoch is postponed till the satellite clock "
[2944]650 "corrections not older than 'Sync Corr' seconds are available.<p>"));
651 _pppAntexLineEdit->setWhatsThis(tr("<p>IGS provides a file containing absolute phase center corrections for GNSS satellite and receiver antennas in ANTEX format. Entering the full path to such an ANTEX file is required for correcting observations for antenna phase center offsets and variations. It allows you to specify the name of your receiver's antenna (as contained in the ANTEX file) to apply such corrections.</p><p>Default is an empty option field meaning that you don't want to correct observations for antenna phase center offsets and variations.</p>"));
[2964]652 _pppAntennaLineEdit->setWhatsThis(tr("<p>Specify the receiver's antenna name as defined in your ANTEX file. Observations will be corrected for the antenna phase center's offset which may result in a reduction of a few centimeters at max. Corrections for phase center variations are not yet applied by BNC. The specified name must consist of 20 characters. Add trailing blanks if the antenna name has less then 20 characters.</p><p>Default is an empty option field meaning that you don't want to correct observations for antenna phase center offsets.</p>"));
[2974]653 _pppApplySatAntCheckBox->setWhatsThis(tr("<p>This option is not yet working.</p><p>Satellite orbit and clock corrections refer to the satellite's antenna phase centers and hence observations are actually <u>not</u> to be corrected for satellite antenna phase center offsets. However, you may like to tick 'Apply Offsets' to force BNC to correct observations for satellite antenna phase center offsets.</p><p>Default is to <u>not</u> correct observations for satellite antenna phase center offsets."));
[3150]654 _cmbTable->setWhatsThis(tr("<p>BNC allows to process several orbit and clock corrections streams in real-time to produce, encode, upload and save a combination of correctors from various providers. Hit the 'Add Row' button, Double click on the 'Mountpoint' field to enter a Broadcast Ephemeris corrections mountpoint from the 'Streams' section below and hit Enter. Then double click on the 'AC Name' field to enter your choice of an abbreviation for the Analysis Center (AC) providing the stream. Finally, double click on the 'Weight' field to enter the weight to be applied for this stream in the combination.</p><p>Note that an appropriate 'Wait for full epoch' value needs to be specified for the combination under the 'Broadcast Corrections' tab. A value of 15 seconds would make sense there if the update rate of incoming clock corrections is i.e. 10 seconds.</p><p>Note further that the sequence of rows in the 'Combination Table' is of importance because the orbit information in the final combination stream is just copied from the stream listed in the first row. Hence the first line in the 'Combination Table' defines a kind of 'Master AC'. The update rate of the combination product follows the 'Master AC's update rate.</p><p>The combination process requires Broadcast Ephemeris. Besides the orbit and clock corrections stream(s) BNC must therefore pull a stream carrying Broadcast Ephemeris in the form of RTCM Version 3 messages.</p>"));
[3059]655 addCmbRowButton->setWhatsThis(tr("Hit 'Add Row' button to add another line to the mountpoints table."));
[3083]656 delCmbRowButton->setWhatsThis(tr("Hit 'Delete' button to delete the highlighted line from the mountpoints table."));
[375]657
[679]658 // Canvas with Editable Fields
659 // ---------------------------
660 _canvas = new QWidget;
661 setCentralWidget(_canvas);
[143]662
[1925]663 _aogroup = new QTabWidget();
[679]664 QWidget* pgroup = new QWidget();
665 QWidget* ggroup = new QWidget();
666 QWidget* sgroup = new QWidget();
667 QWidget* egroup = new QWidget();
668 QWidget* agroup = new QWidget();
[934]669 QWidget* cgroup = new QWidget();
[679]670 QWidget* ogroup = new QWidget();
[1030]671 QWidget* rgroup = new QWidget();
[1327]672 QWidget* sergroup = new QWidget();
[2003]673 QWidget* pppgroup = new QWidget();
[2876]674 QWidget* ppp2group = new QWidget();
[2868]675 QWidget* cmbgroup = new QWidget();
[3164]676 QWidget* uploadgroup = new QWidget();
[3241]677 QWidget* uploadEphgroup = new QWidget();
[3356]678 _aogroup->addTab(pgroup,tr("Network"));
[1925]679 _aogroup->addTab(ggroup,tr("General"));
680 _aogroup->addTab(ogroup,tr("RINEX Observations"));
681 _aogroup->addTab(egroup,tr("RINEX Ephemeris"));
682 _aogroup->addTab(cgroup,tr("Broadcast Corrections"));
683 _aogroup->addTab(sgroup,tr("Feed Engine"));
684 _aogroup->addTab(sergroup,tr("Serial Output"));
685 _aogroup->addTab(agroup,tr("Outages"));
686 _aogroup->addTab(rgroup,tr("Miscellaneous"));
[2876]687 _aogroup->addTab(pppgroup,tr("PPP (1)"));
688 _aogroup->addTab(ppp2group,tr("PPP (2)"));
[2907]689#ifdef USE_COMBINATION
[2868]690 _aogroup->addTab(cmbgroup,tr("Combination"));
[2907]691#endif
[3241]692 _aogroup->addTab(uploadgroup,tr("Upload (clk)"));
693 _aogroup->addTab(uploadEphgroup,tr("Upload (eph)"));
[143]694
[1957]695 // Log Tab
696 // -------
[1925]697 _loggroup = new QTabWidget();
[1957]698 _loggroup->addTab(_log,tr("Log"));
699 _loggroup->addTab(_bncFigure,tr("Throughput"));
[1972]700 _loggroup->addTab(_bncFigureLate,tr("Latency"));
[2303]701 _loggroup->addTab(_bncFigurePPP,tr("PPP Plot"));
[1912]702
[3356]703 // Netowork (Proxy and SSL) Tab
704 // ----------------------------
[679]705 QGridLayout* pLayout = new QGridLayout;
[1409]706 pLayout->setColumnMinimumWidth(0,13*ww);
[1678]707 _proxyPortLineEdit->setMaximumWidth(9*ww);
708
[1409]709 pLayout->addWidget(new QLabel("Proxy host"), 0, 0);
710 pLayout->addWidget(_proxyHostLineEdit, 0, 1, 1,10);
711 pLayout->addWidget(new QLabel("Proxy port"), 1, 0);
712 pLayout->addWidget(_proxyPortLineEdit, 1, 1);
[1954]713 pLayout->addWidget(new QLabel("Settings for proxy in protected networks, leave boxes blank if none."),2, 0, 1, 50, Qt::AlignLeft);
[679]714 pLayout->addWidget(new QLabel(" "),3,0);
715 pLayout->addWidget(new QLabel(" "),4,0);
[3356]716 pLayout->addWidget(new QLabel("Path to SSL Certificates"), 5, 0);
717 pLayout->addWidget(_sslCaCertPathLineEdit, 5, 1, 1,10);
[3357]718 pLayout->addWidget(new QLabel("default: " + bncSslConfig::defaultPath()), 5, 12, 1,20);
[3356]719 pLayout->addWidget(new QLabel("Ignore SSL Authorization Errors"), 6,0);
720 pLayout->addWidget(_ignoreSslErrorsCheckBox, 6, 1, 1,10);
721 pLayout->addWidget(new QLabel("Settings for SSL Authorization."),7, 0, 1, 50, Qt::AlignLeft);
[679]722 pgroup->setLayout(pLayout);
[1439]723
[1678]724 // General Tab
725 // -----------
[679]726 QGridLayout* gLayout = new QGridLayout;
[1042]727 gLayout->setColumnMinimumWidth(0,14*ww);
[1678]728 _onTheFlyComboBox->setMaximumWidth(9*ww);
729
[1231]730 gLayout->addWidget(new QLabel("Logfile (full path)"), 0, 0);
[1681]731 gLayout->addWidget(_logFileLineEdit, 0, 1, 1,30); // 1
[1231]732 gLayout->addWidget(new QLabel("Append files"), 1, 0);
733 gLayout->addWidget(_rnxAppendCheckBox, 1, 1);
734 gLayout->addWidget(new QLabel("Reread configuration"), 2, 0);
735 gLayout->addWidget(_onTheFlyComboBox, 2, 1);
[1333]736 gLayout->addWidget(new QLabel("Auto start"), 3, 0);
737 gLayout->addWidget(_autoStartCheckBox, 3, 1);
[2391]738 gLayout->addWidget(new QLabel("Raw output file (full path)"), 4, 0);
[2386]739 gLayout->addWidget(_rawOutFileLineEdit, 4, 1, 1,30);
740 gLayout->addWidget(new QLabel("General settings for logfile, file handling, configuration on-the-fly, and auto-start."),5, 0, 1, 50, Qt::AlignLeft);
[679]741 ggroup->setLayout(gLayout);
[533]742
[1678]743 // RINEX Observations
744 // ------------------
745 QGridLayout* oLayout = new QGridLayout;
746 oLayout->setColumnMinimumWidth(0,14*ww);
747 _rnxIntrComboBox->setMaximumWidth(9*ww);
748 _rnxSamplSpinBox->setMaximumWidth(9*ww);
[143]749
[1678]750 oLayout->addWidget(new QLabel("Directory"), 0, 0);
[1681]751 oLayout->addWidget(_rnxPathLineEdit, 0, 1,1,24);
[1678]752 oLayout->addWidget(new QLabel("Interval"), 1, 0);
753 oLayout->addWidget(_rnxIntrComboBox, 1, 1);
[1681]754 oLayout->addWidget(new QLabel(" Sampling"), 1, 2, Qt::AlignRight);
[1678]755 oLayout->addWidget(_rnxSamplSpinBox, 1, 3, Qt::AlignLeft);
756 oLayout->addWidget(new QLabel("Skeleton extension"), 2, 0);
757 oLayout->addWidget(_rnxSkelLineEdit, 2, 1,1,1, Qt::AlignLeft);
758 oLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
[1681]759 oLayout->addWidget(_rnxScrpLineEdit, 3, 1,1,24);
[1678]760 oLayout->addWidget(new QLabel("Version 3"), 4, 0);
761 oLayout->addWidget(_rnxV3CheckBox, 4, 1);
[1681]762 oLayout->addWidget(new QLabel("Saving RINEX observation files."),5,0,1,50, Qt::AlignLeft);
[1678]763 ogroup->setLayout(oLayout);
764
[1439]765 // RINEX Ephemeris
766 // ---------------
[679]767 QGridLayout* eLayout = new QGridLayout;
[1042]768 eLayout->setColumnMinimumWidth(0,14*ww);
[1678]769 _ephIntrComboBox->setMaximumWidth(9*ww);
770 _outEphPortLineEdit->setMaximumWidth(9*ww);
771
[681]772 eLayout->addWidget(new QLabel("Directory"), 0, 0);
[1681]773 eLayout->addWidget(_ephPathLineEdit, 0, 1, 1,30);
[681]774 eLayout->addWidget(new QLabel("Interval"), 1, 0);
775 eLayout->addWidget(_ephIntrComboBox, 1, 1);
776 eLayout->addWidget(new QLabel("Port"), 2, 0);
777 eLayout->addWidget(_outEphPortLineEdit, 2, 1);
[679]778 eLayout->addWidget(new QLabel("Version 3"), 3, 0);
779 eLayout->addWidget(_ephV3CheckBox, 3, 1);
[1681]780 eLayout->addWidget(new QLabel("Saving RINEX ephemeris files and ephemeris output through IP port."),4,0,1,50,Qt::AlignLeft);
[679]781 eLayout->addWidget(new QLabel(" "),5,0);
782 egroup->setLayout(eLayout);
[560]783
[1454]784
[1682]785 // Broadcast Corrections
[1439]786 // ---------------------
[934]787 QGridLayout* cLayout = new QGridLayout;
[1042]788 cLayout->setColumnMinimumWidth(0,14*ww);
[1678]789 _corrIntrComboBox->setMaximumWidth(9*ww);
790 _corrPortLineEdit->setMaximumWidth(9*ww);
791 _corrTimeSpinBox->setMaximumWidth(9*ww);
792
[3066]793 cLayout->addWidget(new QLabel("Directory, ASCII"), 0, 0);
[1681]794 cLayout->addWidget(_corrPathLineEdit, 0, 1,1,20);
[934]795 cLayout->addWidget(new QLabel("Interval"), 1, 0);
796 cLayout->addWidget(_corrIntrComboBox, 1, 1);
797 cLayout->addWidget(new QLabel("Port"), 2, 0);
798 cLayout->addWidget(_corrPortLineEdit, 2, 1);
[1681]799 cLayout->addWidget(new QLabel(" Wait for full epoch"), 2, 2, Qt::AlignRight);
[1242]800 cLayout->addWidget(_corrTimeSpinBox, 2, 3, Qt::AlignLeft);
[1681]801 cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),3,0,1,50);
[1242]802 cLayout->addWidget(new QLabel(" "),4,0);
[1095]803 cLayout->addWidget(new QLabel(" "),5,0);
[934]804 cgroup->setLayout(cLayout);
805
[1678]806 // Feed Engine
807 // -----------
808 QGridLayout* sLayout = new QGridLayout;
809 sLayout->setColumnMinimumWidth(0,14*ww);
810 _outPortLineEdit->setMaximumWidth(9*ww);
811 _waitTimeSpinBox->setMaximumWidth(9*ww);
812 _binSamplSpinBox->setMaximumWidth(9*ww);
813 _outUPortLineEdit->setMaximumWidth(9*ww);
814
815 sLayout->addWidget(new QLabel("Port"), 0, 0);
816 sLayout->addWidget(_outPortLineEdit, 0, 1);
817 sLayout->addWidget(new QLabel("Wait for full epoch"), 0, 2, Qt::AlignRight);
818 sLayout->addWidget(_waitTimeSpinBox, 0, 3, Qt::AlignLeft);
819 sLayout->addWidget(new QLabel("Sampling"), 1, 0);
820 sLayout->addWidget(_binSamplSpinBox, 1, 1, Qt::AlignLeft);
821 sLayout->addWidget(new QLabel("File (full path)"), 2, 0);
[1681]822 sLayout->addWidget(_outFileLineEdit, 2, 1, 1, 20);
[1678]823 sLayout->addWidget(new QLabel("Port (unsynchronized)"), 3, 0);
824 sLayout->addWidget(_outUPortLineEdit, 3, 1);
[1750]825 sLayout->addWidget(new QLabel("Output decoded observations in a binary format to feed a real-time GNSS network engine."),4,0,1,50);
[1678]826 sLayout->addWidget(new QLabel(" "),5,0);
827 sgroup->setLayout(sLayout);
828
[1746]829 // Serial Output
830 // -------------
[1327]831 QGridLayout* serLayout = new QGridLayout;
[1339]832 serLayout->setColumnMinimumWidth(0,14*ww);
[1678]833 _serialBaudRateComboBox->setMaximumWidth(9*ww);
834 _serialFlowControlComboBox->setMaximumWidth(11*ww);
835 _serialDataBitsComboBox->setMaximumWidth(5*ww);
836 _serialParityComboBox->setMaximumWidth(9*ww);
837 _serialStopBitsComboBox->setMaximumWidth(5*ww);
838 _serialAutoNMEAComboBox->setMaximumWidth(9*ww);
[1595]839 _serialHeightNMEALineEdit->setMaximumWidth(8*ww);
[1678]840
[1339]841 serLayout->addWidget(new QLabel("Mountpoint"), 0,0, Qt::AlignLeft);
842 serLayout->addWidget(_serialMountPointLineEdit, 0,1,1,2);
843 serLayout->addWidget(new QLabel("Port name"), 1,0, Qt::AlignLeft);
844 serLayout->addWidget(_serialPortNameLineEdit, 1,1,1,2);
845 serLayout->addWidget(new QLabel("Baud rate"), 2,0, Qt::AlignLeft);
846 serLayout->addWidget(_serialBaudRateComboBox, 2,1);
[1640]847 serLayout->addWidget(new QLabel("Flow control"), 2,2, Qt::AlignRight);
[1636]848 serLayout->addWidget(_serialFlowControlComboBox, 2,3);
[1339]849 serLayout->addWidget(new QLabel("Data bits"), 3,0, Qt::AlignLeft);
850 serLayout->addWidget(_serialDataBitsComboBox, 3,1);
[1640]851 serLayout->addWidget(new QLabel("Parity"), 3,2, Qt::AlignRight);
[1636]852 serLayout->addWidget(_serialParityComboBox, 3,3);
[1640]853 serLayout->addWidget(new QLabel(" Stop bits"), 3,4, Qt::AlignRight);
[1636]854 serLayout->addWidget(_serialStopBitsComboBox, 3,5);
[1617]855 serLayout->addWidget(new QLabel("NMEA"), 4,0);
[1595]856 serLayout->addWidget(_serialAutoNMEAComboBox, 4,1);
[1640]857 serLayout->addWidget(new QLabel(" File (full path)"), 4,2, Qt::AlignRight);
[1642]858 serLayout->addWidget(_serialFileNMEALineEdit, 4,3,1,15);
[1641]859 serLayout->addWidget(new QLabel("Height"), 4,20, Qt::AlignRight);
[1643]860 serLayout->addWidget(_serialHeightNMEALineEdit, 4,21,1,11);
[1892]861 serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver."),5,0,1,30);
[1329]862
[1327]863 sergroup->setLayout(serLayout);
864
[1678]865 // Outages
866 // -------
867 QGridLayout* aLayout = new QGridLayout;
868 aLayout->setColumnMinimumWidth(0,14*ww);
869 _obsRateComboBox->setMaximumWidth(9*ww);
870 _adviseFailSpinBox->setMaximumWidth(9*ww);
871 _adviseRecoSpinBox->setMaximumWidth(9*ww);
872
873 aLayout->addWidget(new QLabel("Observation rate"), 0, 0);
874 aLayout->addWidget(_obsRateComboBox, 0, 1);
875 aLayout->addWidget(new QLabel("Failure threshold"), 1, 0);
876 aLayout->addWidget(_adviseFailSpinBox, 1, 1);
877 aLayout->addWidget(new QLabel("Recovery threshold"), 2, 0);
878 aLayout->addWidget(_adviseRecoSpinBox, 2, 1);
879 aLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
[1681]880 aLayout->addWidget(_adviseScriptLineEdit, 3, 1,1,30);
[2199]881 aLayout->addWidget(new QLabel("Failure and recovery reports, advisory notes."),4,0,1,50,Qt::AlignLeft);
882 aLayout->addWidget(new QLabel(" "), 5, 0);
[1678]883 agroup->setLayout(aLayout);
884
885 // Miscellaneous
886 // -------------
887 QGridLayout* rLayout = new QGridLayout;
888 rLayout->setColumnMinimumWidth(0,14*ww);
889 _perfIntrComboBox->setMaximumWidth(9*ww);
890
891 rLayout->addWidget(new QLabel("Mountpoint"), 0, 0);
892 rLayout->addWidget(_miscMountLineEdit, 0, 1, 1,7);
893 rLayout->addWidget(new QLabel("Log latency"), 1, 0);
894 rLayout->addWidget(_perfIntrComboBox, 1, 1);
895 rLayout->addWidget(new QLabel("Scan RTCM"), 2, 0);
896 rLayout->addWidget(_scanRTCMCheckBox, 2, 1);
897 rLayout->addWidget(new QLabel("Log latencies or scan RTCM streams for numbers of message types and antenna information."),3, 0,1,30);
898 rLayout->addWidget(new QLabel(" "), 4, 0);
899 rLayout->addWidget(new QLabel(" "), 5, 0);
900 rgroup->setLayout(rLayout);
901
[2003]902 // PPP Client
903 // ----------
904 QGridLayout* pppLayout = new QGridLayout;
[2759]905 _pppSigCLineEdit->setMaximumWidth(6*ww);
906 _pppSigPLineEdit->setMaximumWidth(6*ww);
907 _pppSigCrd0->setMaximumWidth(6*ww);
908 _pppSigCrdP->setMaximumWidth(6*ww);
909 _pppSigTrp0->setMaximumWidth(6*ww);
910 _pppSigTrpP->setMaximumWidth(6*ww);
911 _pppAverageLineEdit->setMaximumWidth(6*ww);
912 _pppQuickStartLineEdit->setMaximumWidth(6*ww);
[3112]913 _pppMaxSolGapLineEdit->setMaximumWidth(6*ww);
[2981]914 _pppRefCrdXLineEdit->setMaximumWidth(10*ww);
915 _pppRefCrdYLineEdit->setMaximumWidth(10*ww);
916 _pppRefCrdZLineEdit->setMaximumWidth(10*ww);
[3284]917 _pppRefdNLineEdit->setMaximumWidth(5*ww);
918 _pppRefdELineEdit->setMaximumWidth(5*ww);
919 _pppRefdULineEdit->setMaximumWidth(5*ww);
[2811]920 _pppSync->setMaximumWidth(6*ww);
[3605]921 _pppSPPComboBox->setMaximumWidth(15*ww);
[2801]922 _pppNMEAPortLineEdit->setMaximumWidth(6*ww);
[3602]923
924 _postObsFileChooser = new qtFileChooser;
[3612]925 _postObsFileChooser->setFileName(settings.value("postObsFile").toString());
926 _postObsFileChooser->setWhatsThis(tr("Full Path to RINEX Observation File"));
927
[3602]928 _postNavFileChooser = new qtFileChooser;
[3612]929 _postNavFileChooser->setFileName(settings.value("postNavFile").toString());
930 _postNavFileChooser->setWhatsThis(tr("Full Path to RINEX Navigation File"));
931
[3602]932 _postCorrFileChooser = new qtFileChooser;
[3613]933 _postCorrFileChooser->setFileName(settings.value("postCorrFile").toString());
934 _postCorrFileChooser->setWhatsThis(tr("Full Path to DGPS Correction File"));
[3602]935
[3598]936 int ir = 0;
[3600]937 pppLayout->addWidget(new QLabel("<b>Precise Point Positioning (Panel 1)</b>"), ir, 0, 1, 8);
[3598]938 ++ir;
939 pppLayout->addWidget(new QLabel("Obs Mountpoint"), ir, 0);
940 pppLayout->addWidget(_pppMountLineEdit, ir, 1);
941 pppLayout->addWidget(_pppSPPComboBox, ir, 2);
942 pppLayout->addWidget(new QLabel(" X "), ir, 3, Qt::AlignRight);
943 pppLayout->addWidget(_pppRefCrdXLineEdit, ir, 4);
944 pppLayout->addWidget(new QLabel(" Y "), ir, 5, Qt::AlignRight);
945 pppLayout->addWidget(_pppRefCrdYLineEdit, ir, 6);
946 pppLayout->addWidget(new QLabel(" Z "), ir, 7, Qt::AlignRight);
947 pppLayout->addWidget(_pppRefCrdZLineEdit, ir, 8);
948 ++ir;
949 pppLayout->addWidget(new QLabel("Corr Mountpoint "), ir, 0);
950 pppLayout->addWidget(_pppCorrMountLineEdit, ir, 1);
951 pppLayout->addWidget(new QLabel(" dN "), ir, 3, Qt::AlignRight);
952 pppLayout->addWidget(_pppRefdNLineEdit, ir, 4);
953 pppLayout->addWidget(new QLabel(" dE "), ir, 5, Qt::AlignRight);
954 pppLayout->addWidget(_pppRefdELineEdit, ir, 6);
955 pppLayout->addWidget(new QLabel(" dU "), ir, 7, Qt::AlignRight);
956 pppLayout->addWidget(_pppRefdULineEdit, ir, 8);
957 ++ir;
958 pppLayout->addWidget(new QLabel("Options"), ir, 0, 1, 5);
959 pppLayout->addWidget(_pppUsePhaseCheckBox, ir, 1, Qt::AlignRight);
960 pppLayout->addWidget(new QLabel("Use phase obs"), ir, 2);
961 pppLayout->addWidget(_pppEstTropoCheckBox, ir, 3, Qt::AlignRight);
962 pppLayout->addWidget(new QLabel("Estimate tropo"), ir, 4);
963 pppLayout->addWidget(_pppGLONASSCheckBox, ir, 5, Qt::AlignRight);
964 pppLayout->addWidget(new QLabel("Use GLONASS"), ir, 6);
965 pppLayout->addWidget(_pppGalileoCheckBox, ir, 7, Qt::AlignRight);
[3599]966 pppLayout->addWidget(new QLabel("Use Galileo "), ir, 8);
[3598]967 ++ir;
968 pppLayout->addWidget(new QLabel("Output"), ir, 0);
969 pppLayout->addWidget(_pppNMEALineEdit, ir, 1, 1, 3);
970 pppLayout->addWidget(new QLabel("NMEA File"), ir, 4);
971 pppLayout->addWidget(_pppNMEAPortLineEdit, ir, 5, Qt::AlignRight);
972 pppLayout->addWidget(new QLabel("NMEA Port"), ir, 6);
973 pppLayout->addWidget(_pppPlotCoordinates, ir, 7, Qt::AlignRight);
974 pppLayout->addWidget(new QLabel("PPP Plot"), ir, 8);
975 ++ir;
[3604]976 pppLayout->addWidget(new QLabel("<b>Post-Processing</b>"));
977 QHBoxLayout* hlpLayout = new QHBoxLayout;
978 {
979 hlpLayout->addWidget(_postObsFileChooser);
980 hlpLayout->addWidget(new QLabel("Obs"));
981 hlpLayout->addWidget(_postNavFileChooser);
982 hlpLayout->addWidget(new QLabel("Nav"));
983 hlpLayout->addWidget(_postCorrFileChooser);
984 hlpLayout->addWidget(new QLabel("Corr"));
985 }
986 pppLayout->addLayout(hlpLayout, ir, 1, 1, 7);
[2473]987
[2003]988 pppgroup->setLayout(pppLayout);
989
[2876]990 // PPP Client (second panel)
991 // -------------------------
992 QGridLayout* ppp2Layout = new QGridLayout;
[3598]993 ir = 0;
[3600]994 ppp2Layout->addWidget(new QLabel("<b>Precise Point Positioning (Panel 2)</b>"), ir, 0, 1, 8);
[3598]995 ++ir;
996 ppp2Layout->addWidget(new QLabel("Antennas"), ir, 0);
997 ppp2Layout->addWidget(_pppAntexLineEdit, ir, 1, 1, 3);
998 ppp2Layout->addWidget(new QLabel("ANTEX File "), ir, 4);
999 ppp2Layout->addWidget(_pppAntennaLineEdit, ir, 5, 1, 3);
1000 ppp2Layout->addWidget(new QLabel("Rec. Ant. Name"), ir, 8);
1001 ++ir;
1002 ppp2Layout->addWidget(new QLabel("Satellite Antenna "), ir, 0);
1003 ppp2Layout->addWidget(_pppApplySatAntCheckBox, ir, 1, Qt::AlignRight);
1004 ppp2Layout->addWidget(new QLabel("Apply Offsets"), ir, 2, Qt::AlignLeft);
1005 ++ir;
1006 ppp2Layout->addWidget(new QLabel("Sigmas"), ir, 0);
1007 ppp2Layout->addWidget(_pppSigCLineEdit, ir, 1, Qt::AlignRight);
1008 ppp2Layout->addWidget(new QLabel("Code"), ir, 2);
1009 ppp2Layout->addWidget(_pppSigPLineEdit, ir, 3);
1010 ppp2Layout->addWidget(new QLabel("Phase"), ir, 4);
1011 ppp2Layout->addWidget(_pppSigTrp0, ir, 5, Qt::AlignRight);
1012 ppp2Layout->addWidget(new QLabel("Tropo Init "), ir, 6);
1013 ppp2Layout->addWidget(_pppSigTrpP, ir, 7);
1014 ppp2Layout->addWidget(new QLabel("Tropo White Noise"), ir, 8);
1015 ++ir;
1016 ppp2Layout->addWidget(new QLabel("Options cont'd"), ir, 0);
1017 ppp2Layout->addWidget(_pppSigCrd0, ir, 1, Qt::AlignRight);
1018 ppp2Layout->addWidget(new QLabel("Sigma XYZ Init "), ir, 2);
1019 ppp2Layout->addWidget(_pppSigCrdP, ir, 3, Qt::AlignRight);
1020 ppp2Layout->addWidget(new QLabel("Sigma XYZ Noise "), ir, 4);
1021 ppp2Layout->addWidget(_pppQuickStartLineEdit, ir, 5, Qt::AlignRight);
1022 ppp2Layout->addWidget(new QLabel("Quick-Start (sec) "), ir, 6);
1023 ppp2Layout->addWidget(_pppMaxSolGapLineEdit, ir, 7, Qt::AlignRight);
[3599]1024 ppp2Layout->addWidget(new QLabel("Max Sol. Gap (sec)"), ir, 8);
[3598]1025 ++ir;
1026 ppp2Layout->addWidget(new QLabel("Options cont'd"), ir, 0);
1027 ppp2Layout->addWidget(_pppSync, ir, 1);
1028 ppp2Layout->addWidget(new QLabel("Sync Corr (sec) "), ir, 2);
1029 ppp2Layout->addWidget(_pppAverageLineEdit, ir, 3, Qt::AlignRight);
1030 ppp2Layout->addWidget(new QLabel("Averaging (min)") , ir, 4);
1031 ++ir;
1032 ppp2Layout->addWidget(new QLabel(" "), ir, 0);
1033 ppp2Layout->setRowStretch(ir, 99);
[2878]1034
[2876]1035 ppp2group->setLayout(ppp2Layout);
1036
[2868]1037 // Combination
1038 // -----------
1039 QGridLayout* cmbLayout = new QGridLayout;
1040
[2870]1041 populateCmbTable();
[2871]1042 cmbLayout->addWidget(_cmbTable,0,0,6,3);
[2868]1043
[3066]1044 cmbLayout->addWidget(addCmbRowButton,1,3);
[2869]1045 connect(addCmbRowButton, SIGNAL(clicked()), this, SLOT(slotAddCmbRow()));
[3066]1046 cmbLayout->addWidget(delCmbRowButton,2,3);
[3469]1047 cmbLayout->addWidget(new QLabel("Method"), 3, 3);
1048 cmbLayout->addWidget(_cmbMethodComboBox, 3, 4, Qt::AlignRight);
[3328]1049 cmbLayout->addWidget(new QLabel("Maximal Residuum"), 4, 3);
1050 cmbLayout->addWidget(_cmbMaxresLineEdit, 4, 4, Qt::AlignRight);
[2869]1051 connect(delCmbRowButton, SIGNAL(clicked()), this, SLOT(slotDelCmbRow()));
[2868]1052
[3199]1053 cmbLayout->addWidget(new QLabel(" Combine Broadcast Ephemeris corrections streams."),5,3,1,3);
[2868]1054
1055 cmbgroup->setLayout(cmbLayout);
1056
[3241]1057 // Upload Layout (Clocks)
1058 // ----------------------
[3193]1059 QGridLayout* uploadHlpLayout = new QGridLayout();
[3152]1060
[3199]1061 uploadHlpLayout->addWidget(new QLabel("Upload RTNet or Combination Results"),0,0);
[3152]1062
[3193]1063 uploadHlpLayout->addWidget(addUploadRowButton,0,1);
[3164]1064 connect(addUploadRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadRow()));
[3195]1065
[3193]1066 uploadHlpLayout->addWidget(delUploadRowButton,0,2);
[3164]1067 connect(delUploadRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadRow()));
[3195]1068
[3197]1069 uploadHlpLayout->addWidget(setUploadTrafoButton,1,1);
[3164]1070 connect(setUploadTrafoButton, SIGNAL(clicked()), this, SLOT(slotSetUploadTrafo()));
[3160]1071
[3198]1072 uploadHlpLayout->addWidget(new QLabel("Interval"),0,3, Qt::AlignRight);
[3197]1073 uploadHlpLayout->addWidget(_uploadIntrComboBox,0,4);
1074
[3198]1075 uploadHlpLayout->addWidget(new QLabel("Sampling"),1,3, Qt::AlignRight);
[3197]1076 uploadHlpLayout->addWidget(_uploadSamplSpinBox,1,4);
1077
[3585]1078 uploadHlpLayout->addWidget(new QLabel("Sampling (Orb)"),1,5, Qt::AlignRight);
1079 uploadHlpLayout->addWidget(_uploadSamplOrbSpinBox,1,6);
[3197]1080
[3193]1081 QBoxLayout* uploadLayout = new QBoxLayout(QBoxLayout::TopToBottom);
1082 populateUploadTable();
1083 uploadLayout->addWidget(_uploadTable);
1084 uploadLayout->addLayout(uploadHlpLayout);
[3152]1085
[3164]1086 uploadgroup->setLayout(uploadLayout);
[3152]1087
[3241]1088 // Upload Layout (Ephemeris)
1089 // -------------------------
1090 QGridLayout* uploadLayoutEph = new QGridLayout;
1091
1092 uploadLayoutEph->setColumnMinimumWidth(0, 9*ww);
1093 _uploadEphPortLineEdit->setMaximumWidth(9*ww);
1094 _uploadEphPasswordLineEdit->setMaximumWidth(9*ww);
1095 _uploadEphMountpointLineEdit->setMaximumWidth(12*ww);
1096
1097 uploadLayoutEph->addWidget(new QLabel("Host"), 0, 0);
1098 uploadLayoutEph->addWidget(_uploadEphHostLineEdit, 0, 1, 1, 3);
1099 uploadLayoutEph->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
[3244]1100 uploadLayoutEph->addWidget(_uploadEphPortLineEdit, 0, 5, 1, 1);
[3241]1101 uploadLayoutEph->addWidget(new QLabel("Mountpoint "), 1, 0);
1102 uploadLayoutEph->addWidget(_uploadEphMountpointLineEdit, 1, 1);
1103 uploadLayoutEph->addWidget(new QLabel(" Password"), 1, 2, Qt::AlignRight);
1104 uploadLayoutEph->addWidget(_uploadEphPasswordLineEdit, 1, 3);
1105 uploadLayoutEph->addWidget(new QLabel("Sampling"), 2, 0);
1106 uploadLayoutEph->addWidget(_uploadEphSampleSpinBox, 2, 1);
[3244]1107 uploadLayoutEph->addWidget(new QLabel("Upload concatenated RTCMv3 Broadcast Ephemeris to caster."), 3, 0, 1, 5);
[3245]1108 uploadLayoutEph->addWidget(_uploadEphBytesCounter, 3, 5);
[3241]1109
1110 uploadEphgroup->setLayout(uploadLayoutEph);
1111
1112 connect(_uploadEphHostLineEdit, SIGNAL(textChanged(const QString &)),
1113 this, SLOT(slotBncTextChanged()));
1114
[1678]1115 // Main Layout
1116 // -----------
[1409]1117 QGridLayout* mLayout = new QGridLayout;
[1925]1118 _aogroup->setCurrentIndex(settings.value("startTab").toInt());
[1926]1119 mLayout->addWidget(_aogroup, 0,0);
[1409]1120 mLayout->addWidget(_mountPointsTable, 1,0);
[1947]1121 _loggroup->setCurrentIndex(settings.value("statusTab").toInt());
[1926]1122 mLayout->addWidget(_loggroup, 2,0);
[106]1123
[679]1124 _canvas->setLayout(mLayout);
[1333]1125
[2129]1126 // Enable/Disable all Widgets
1127 // --------------------------
1128 slotBncTextChanged();
1129
[1333]1130 // Auto start
1131 // ----------
1132 if ( Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
1133 slotGetData();
1134 }
[35]1135}
1136
1137// Destructor
1138////////////////////////////////////////////////////////////////////////////
1139bncWindow::~bncWindow() {
[609]1140 delete _caster;
[3249]1141 delete _casterEph;
[35]1142}
1143
[1178]1144//
1145////////////////////////////////////////////////////////////////////////////
1146void bncWindow::populateMountPointsTable() {
1147
1148 for (int iRow = _mountPointsTable->rowCount()-1; iRow >=0; iRow--) {
1149 _mountPointsTable->removeRow(iRow);
1150 }
1151
[1535]1152 bncSettings settings;
[1178]1153
1154 QListIterator<QString> it(settings.value("mountPoints").toStringList());
1155 if (!it.hasNext()) {
1156 _actGetData->setEnabled(false);
1157 }
1158 int iRow = 0;
1159 while (it.hasNext()) {
1160 QStringList hlp = it.next().split(" ");
1161 if (hlp.size() < 5) continue;
1162 _mountPointsTable->insertRow(iRow);
1163
1164 QUrl url(hlp[0]);
1165
1166 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
1167 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
1168 QString nmea(hlp[4]);
[1738]1169 if (hlp[5] == "S") {
1170 fullPath = hlp[0].replace(0,2,"");
1171 }
[3333]1172 QString ntripVersion = "2";
[1352]1173 if (hlp.size() >= 6) {
1174 ntripVersion = (hlp[5]);
1175 }
[1178]1176
1177 QTableWidgetItem* it;
1178 it = new QTableWidgetItem(url.userInfo());
1179 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1180 _mountPointsTable->setItem(iRow, 0, it);
1181
1182 it = new QTableWidgetItem(fullPath);
1183 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1184 _mountPointsTable->setItem(iRow, 1, it);
1185
1186 it = new QTableWidgetItem(format);
1187 _mountPointsTable->setItem(iRow, 2, it);
1188
1189 if (nmea == "yes") {
1190 it = new QTableWidgetItem(latitude);
1191 _mountPointsTable->setItem(iRow, 3, it);
1192 it = new QTableWidgetItem(longitude);
1193 _mountPointsTable->setItem(iRow, 4, it);
1194 } else {
1195 it = new QTableWidgetItem(latitude);
1196 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1197 _mountPointsTable->setItem(iRow, 3, it);
1198 it = new QTableWidgetItem(longitude);
1199 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1200 _mountPointsTable->setItem(iRow, 4, it);
1201 }
1202
1203 it = new QTableWidgetItem(nmea);
1204 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1205 _mountPointsTable->setItem(iRow, 5, it);
1206
[1352]1207 it = new QTableWidgetItem(ntripVersion);
[1511]1208 //// it->setFlags(it->flags() & ~Qt::ItemIsEditable);
[1352]1209 _mountPointsTable->setItem(iRow, 6, it);
1210
[1178]1211 bncTableItem* bncIt = new bncTableItem();
1212 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
[1352]1213 _mountPointsTable->setItem(iRow, 7, bncIt);
[1178]1214
1215 iRow++;
1216 }
1217
1218 _mountPointsTable->sortItems(1);
1219}
1220
[35]1221// Retrieve Table
1222////////////////////////////////////////////////////////////////////////////
1223void bncWindow::slotAddMountPoints() {
[101]1224
[1535]1225 bncSettings settings;
[101]1226 QString proxyHost = settings.value("proxyHost").toString();
1227 int proxyPort = settings.value("proxyPort").toInt();
1228 if (proxyHost != _proxyHostLineEdit->text() ||
1229 proxyPort != _proxyPortLineEdit->text().toInt()) {
[102]1230 int iRet = QMessageBox::question(this, "Question", "Proxy options "
[101]1231 "changed. Use the new ones?",
1232 QMessageBox::Yes, QMessageBox::No,
1233 QMessageBox::NoButton);
1234 if (iRet == QMessageBox::Yes) {
1235 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1236 settings.setValue("proxyPort", _proxyPortLineEdit->text());
[1405]1237 settings.sync();
[101]1238 }
1239 }
1240
[3367]1241 settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
1242 settings.setValue("ignoreSslErrors", _ignoreSslErrorsCheckBox->checkState());
1243 settings.sync();
1244
[1609]1245 QMessageBox msgBox;
1246 msgBox.setIcon(QMessageBox::Question);
[1874]1247 msgBox.setWindowTitle("Add Stream");
[1609]1248 msgBox.setText("Add stream(s) coming from:");
1249
[1780]1250 QPushButton* buttonNtrip = msgBox.addButton(tr("Caster"), QMessageBox::ActionRole);
1251 QPushButton* buttonIP = msgBox.addButton(tr("TCP/IP port"), QMessageBox::ActionRole);
1252 QPushButton* buttonUDP = msgBox.addButton(tr("UDP port"), QMessageBox::ActionRole);
1253 QPushButton* buttonSerial = msgBox.addButton(tr("Serial port"), QMessageBox::ActionRole);
1254 QPushButton* buttonCancel = msgBox.addButton(tr("Cancel"), QMessageBox::ActionRole);
[1609]1255
1256 msgBox.exec();
1257
1258 if (msgBox.clickedButton() == buttonNtrip) {
[1737]1259 bncTableDlg* dlg = new bncTableDlg(this);
[1609]1260 dlg->move(this->pos().x()+50, this->pos().y()+50);
[1737]1261 connect(dlg, SIGNAL(newMountPoints(QStringList*)),
[35]1262 this, SLOT(slotNewMountPoints(QStringList*)));
[1609]1263 dlg->exec();
1264 delete dlg;
1265 } else if (msgBox.clickedButton() == buttonIP) {
[1737]1266 bncIpPort* ipp = new bncIpPort(this);
1267 connect(ipp, SIGNAL(newMountPoints(QStringList*)),
[1609]1268 this, SLOT(slotNewMountPoints(QStringList*)));
1269 ipp->exec();
1270 delete ipp;
[1780]1271 } else if (msgBox.clickedButton() == buttonUDP) {
1272 bncUdpPort* udp = new bncUdpPort(this);
1273 connect(udp, SIGNAL(newMountPoints(QStringList*)),
1274 this, SLOT(slotNewMountPoints(QStringList*)));
1275 udp->exec();
1276 delete udp;
[1737]1277 } else if (msgBox.clickedButton() == buttonSerial) {
1278 bncSerialPort* sep = new bncSerialPort(this);
1279 connect(sep, SIGNAL(newMountPoints(QStringList*)),
1280 this, SLOT(slotNewMountPoints(QStringList*)));
1281 sep->exec();
1282 delete sep;
[1609]1283 } else if (msgBox.clickedButton() == buttonCancel) {
1284 // Cancel
1285 }
[35]1286}
1287
1288// Delete Selected Mount Points
1289////////////////////////////////////////////////////////////////////////////
1290void bncWindow::slotDeleteMountPoints() {
[117]1291
1292 int nRows = _mountPointsTable->rowCount();
1293 bool flg[nRows];
1294 for (int iRow = 0; iRow < nRows; iRow++) {
[116]1295 if (_mountPointsTable->isItemSelected(_mountPointsTable->item(iRow,1))) {
[117]1296 flg[iRow] = true;
1297 }
1298 else {
1299 flg[iRow] = false;
1300 }
1301 }
1302 for (int iRow = nRows-1; iRow >= 0; iRow--) {
1303 if (flg[iRow]) {
[116]1304 _mountPointsTable->removeRow(iRow);
[83]1305 }
1306 }
1307 _actDeleteMountPoints->setEnabled(false);
[183]1308
1309 if (_mountPointsTable->rowCount() == 0) {
1310 _actGetData->setEnabled(false);
1311 }
[35]1312}
1313
1314// New Mount Points Selected
1315////////////////////////////////////////////////////////////////////////////
1316void bncWindow::slotNewMountPoints(QStringList* mountPoints) {
1317 int iRow = 0;
1318 QListIterator<QString> it(*mountPoints);
1319 while (it.hasNext()) {
[59]1320 QStringList hlp = it.next().split(" ");
[110]1321 QUrl url(hlp[0]);
1322 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
[366]1323 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
1324 QString nmea(hlp[4]);
[1738]1325 if (hlp[5] == "S") {
1326 fullPath = hlp[0].replace(0,2,"");
1327 }
[3333]1328 QString ntripVersion = "2";
[1352]1329 if (hlp.size() >= 6) {
1330 ntripVersion = (hlp[5]);
1331 }
[110]1332
[35]1333 _mountPointsTable->insertRow(iRow);
[110]1334
1335 QTableWidgetItem* it;
1336 it = new QTableWidgetItem(url.userInfo());
[115]1337 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
[110]1338 _mountPointsTable->setItem(iRow, 0, it);
1339
1340 it = new QTableWidgetItem(fullPath);
[115]1341 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
[110]1342 _mountPointsTable->setItem(iRow, 1, it);
1343
1344 it = new QTableWidgetItem(format);
1345 _mountPointsTable->setItem(iRow, 2, it);
[184]1346
[410]1347 if (nmea == "yes") {
[366]1348 it = new QTableWidgetItem(latitude);
1349 _mountPointsTable->setItem(iRow, 3, it);
1350 it = new QTableWidgetItem(longitude);
1351 _mountPointsTable->setItem(iRow, 4, it);
1352 } else {
1353 it = new QTableWidgetItem(latitude);
1354 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1355 _mountPointsTable->setItem(iRow, 3, it);
1356 it = new QTableWidgetItem(longitude);
1357 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1358 _mountPointsTable->setItem(iRow, 4, it);
1359 }
1360
1361 it = new QTableWidgetItem(nmea);
1362 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1363 _mountPointsTable->setItem(iRow, 5, it);
1364
[1352]1365 it = new QTableWidgetItem(ntripVersion);
1366 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1367 _mountPointsTable->setItem(iRow, 6, it);
1368
[184]1369 bncTableItem* bncIt = new bncTableItem();
[1352]1370 _mountPointsTable->setItem(iRow, 7, bncIt);
[184]1371
[35]1372 iRow++;
1373 }
[111]1374 _mountPointsTable->hideColumn(0);
[110]1375 _mountPointsTable->sortItems(1);
[1199]1376 if (mountPoints->count() > 0 && !_actStop->isEnabled()) {
[35]1377 _actGetData->setEnabled(true);
1378 }
1379 delete mountPoints;
1380}
1381
1382// Save Options
1383////////////////////////////////////////////////////////////////////////////
1384void bncWindow::slotSaveOptions() {
[1504]1385
1386 QStringList mountPoints;
1387 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1388
[1739]1389 if (_mountPointsTable->item(iRow, 6)->text() != "S") {
1390 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1391 "@" + _mountPointsTable->item(iRow, 1)->text() );
1392
1393 mountPoints.append(url.toString() + " " +
1394 _mountPointsTable->item(iRow, 2)->text()
1395 + " " + _mountPointsTable->item(iRow, 3)->text()
1396 + " " + _mountPointsTable->item(iRow, 4)->text()
1397 + " " + _mountPointsTable->item(iRow, 5)->text()
1398 + " " + _mountPointsTable->item(iRow, 6)->text());
1399 } else {
1400 mountPoints.append(
1401 "//" + _mountPointsTable->item(iRow, 1)->text()
1402 + " " + _mountPointsTable->item(iRow, 2)->text()
1403 + " " + _mountPointsTable->item(iRow, 3)->text()
1404 + " " + _mountPointsTable->item(iRow, 4)->text()
1405 + " " + _mountPointsTable->item(iRow, 5)->text()
1406 + " " + _mountPointsTable->item(iRow, 6)->text());
1407 }
[1504]1408 }
1409
[2870]1410 QStringList combineStreams;
1411 for (int iRow = 0; iRow < _cmbTable->rowCount(); iRow++) {
1412 QString hlp;
1413 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
[2965]1414 if (_cmbTable->item(iRow, iCol)) {
1415 hlp += _cmbTable->item(iRow, iCol)->text() + " ";
1416 }
[2870]1417 }
[2965]1418 if (!hlp.isEmpty()) {
1419 combineStreams << hlp;
1420 }
[2870]1421 }
1422
[3164]1423 QStringList uploadMountpointsOut;
1424 for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
[3153]1425 QString hlp;
[3164]1426 for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
1427 if (_uploadTable->cellWidget(iRow, iCol) &&
[3158]1428 (iCol == 3 || iCol == 4 || iCol == 5)) {
1429 if (iCol == 3) {
[3164]1430 QLineEdit* passwd = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
[3158]1431 hlp += passwd->text() + ",";
1432 }
1433 else if (iCol == 4) {
[3164]1434 QComboBox* system = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
[3158]1435 hlp += system->currentText() + ",";
1436 }
1437 else if (iCol == 5) {
[3164]1438 QCheckBox* com = (QCheckBox*)(_uploadTable->cellWidget(iRow, iCol));
[3158]1439 QString state; state.setNum(com->checkState());
1440 hlp += state + ",";
1441 }
[3153]1442 }
[3164]1443 else if (_uploadTable->item(iRow, iCol)) {
1444 hlp += _uploadTable->item(iRow, iCol)->text() + ",";
[3158]1445 }
[3153]1446 }
1447 if (!hlp.isEmpty()) {
[3164]1448 uploadMountpointsOut << hlp;
[3153]1449 }
1450 }
1451
[1535]1452 bncSettings settings;
[1504]1453
[668]1454 settings.setValue("adviseFail", _adviseFailSpinBox->value());
1455 settings.setValue("adviseReco", _adviseRecoSpinBox->value());
[1503]1456 settings.setValue("adviseScript",_adviseScriptLineEdit->text());
1457 settings.setValue("autoStart", _autoStartCheckBox->checkState());
1458 settings.setValue("binSampl", _binSamplSpinBox->value());
1459 settings.setValue("corrIntr", _corrIntrComboBox->currentText());
1460 settings.setValue("corrPath", _corrPathLineEdit->text());
1461 settings.setValue("corrPort", _corrPortLineEdit->text());
1462 settings.setValue("corrTime", _corrTimeSpinBox->value());
1463 settings.setValue("ephIntr", _ephIntrComboBox->currentText());
1464 settings.setValue("ephPath", _ephPathLineEdit->text());
1465 settings.setValue("ephV3", _ephV3CheckBox->checkState());
1466 settings.setValue("logFile", _logFileLineEdit->text());
[2386]1467 settings.setValue("rawOutFile", _rawOutFileLineEdit->text());
[1503]1468 settings.setValue("miscMount", _miscMountLineEdit->text());
[2003]1469 settings.setValue("pppMount", _pppMountLineEdit->text());
[2967]1470 settings.setValue("pppCorrMount",_pppCorrMountLineEdit->text());
[2341]1471 settings.setValue("pppSPP", _pppSPPComboBox->currentText());
[2126]1472 settings.setValue("nmeaFile", _pppNMEALineEdit->text());
[2185]1473 settings.setValue("nmeaPort", _pppNMEAPortLineEdit->text());
[2483]1474 settings.setValue("pppSigmaCode",_pppSigCLineEdit->text());
[2718]1475 settings.setValue("pppSigmaPhase",_pppSigPLineEdit->text());
1476 settings.setValue("pppSigCrd0",_pppSigCrd0->text());
1477 settings.setValue("pppSigCrdP",_pppSigCrdP->text());
1478 settings.setValue("pppSigTrp0",_pppSigTrp0->text());
1479 settings.setValue("pppSigTrpP",_pppSigTrpP->text());
[2596]1480 settings.setValue("pppAverage", _pppAverageLineEdit->text());
[2719]1481 settings.setValue("pppQuickStart", _pppQuickStartLineEdit->text());
[3112]1482 settings.setValue("pppMaxSolGap", _pppMaxSolGapLineEdit->text());
[2165]1483 settings.setValue("pppRefCrdX", _pppRefCrdXLineEdit->text());
1484 settings.setValue("pppRefCrdY", _pppRefCrdYLineEdit->text());
1485 settings.setValue("pppRefCrdZ", _pppRefCrdZLineEdit->text());
[3284]1486 settings.setValue("pppRefdN", _pppRefdNLineEdit->text());
1487 settings.setValue("pppRefdE", _pppRefdELineEdit->text());
1488 settings.setValue("pppRefdU", _pppRefdULineEdit->text());
[2811]1489 settings.setValue("pppSync", _pppSync->text());
[2083]1490 settings.setValue("pppUsePhase", _pppUsePhaseCheckBox->checkState());
[2718]1491 settings.setValue("pppPlotCoordinates", _pppPlotCoordinates->checkState());
[2086]1492 settings.setValue("pppEstTropo", _pppEstTropoCheckBox->checkState());
[2137]1493 settings.setValue("pppGLONASS", _pppGLONASSCheckBox->checkState());
[2794]1494 settings.setValue("pppGalileo", _pppGalileoCheckBox->checkState());
[2878]1495 settings.setValue("pppAntenna", _pppAntennaLineEdit->text());
1496 settings.setValue("pppAntex", _pppAntexLineEdit->text());
[2949]1497 settings.setValue("pppApplySatAnt", _pppApplySatAntCheckBox->checkState());
[1504]1498 settings.setValue("mountPoints", mountPoints);
[1503]1499 settings.setValue("obsRate", _obsRateComboBox->currentText());
1500 settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
1501 settings.setValue("outEphPort", _outEphPortLineEdit->text());
[35]1502 settings.setValue("outFile", _outFileLineEdit->text());
1503 settings.setValue("outPort", _outPortLineEdit->text());
[1222]1504 settings.setValue("outUPort", _outUPortLineEdit->text());
[1503]1505 settings.setValue("perfIntr", _perfIntrComboBox->currentText());
1506 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1507 settings.setValue("proxyPort", _proxyPortLineEdit->text());
[3356]1508 settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
1509 settings.setValue("ignoreSslErrors", _ignoreSslErrorsCheckBox->checkState());
[1503]1510 settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
1511 settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
[83]1512 settings.setValue("rnxPath", _rnxPathLineEdit->text());
[1503]1513 settings.setValue("rnxSampl", _rnxSamplSpinBox->value());
[106]1514 settings.setValue("rnxScript", _rnxScrpLineEdit->text());
[83]1515 settings.setValue("rnxSkel", _rnxSkelLineEdit->text());
[533]1516 settings.setValue("rnxV3", _rnxV3CheckBox->checkState());
[1307]1517 settings.setValue("scanRTCM", _scanRTCMCheckBox->checkState());
[1601]1518 settings.setValue("serialFileNMEA",_serialFileNMEALineEdit->text());
[1595]1519 settings.setValue("serialHeightNMEA",_serialHeightNMEALineEdit->text());
1520 settings.setValue("serialAutoNMEA", _serialAutoNMEAComboBox->currentText());
[1503]1521 settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText());
1522 settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText());
[1409]1523 settings.setValue("serialMountPoint",_serialMountPointLineEdit->text());
1524 settings.setValue("serialParity", _serialParityComboBox->currentText());
[1503]1525 settings.setValue("serialPortName", _serialPortNameLineEdit->text());
[1409]1526 settings.setValue("serialStopBits", _serialStopBitsComboBox->currentText());
[1636]1527 settings.setValue("serialFlowControl",_serialFlowControlComboBox->currentText());
[1925]1528 settings.setValue("startTab", _aogroup->currentIndex());
[1947]1529 settings.setValue("statusTab", _loggroup->currentIndex());
[1503]1530 settings.setValue("waitTime", _waitTimeSpinBox->value());
[2965]1531 if (!combineStreams.isEmpty()) {
1532 settings.setValue("combineStreams", combineStreams);
1533 }
[3075]1534 else {
1535 settings.setValue("combineStreams", "");
1536 }
[3328]1537 settings.setValue("cmbMaxres", _cmbMaxresLineEdit->text());
[3469]1538 settings.setValue("cmbMethod", _cmbMethodComboBox->currentText());
[110]1539
[3164]1540 if (!uploadMountpointsOut.isEmpty()) {
1541 settings.setValue("uploadMountpointsOut", uploadMountpointsOut);
[3153]1542 }
1543 else {
[3164]1544 settings.setValue("uploadMountpointsOut", "");
[3153]1545 }
[3197]1546 settings.setValue("uploadIntr", _uploadIntrComboBox->currentText());
1547 settings.setValue("uploadSampl", _uploadSamplSpinBox->value());
[3586]1548 settings.setValue("uploadSamplOrb", _uploadSamplOrbSpinBox->value());
[3153]1549
[3242]1550 settings.setValue("uploadEphHost", _uploadEphHostLineEdit->text());
1551 settings.setValue("uploadEphPort", _uploadEphPortLineEdit->text());
1552 settings.setValue("uploadEphPassword", _uploadEphPasswordLineEdit->text());
1553 settings.setValue("uploadEphMountpoint",_uploadEphMountpointLineEdit->text());
1554 settings.setValue("uploadEphSample", _uploadEphSampleSpinBox->value());
1555
[3612]1556 settings.setValue("postObsFile", _postObsFileChooser->fileName());
1557 settings.setValue("postNavFile", _postNavFileChooser->fileName());
1558 settings.setValue("postCorrFile", _postCorrFileChooser->fileName());
1559
[1200]1560 if (_caster) {
1561 _caster->slotReadMountPoints();
1562 }
[1405]1563 settings.sync();
[35]1564}
1565
1566// All get slots terminated
1567////////////////////////////////////////////////////////////////////////////
[1556]1568void bncWindow::slotGetThreadsFinished() {
[1299]1569 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true);
[3249]1570 delete _caster; _caster = 0;
1571 delete _casterEph; _casterEph = 0;
[1560]1572 _actGetData->setEnabled(true);
1573 _actStop->setEnabled(false);
[35]1574}
1575
1576// Retrieve Data
1577////////////////////////////////////////////////////////////////////////////
1578void bncWindow::slotGetData() {
[128]1579 slotSaveOptions();
1580
[2177]1581 _bncFigurePPP->reset();
1582
[35]1583 _actDeleteMountPoints->setEnabled(false);
1584 _actGetData->setEnabled(false);
[182]1585 _actStop->setEnabled(true);
[35]1586
[463]1587 _caster = new bncCaster(_outFileLineEdit->text(),
[592]1588 _outPortLineEdit->text().toInt());
[35]1589
[592]1590 ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());
[937]1591 ((bncApp*)qApp)->setPortCorr(_corrPortLineEdit->text().toInt());
[2909]1592 ((bncApp*)qApp)->initCombination();
[592]1593
[1556]1594 connect(_caster, SIGNAL(getThreadsFinished()),
1595 this, SLOT(slotGetThreadsFinished()));
[35]1596
[1179]1597 connect (_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)),
1598 this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
[1173]1599
[2012]1600 ((bncApp*)qApp)->slotMessage("========== Start BNC v" BNCVERSION " =========", true);
[1188]1601
[1875]1602 bncSettings settings;
[1880]1603
[1875]1604 QDir rnxdir(settings.value("rnxPath").toString());
1605 if (!rnxdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations directory", true);
[1880]1606
1607 QString rnx_file = settings.value("rnxScript").toString();
1608 if ( !rnx_file.isEmpty() ) {
1609 QFile rnxfile(settings.value("rnxScript").toString());
1610 if (!rnxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations script", true);
1611 }
1612
[1875]1613 QDir ephdir(settings.value("ephPath").toString());
1614 if (!ephdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Ephemeris directory", true);
[1880]1615
[1875]1616 QDir corrdir(settings.value("corrPath").toString());
1617 if (!corrdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Broadcast Corrections directory", true);
[1880]1618
1619 QString advise_file = settings.value("adviseScript").toString();
1620 if ( !advise_file.isEmpty() ) {
[1875]1621 QFile advisefile(settings.value("adviseScript").toString());
1622 if (!advisefile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Outages script", true);
1623 }
1624
[2937]1625 QString ant_file = settings.value("pppAntex").toString();
1626 if ( !ant_file.isEmpty() ) {
1627 QFile anxfile(settings.value("pppAntex").toString());
1628 if (!anxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find IGS ANTEX file", true);
1629 }
1630
[1179]1631 _caster->slotReadMountPoints();
[3249]1632
[3250]1633 _casterEph = new bncEphUploadCaster();
[3254]1634 connect(_casterEph, SIGNAL(newBytes(QByteArray,double)),
1635 _uploadEphBytesCounter, SLOT(slotNewBytes(QByteArray,double)));
[35]1636}
[83]1637
[182]1638// Retrieve Data
1639////////////////////////////////////////////////////////////////////////////
1640void bncWindow::slotStop() {
1641 int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
1642 QMessageBox::Yes, QMessageBox::No,
1643 QMessageBox::NoButton);
1644 if (iRet == QMessageBox::Yes) {
[3231]1645 ((bncApp*)qApp)->stopCombination();
[3249]1646 delete _caster; _caster = 0;
1647 delete _casterEph; _casterEph = 0;
[182]1648 _actGetData->setEnabled(true);
1649 _actStop->setEnabled(false);
1650 }
1651}
1652
[83]1653// Close Application gracefully
1654////////////////////////////////////////////////////////////////////////////
1655void bncWindow::closeEvent(QCloseEvent* event) {
1656
1657 int iRet = QMessageBox::question(this, "Close", "Save Options?",
1658 QMessageBox::Yes, QMessageBox::No,
1659 QMessageBox::Cancel);
1660
1661 if (iRet == QMessageBox::Cancel) {
1662 event->ignore();
1663 return;
1664 }
1665 else if (iRet == QMessageBox::Yes) {
1666 slotSaveOptions();
1667 }
1668
[608]1669 QMainWindow::closeEvent(event);
[83]1670}
1671
1672// User changed the selection of mountPoints
1673////////////////////////////////////////////////////////////////////////////
1674void bncWindow::slotSelectionChanged() {
1675 if (_mountPointsTable->selectedItems().isEmpty()) {
1676 _actDeleteMountPoints->setEnabled(false);
1677 }
1678 else {
1679 _actDeleteMountPoints->setEnabled(true);
1680 }
1681}
1682
1683// Display Program Messages
1684////////////////////////////////////////////////////////////////////////////
[1299]1685void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) {
[83]1686
[1218]1687#ifdef DEBUG_RTCM2_2021
1688 const int maxBufferSize = 1000;
1689#else
[83]1690 const int maxBufferSize = 10000;
[1218]1691#endif
[1299]1692
1693 if (! showOnScreen ) {
1694 return;
1695 }
[83]1696
[189]1697 QString txt = _log->toPlainText() + "\n" +
[566]1698 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg;
[83]1699 _log->clear();
1700 _log->append(txt.right(maxBufferSize));
1701}
1702
[108]1703// About Message
1704////////////////////////////////////////////////////////////////////////////
1705void bncWindow::slotAbout() {
[679]1706 new bncAboutDlg(0);
[108]1707}
1708
[989]1709//Flowchart
1710////////////////////////////////////////////////////////////////////////////
1711void bncWindow::slotFlowchart() {
1712 new bncFlowchartDlg(0);
1713}
1714
[108]1715// Help Window
1716////////////////////////////////////////////////////////////////////////////
1717void bncWindow::slotHelp() {
[177]1718 QUrl url;
1719 url.setPath(":bnchelp.html");
[676]1720 new bncHlpDlg(0, url);
[108]1721}
[110]1722
1723// Select Fonts
1724////////////////////////////////////////////////////////////////////////////
1725void bncWindow::slotFontSel() {
1726 bool ok;
1727 QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
1728 if (ok) {
[1535]1729 bncSettings settings;
[113]1730 settings.setValue("font", newFont.toString());
[110]1731 QApplication::setFont(newFont);
[113]1732 int ww = QFontMetrics(newFont).width('w');
[152]1733 setMinimumSize(60*ww, 80*ww);
1734 resize(60*ww, 80*ww);
[110]1735 }
1736}
[399]1737
1738// Whats This Help
1739void bncWindow::slotWhatsThis() {
[1173]1740 QWhatsThis::enterWhatsThisMode();
[399]1741}
1742
[1173]1743//
1744////////////////////////////////////////////////////////////////////////////
[1179]1745void bncWindow::slotMountPointsRead(QList<bncGetThread*> threads) {
[1998]1746 _bncFigure->updateMountPoints();
1747 _bncFigureLate->updateMountPoints();
1748
[1178]1749 populateMountPointsTable();
[1535]1750 bncSettings settings;
[1180]1751 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
1752 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
[1179]1753 QListIterator<bncGetThread*> iTh(threads);
1754 while (iTh.hasNext()) {
1755 bncGetThread* thread = iTh.next();
1756 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1757 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1758 "@" + _mountPointsTable->item(iRow, 1)->text() );
1759 if (url == thread->mountPoint() &&
1760 _mountPointsTable->item(iRow, 3)->text() == thread->latitude() &&
1761 _mountPointsTable->item(iRow, 4)->text() == thread->longitude() ) {
[1352]1762 ((bncTableItem*) _mountPointsTable->item(iRow, 7))->setGetThread(thread);
[2010]1763 disconnect(thread, SIGNAL(newBytes(QByteArray, double)),
1764 _bncFigure, SLOT(slotNewData(QByteArray, double)));
[1926]1765 connect(thread, SIGNAL(newBytes(QByteArray, double)),
[1932]1766 _bncFigure, SLOT(slotNewData(QByteArray, double)));
[2010]1767 disconnect(thread, SIGNAL(newLatency(QByteArray, double)),
1768 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
[1972]1769 connect(thread, SIGNAL(newLatency(QByteArray, double)),
[1975]1770 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
[2722]1771 if ( Qt::CheckState(settings.value("pppPlotCoordinates").toInt()) == Qt::Checked) {
[2304]1772 disconnect(thread,
1773 SIGNAL(newPosition(bncTime, double, double, double)),
1774 _bncFigurePPP,
1775 SLOT(slotNewPosition(bncTime, double, double, double)));
1776 connect(thread, SIGNAL(newPosition(bncTime, double, double, double)),
1777 _bncFigurePPP,
1778 SLOT(slotNewPosition(bncTime, double, double, double)));
1779 }
[1179]1780 break;
1781 }
1782 }
1783 }
[1173]1784}
1785
1786//
1787////////////////////////////////////////////////////////////////////////////
[679]1788void bncWindow::CreateMenu() {
1789 // Create Menus
1790 // ------------
1791 _menuFile = menuBar()->addMenu(tr("&File"));
1792 _menuFile->addAction(_actFontSel);
1793 _menuFile->addSeparator();
1794 _menuFile->addAction(_actSaveOpt);
1795 _menuFile->addSeparator();
1796 _menuFile->addAction(_actQuit);
[399]1797
[679]1798 _menuHlp = menuBar()->addMenu(tr("&Help"));
1799 _menuHlp->addAction(_actHelp);
[989]1800 _menuHlp->addAction(_actFlowchart);
[679]1801 _menuHlp->addAction(_actAbout);
1802}
1803
[1439]1804// Toolbar
[1173]1805////////////////////////////////////////////////////////////////////////////
[679]1806void bncWindow::AddToolbar() {
1807 // Tool (Command) Bar
1808 // ------------------
1809 QToolBar* toolBar = new QToolBar;
1810 addToolBar(Qt::BottomToolBarArea, toolBar);
1811 toolBar->setMovable(false);
1812 toolBar->addAction(_actAddMountPoints);
1813 toolBar->addAction(_actDeleteMountPoints);
1814 toolBar->addAction(_actGetData);
1815 toolBar->addAction(_actStop);
[3609]1816 toolBar->addAction(_actPostProcessing);
[3610]1817 _postProgressLabel = new QLabel(" Progress");
1818 toolBar->addWidget(_postProgressLabel);
1819 toolBar->addWidget(_postProgressBar);
1820 enableWidget(false, _postProgressLabel);
1821 enableWidget(false, _postProgressBar);
1822 toolBar->addWidget(new QLabel(" "));
[679]1823 toolBar->addAction(_actwhatsthis);
[1439]1824}
[679]1825
[1439]1826// About
[1173]1827////////////////////////////////////////////////////////////////////////////
[679]1828bncAboutDlg::bncAboutDlg(QWidget* parent) :
1829 QDialog(parent) {
1830
1831 QTextBrowser* tb = new QTextBrowser;
1832 QUrl url; url.setPath(":bncabout.html");
1833 tb->setSource(url);
1834 tb->setReadOnly(true);
1835
1836 int ww = QFontMetrics(font()).width('w');
1837 QPushButton* _closeButton = new QPushButton("Close");
1838 _closeButton->setMaximumWidth(10*ww);
1839 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1840
1841 QGridLayout* dlgLayout = new QGridLayout();
1842 QLabel* img = new QLabel();
1843 img->setPixmap(QPixmap(":ntrip-logo.png"));
1844 dlgLayout->addWidget(img, 0,0);
[2012]1845 dlgLayout->addWidget(new QLabel("BKG Ntrip Client (BNC) Version "BNCVERSION), 0,1);
[679]1846 dlgLayout->addWidget(tb,1,0,1,2);
1847 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);
1848
1849 setLayout(dlgLayout);
1850 resize(60*ww, 60*ww);
[1545]1851 setWindowTitle("About BNC");
[679]1852 show();
1853}
1854
[1173]1855//
1856////////////////////////////////////////////////////////////////////////////
[679]1857bncAboutDlg::~bncAboutDlg() {
1858};
1859
[1439]1860// Flowchart
[1173]1861////////////////////////////////////////////////////////////////////////////
[989]1862bncFlowchartDlg::bncFlowchartDlg(QWidget* parent) :
1863 QDialog(parent) {
1864
1865 int ww = QFontMetrics(font()).width('w');
1866 QPushButton* _closeButton = new QPushButton("Close");
1867 _closeButton->setMaximumWidth(10*ww);
1868 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1869
1870 QGridLayout* dlgLayout = new QGridLayout();
1871 QLabel* img = new QLabel();
[997]1872 img->setPixmap(QPixmap(":bncflowchart.png"));
[989]1873 dlgLayout->addWidget(img, 0,0);
1874 dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
1875
1876 setLayout(dlgLayout);
[1545]1877 setWindowTitle("Flow Chart");
[989]1878 show();
1879}
1880
[1173]1881//
1882////////////////////////////////////////////////////////////////////////////
[989]1883bncFlowchartDlg::~bncFlowchartDlg() {
1884};
1885
[3605]1886// Enable/Disable Widget (and change its color)
1887////////////////////////////////////////////////////////////////////////////
1888void bncWindow::enableWidget(bool enable, QWidget* widget) {
1889 const static QPalette paletteWhite(QColor(255, 255, 255));
1890 const static QPalette paletteGray(QColor(230, 230, 230));
1891
1892 widget->setEnabled(enable);
1893 if (enable) {
1894 widget->setPalette(paletteWhite);
1895 }
1896 else {
1897 widget->setPalette(paletteGray);
1898 }
1899}
1900
[1439]1901// Bnc Text
1902////////////////////////////////////////////////////////////////////////////
[2128]1903void bncWindow::slotBncTextChanged(){
[1439]1904
[3605]1905 bool enable = true;
1906
[1439]1907 // Proxy
1908 //------
[2129]1909 if (sender() == 0 || sender() == _proxyHostLineEdit) {
[3605]1910 enable = !_proxyHostLineEdit->text().isEmpty();
1911 enableWidget(enable, _proxyPortLineEdit);
[1439]1912 }
1913
1914 // RINEX Observations
1915 // ------------------
[2129]1916 if (sender() == 0 || sender() == _rnxPathLineEdit) {
[3605]1917 enable = !_rnxPathLineEdit->text().isEmpty();
1918 enableWidget(enable, _rnxSamplSpinBox);
1919 enableWidget(enable, _rnxSkelLineEdit);
1920 enableWidget(enable, _rnxScrpLineEdit);
1921 enableWidget(enable, _rnxV3CheckBox);
1922 enableWidget(enable, _rnxIntrComboBox);
[1439]1923 }
1924
1925 // RINEX Ephemeris
1926 // ---------------
[3605]1927 if (sender() == 0 || sender() == _ephPathLineEdit || sender() == _outEphPortLineEdit) {
1928 enable = !_ephPathLineEdit->text().isEmpty() || !_outEphPortLineEdit->text().isEmpty();
1929 enableWidget(enable, _ephIntrComboBox);
1930 enableWidget(enable, _ephV3CheckBox);
[1439]1931 }
1932
[1682]1933 // Broadcast Corrections
[1439]1934 // ---------------------
[3605]1935 if (sender() == 0 || sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) {
1936 enable = !_corrPathLineEdit->text().isEmpty() || !_corrPortLineEdit->text().isEmpty();
1937 enableWidget(enable, _corrIntrComboBox);
[1439]1938 }
1939
1940 // Feed Engine
1941 // -----------
[3605]1942 if (sender() == 0 || sender() == _outPortLineEdit || sender() == _outFileLineEdit) {
1943 enable = !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty();
1944 enableWidget(enable, _waitTimeSpinBox);
1945 enableWidget(enable, _binSamplSpinBox);
[1439]1946 }
1947
[1746]1948 // Serial Output
1949 // -------------
[2129]1950 if (sender() == 0 || sender() == _serialMountPointLineEdit ||
[2128]1951 sender() == _serialAutoNMEAComboBox) {
[3605]1952 enable = !_serialMountPointLineEdit->text().isEmpty();
1953 enableWidget(enable, _serialPortNameLineEdit);
1954 enableWidget(enable, _serialBaudRateComboBox);
1955 enableWidget(enable, _serialParityComboBox);
1956 enableWidget(enable, _serialDataBitsComboBox);
1957 enableWidget(enable, _serialStopBitsComboBox);
1958 enableWidget(enable, _serialFlowControlComboBox);
1959 enableWidget(enable, _serialAutoNMEAComboBox);
1960
1961 bool enable2 = enable && _serialAutoNMEAComboBox->currentText() != "Auto";
1962 enableWidget(enable2, _serialFileNMEALineEdit);
[1439]1963 }
1964
1965 // Outages
1966 // -------
[2129]1967 if (sender() == 0 || sender() == _obsRateComboBox) {
[3605]1968 enable = !_obsRateComboBox->currentText().isEmpty();
1969 enableWidget(enable, _adviseFailSpinBox);
1970 enableWidget(enable, _adviseRecoSpinBox);
1971 enableWidget(enable, _adviseScriptLineEdit);
[1439]1972 }
1973
1974 // Miscellaneous
1975 // -------------
[2129]1976 if (sender() == 0 || sender() == _miscMountLineEdit) {
[3605]1977 enable = !_miscMountLineEdit->text().isEmpty();
1978 enableWidget(enable, _perfIntrComboBox);
1979 enableWidget(enable, _scanRTCMCheckBox);
[1439]1980 }
[2090]1981
1982 // PPP Client
1983 // ----------
[2718]1984 if (sender() == 0
1985 || sender() == _pppMountLineEdit
[2967]1986 || sender() == _pppCorrMountLineEdit
[2727]1987 || sender() == _pppRefCrdXLineEdit
1988 || sender() == _pppRefCrdYLineEdit
1989 || sender() == _pppRefCrdZLineEdit
[3284]1990 || sender() == _pppRefdNLineEdit
1991 || sender() == _pppRefdELineEdit
1992 || sender() == _pppRefdULineEdit
[2811]1993 || sender() == _pppSync
[2815]1994 || sender() == _pppSPPComboBox
[3112]1995 || sender() == _pppQuickStartLineEdit
[2727]1996 || sender() == _pppEstTropoCheckBox
[2946]1997 || sender() == _pppUsePhaseCheckBox
1998 || sender() == _pppAntexLineEdit ) {
[3605]1999
2000 enable = (!_pppMountLineEdit->text().isEmpty() && !_pppCorrMountLineEdit->text().isEmpty()) ||
2001 (!_pppMountLineEdit->text().isEmpty() && _pppSPPComboBox->currentText() == "SPP") ||
2002 (_pppSPPComboBox->currentText() == "Post-Processing");
2003
2004 enableWidget(enable, _pppNMEALineEdit);
2005 enableWidget(enable, _pppNMEAPortLineEdit);
2006 enableWidget(enable, _pppRefCrdXLineEdit);
2007 enableWidget(enable, _pppRefCrdYLineEdit);
2008 enableWidget(enable, _pppRefCrdZLineEdit);
2009 enableWidget(enable, _pppRefdNLineEdit);
2010 enableWidget(enable, _pppRefdELineEdit);
2011 enableWidget(enable, _pppRefdULineEdit);
2012 enableWidget(enable, _pppUsePhaseCheckBox);
2013 enableWidget(enable, _pppPlotCoordinates);
2014 enableWidget(enable, _pppEstTropoCheckBox);
2015 enableWidget(enable, _pppGLONASSCheckBox);
2016 enableWidget(enable, _pppGalileoCheckBox);
2017 enableWidget(enable, _pppAntexLineEdit);
2018 enableWidget(enable, _pppSigCLineEdit);
2019 enableWidget(enable, _pppSigCrd0);
2020 enableWidget(enable, _pppSigCrdP);
2021
2022 bool enable2 = enable && !_pppRefCrdXLineEdit->text().isEmpty() &&
2023 !_pppRefCrdYLineEdit->text().isEmpty() &&
2024 !_pppRefCrdZLineEdit->text().isEmpty();
2025
2026 enableWidget(enable2, _pppAverageLineEdit);
2027 enableWidget(enable2, _pppQuickStartLineEdit);
2028
2029 bool enable3 = enable2 && !_pppQuickStartLineEdit->text().isEmpty();
2030 enableWidget(enable3, _pppMaxSolGapLineEdit);
2031
2032 bool enable4 = enable && !_pppAntexLineEdit->text().isEmpty();
2033 enableWidget(enable4, _pppAntennaLineEdit);
2034 enableWidget(enable4, _pppApplySatAntCheckBox);
2035
2036 bool enable5 = enable && _pppEstTropoCheckBox->isChecked() && !_pppMountLineEdit->text().isEmpty();
2037 enableWidget(enable5, _pppSigTrp0);
2038 enableWidget(enable5, _pppSigTrpP);
2039
2040 bool enable6 = enable && _pppUsePhaseCheckBox->isChecked();
2041 enableWidget(enable6, _pppSigPLineEdit);
2042
2043 bool enable7 = enable && _pppSPPComboBox->currentText() == "PPP";
2044 enableWidget(enable7, _pppSync);
2045 enableWidget(enable7, _pppCorrMountLineEdit);
[3606]2046
2047 bool enable8 = _pppSPPComboBox->currentText() == "Post-Processing";
2048 enableWidget(enable8, _postObsFileChooser);
2049 enableWidget(enable8, _postNavFileChooser);
2050 enableWidget(enable8, _postCorrFileChooser);
[3608]2051 _actPostProcessing->setEnabled(enable8);
[3607]2052
2053 enableWidget(!enable8, _pppMountLineEdit);
[2090]2054 }
[1439]2055}
[2869]2056
2057//
2058////////////////////////////////////////////////////////////////////////////
2059void bncWindow::slotAddCmbRow() {
2060 int iRow = _cmbTable->rowCount();
2061 _cmbTable->insertRow(iRow);
2062 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
2063 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
2064 }
2065}
2066
2067//
2068////////////////////////////////////////////////////////////////////////////
2069void bncWindow::slotDelCmbRow() {
2070 int nRows = _cmbTable->rowCount();
2071 bool flg[nRows];
2072 for (int iRow = 0; iRow < nRows; iRow++) {
2073 if (_cmbTable->isItemSelected(_cmbTable->item(iRow,1))) {
2074 flg[iRow] = true;
2075 }
2076 else {
2077 flg[iRow] = false;
2078 }
2079 }
2080 for (int iRow = nRows-1; iRow >= 0; iRow--) {
2081 if (flg[iRow]) {
2082 _cmbTable->removeRow(iRow);
2083 }
2084 }
2085}
[2870]2086
2087//
2088////////////////////////////////////////////////////////////////////////////
2089void bncWindow::populateCmbTable() {
2090
2091 for (int iRow = _cmbTable->rowCount()-1; iRow >=0; iRow--) {
2092 _cmbTable->removeRow(iRow);
2093 }
2094
2095 bncSettings settings;
2096
2097 int iRow = -1;
2098 QListIterator<QString> it(settings.value("combineStreams").toStringList());
2099 while (it.hasNext()) {
2100 QStringList hlp = it.next().split(" ");
[2965]2101 if (hlp.size() > 2) {
[2870]2102 ++iRow;
2103 _cmbTable->insertRow(iRow);
2104 }
2105 for (int iCol = 0; iCol < hlp.size(); iCol++) {
2106 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
2107 }
2108 }
2109}
[3152]2110
2111//
2112////////////////////////////////////////////////////////////////////////////
[3164]2113void bncWindow::slotAddUploadRow() {
2114 int iRow = _uploadTable->rowCount();
2115 _uploadTable->insertRow(iRow);
2116 for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
[3156]2117 if (iCol == 3) {
2118 QLineEdit* passwd = new QLineEdit();
2119 passwd->setFrame(false);
2120 passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
[3164]2121 _uploadTable->setCellWidget(iRow, iCol, passwd);
[3156]2122 }
2123 else if (iCol == 4) {
[3158]2124 QComboBox* system = new QComboBox();
2125 system->setEditable(false);
2126 system->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS95,SIRGAS2000,Custom").split(","));
2127 system->setFrame(false);
[3164]2128 _uploadTable->setCellWidget(iRow, iCol, system);
[3155]2129 }
2130 else if (iCol == 5) {
2131 QCheckBox* com = new QCheckBox();
[3164]2132 _uploadTable->setCellWidget(iRow, iCol, com);
[3155]2133 }
[3196]2134 else if (iCol == 8) {
2135 bncTableItem* bncIt = new bncTableItem();
2136 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
2137 _uploadTable->setItem(iRow, iCol, bncIt);
[3232]2138 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
[3196]2139 }
[3155]2140 else {
[3164]2141 _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(""));
[3155]2142 }
[3152]2143 }
2144}
2145
2146//
2147////////////////////////////////////////////////////////////////////////////
[3164]2148void bncWindow::slotDelUploadRow() {
[3232]2149 ((bncApp*)qApp)->_uploadTableItems.clear();
[3164]2150 int nRows = _uploadTable->rowCount();
[3152]2151 bool flg[nRows];
2152 for (int iRow = 0; iRow < nRows; iRow++) {
[3164]2153 if (_uploadTable->isItemSelected(_uploadTable->item(iRow,1))) {
[3152]2154 flg[iRow] = true;
2155 }
2156 else {
2157 flg[iRow] = false;
2158 }
2159 }
2160 for (int iRow = nRows-1; iRow >= 0; iRow--) {
2161 if (flg[iRow]) {
[3164]2162 _uploadTable->removeRow(iRow);
[3152]2163 }
2164 }
[3232]2165 for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
2166 ((bncApp*)qApp)->_uploadTableItems[iRow] =
2167 (bncTableItem*) _uploadTable->item(iRow, 8);
2168 }
[3152]2169}
2170
2171//
2172////////////////////////////////////////////////////////////////////////////
[3164]2173void bncWindow::populateUploadTable() {
2174 for (int iRow = _uploadTable->rowCount()-1; iRow >=0; iRow--) {
2175 _uploadTable->removeRow(iRow);
[3153]2176 }
2177
2178 bncSettings settings;
2179
2180 int iRow = -1;
[3164]2181 QListIterator<QString> it(settings.value("uploadMountpointsOut").toStringList());
[3153]2182 while (it.hasNext()) {
[3159]2183 QStringList hlp = it.next().split(",");
2184 if (hlp.size() > 6) {
[3153]2185 ++iRow;
[3164]2186 _uploadTable->insertRow(iRow);
[3153]2187 }
2188 for (int iCol = 0; iCol < hlp.size(); iCol++) {
[3159]2189 if (iCol == 3) {
2190 QLineEdit* passwd = new QLineEdit();
2191 passwd->setFrame(false);
2192 passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
2193 passwd->setText(hlp[iCol]);
[3164]2194 _uploadTable->setCellWidget(iRow, iCol, passwd);
[3159]2195 }
2196 else if (iCol == 4) {
2197 QComboBox* system = new QComboBox();
2198 system->setEditable(false);
2199 system->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS95,SIRGAS2000,Custom").split(","));
2200 system->setFrame(false);
2201 system->setCurrentIndex(system->findText(hlp[iCol]));
[3164]2202 _uploadTable->setCellWidget(iRow, iCol, system);
[3159]2203 }
2204 else if (iCol == 5) {
2205 QCheckBox* com = new QCheckBox();
2206 if (hlp[iCol].toInt() == Qt::Checked) {
2207 com->setCheckState(Qt::Checked);
2208 }
[3164]2209 _uploadTable->setCellWidget(iRow, iCol, com);
[3159]2210 }
[3196]2211 else if (iCol == 8) {
2212 bncTableItem* bncIt = new bncTableItem();
2213 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
2214 _uploadTable->setItem(iRow, iCol, bncIt);
[3232]2215 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
[3196]2216 }
[3159]2217 else {
[3164]2218 _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
[3159]2219 }
[3153]2220 }
2221 }
[3152]2222}
[3153]2223
2224//
2225////////////////////////////////////////////////////////////////////////////
[3164]2226void bncWindow::slotSetUploadTrafo() {
[3239]2227 bncCustomTrafo* dlg = new bncCustomTrafo(this);
2228 dlg->exec();
2229 delete dlg;
[3153]2230}
[3608]2231
2232// Post-Processing
2233////////////////////////////////////////////////////////////////////////////
2234void bncWindow::slotPostProcessing() {
2235 _actPostProcessing->setEnabled(false);
2236 slotSaveOptions();
[3610]2237 _postProgressBar->reset();
2238 enableWidget(true, _postProgressLabel);
2239 enableWidget(true, _postProgressBar);
2240 //// beg test
[3611]2241 for (int ii = 0; ii <= 10000; ++ii) {
2242 _postProgressBar->setValue(ii/100);
[3610]2243 }
2244 //// end test
2245 enableWidget(false, _postProgressLabel);
2246 enableWidget(false, _postProgressBar);
2247 _postProgressBar->reset();
2248 _actPostProcessing->setEnabled(true);
[3608]2249}
Note: See TracBrowser for help on using the repository browser.