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

Last change on this file since 3610 was 3610, checked in by mervart, 12 years ago
File size: 111.9 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
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.
24
25/* -------------------------------------------------------------------------
26 * BKG NTRIP Client
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
41#include <iostream>
42
43#include <unistd.h>
44#include "bncwindow.h"
45#include "bncapp.h"
46#include "bncgetthread.h"
47#include "bnctabledlg.h"
48#include "bncipport.h"
49#include "bncudpport.h"
50#include "bncserialport.h"
51#include "bnchlpdlg.h"
52#include "bnchtml.h"
53#include "bnctableitem.h"
54#include "bncsettings.h"
55#include "bncfigure.h"
56#include "bncfigurelate.h"
57#include "bncfigureppp.h"
58#include "bncversion.h"
59#include "bncbytescounter.h"
60#include "bncsslconfig.h"
61#include "upload/bnccustomtrafo.h"
62#include "upload/bncephuploadcaster.h"
63#include "qtfilechooser.h"
64
65using namespace std;
66
67// Constructor
68////////////////////////////////////////////////////////////////////////////
69bncWindow::bncWindow() {
70
71 _caster = 0;
72 _casterEph = 0;
73
74 _bncFigure = new bncFigure(this);
75 _bncFigureLate = new bncFigureLate(this);
76 _bncFigurePPP = new bncFigurePPP(this);
77
78 int ww = QFontMetrics(this->font()).width('w');
79
80 static const QStringList labels = QString("account, Streams: resource loader / mountpoint, decoder, lat, long, nmea, ntrip, bytes").split(",");
81
82 setMinimumSize(85*ww, 65*ww);
83
84 setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION));
85
86 connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)),
87 this, SLOT(slotWindowMessage(QByteArray,bool)));
88
89 // Create Actions
90 // --------------
91 _actHelp = new QAction(tr("&Help Contents"),this);
92 connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
93
94 _actAbout = new QAction(tr("&About BNC"),this);
95 connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
96
97 _actFlowchart = new QAction(tr("&Flow Chart"),this);
98 connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
99
100 _actFontSel = new QAction(tr("Select &Font"),this);
101 connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
102
103 _actSaveOpt = new QAction(tr("&Save && Reread Configuration"),this);
104 connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
105
106 _actQuit = new QAction(tr("&Quit"),this);
107 connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
108
109 _actAddMountPoints = new QAction(tr("Add &Stream"),this);
110 connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
111
112 _actDeleteMountPoints = new QAction(tr("&Delete Stream"),this);
113 connect(_actDeleteMountPoints, SIGNAL(triggered()), SLOT(slotDeleteMountPoints()));
114 _actDeleteMountPoints->setEnabled(false);
115
116 _actGetData = new QAction(tr("Sta&rt"),this);
117 connect(_actGetData, SIGNAL(triggered()), SLOT(slotGetData()));
118
119 _actPostProcessing = new QAction(tr("Start PP"),this);
120 connect(_actPostProcessing, SIGNAL(triggered()), SLOT(slotPostProcessing()));
121
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
129 _actStop = new QAction(tr("Sto&p"),this);
130 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
131 _actStop->setEnabled(false);
132
133 _actwhatsthis= new QAction(tr("Help ?=Shift+F1"),this);
134 connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
135
136 CreateMenu();
137 AddToolbar();
138
139 bncSettings settings;
140
141 // Netowrk Options
142 // ---------------
143 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
144 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
145
146 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
147 this, SLOT(slotBncTextChanged()));
148
149 _sslCaCertPathLineEdit = new QLineEdit(settings.value("sslCaCertPath").toString());
150 _ignoreSslErrorsCheckBox = new QCheckBox();
151 _ignoreSslErrorsCheckBox->setCheckState(Qt::CheckState(
152 settings.value("ignoreSslErrors").toInt()));
153
154 // General Options
155 // ---------------
156 _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
157 _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString());
158 _rnxAppendCheckBox = new QCheckBox();
159 _rnxAppendCheckBox->setCheckState(Qt::CheckState(
160 settings.value("rnxAppend").toInt()));
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 }
168 _autoStartCheckBox = new QCheckBox();
169 _autoStartCheckBox->setCheckState(Qt::CheckState(
170 settings.value("autoStart").toInt()));
171
172 // RINEX Observations Options
173 // --------------------------
174 _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
175 _rnxIntrComboBox = new QComboBox();
176 _rnxIntrComboBox->setEditable(false);
177 _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
178 ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
179 if (ii != -1) {
180 _rnxIntrComboBox->setCurrentIndex(ii);
181 }
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
194 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
195 this, SLOT(slotBncTextChanged()));
196
197 // RINEX Ephemeris Options
198 // -----------------------
199 _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
200 _ephIntrComboBox = new QComboBox();
201 _ephIntrComboBox->setEditable(false);
202 _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
203 int jj = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
204 if (jj != -1) {
205 _ephIntrComboBox->setCurrentIndex(jj);
206 }
207 _outEphPortLineEdit = new QLineEdit(settings.value("outEphPort").toString());
208 _ephV3CheckBox = new QCheckBox();
209 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
210
211 connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
212 this, SLOT(slotBncTextChanged()));
213
214 connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
215 this, SLOT(slotBncTextChanged()));
216
217 // Broadcast Corrections Options
218 // -----------------------------
219 _corrPathLineEdit = new QLineEdit(settings.value("corrPath").toString());
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 }
227 _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
228 _corrTimeSpinBox = new QSpinBox();
229 _corrTimeSpinBox->setMinimum(0);
230 _corrTimeSpinBox->setMaximum(60);
231 _corrTimeSpinBox->setSingleStep(1);
232 _corrTimeSpinBox->setSuffix(" sec");
233 _corrTimeSpinBox->setValue(settings.value("corrTime").toInt());
234
235 connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
236 this, SLOT(slotBncTextChanged()));
237
238 connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),
239 this, SLOT(slotBncTextChanged()));
240
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());
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");
256 _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
257 _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
258
259 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
260 this, SLOT(slotBncTextChanged()));
261
262 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
263 this, SLOT(slotBncTextChanged()));
264
265 // Serial Output Options
266 // ---------------------
267 _serialMountPointLineEdit = new QLineEdit(settings.value("serialMountPoint").toString());
268 _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
269 _serialBaudRateComboBox = new QComboBox();
270 _serialBaudRateComboBox->addItems(QString("110,300,600,"
271 "1200,2400,4800,9600,19200,38400,57600,115200").split(","));
272 int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
273 if (kk != -1) {
274 _serialBaudRateComboBox->setCurrentIndex(kk);
275 }
276 _serialFlowControlComboBox = new QComboBox();
277 _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(","));
278 kk = _serialFlowControlComboBox->findText(settings.value("serialFlowControl").toString());
279 if (kk != -1) {
280 _serialFlowControlComboBox->setCurrentIndex(kk);
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 }
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 }
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 }
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 }
306 _serialFileNMEALineEdit = new QLineEdit(settings.value("serialFileNMEA").toString());
307 _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString());
308
309 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
310 this, SLOT(slotBncTextChanged()));
311
312 connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
313 this, SLOT(slotBncTextChanged()));
314
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
338 connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
339 this, SLOT(slotBncTextChanged()));
340
341 // Miscellaneous Options
342 // ---------------------
343 _miscMountLineEdit = new QLineEdit(settings.value("miscMount").toString());
344 _perfIntrComboBox = new QComboBox();
345 _perfIntrComboBox->setEditable(false);
346 _perfIntrComboBox->addItems(QString(",2 sec, 10 sec,1 min,5 min,15 min,1 hour,6 hours,1 day").split(","));
347 int ll = _perfIntrComboBox->findText(settings.value("perfIntr").toString());
348 if (ll != -1) {
349 _perfIntrComboBox->setCurrentIndex(ll);
350 }
351 _scanRTCMCheckBox = new QCheckBox();
352 _scanRTCMCheckBox->setCheckState(Qt::CheckState(
353 settings.value("scanRTCM").toInt()));
354
355 connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
356 this, SLOT(slotBncTextChanged()));
357
358 // PPP Options
359 // -----------
360 _pppMountLineEdit = new QLineEdit(settings.value("pppMount").toString());
361 _pppCorrMountLineEdit = new QLineEdit(settings.value("pppCorrMount").toString());
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());
372 _pppMaxSolGapLineEdit = new QLineEdit(settings.value("pppMaxSolGap").toString());
373 _pppRefCrdXLineEdit = new QLineEdit(settings.value("pppRefCrdX").toString());
374 _pppRefCrdYLineEdit = new QLineEdit(settings.value("pppRefCrdY").toString());
375 _pppRefCrdZLineEdit = new QLineEdit(settings.value("pppRefCrdZ").toString());
376 _pppRefdNLineEdit = new QLineEdit(settings.value("pppRefdN").toString());
377 _pppRefdELineEdit = new QLineEdit(settings.value("pppRefdE").toString());
378 _pppRefdULineEdit = new QLineEdit(settings.value("pppRefdU").toString());
379 _pppSync = new QLineEdit(settings.value("pppSync").toString());
380 _pppAntennaLineEdit = new QLineEdit(settings.value("pppAntenna").toString());
381 _pppAntexLineEdit = new QLineEdit(settings.value("pppAntex").toString());
382
383
384 _pppSPPComboBox = new QComboBox();
385 _pppSPPComboBox->setEditable(false);
386 _pppSPPComboBox->addItems(QString("PPP,SPP,Post-Processing").split(","));
387 int ik = _pppSPPComboBox->findText(settings.value("pppSPP").toString());
388 if (ik != -1) {
389 _pppSPPComboBox->setCurrentIndex(ik);
390 }
391 _pppUsePhaseCheckBox = new QCheckBox();
392 _pppUsePhaseCheckBox->setCheckState(Qt::CheckState(
393 settings.value("pppUsePhase").toInt()));
394 _pppEstTropoCheckBox = new QCheckBox();
395 _pppEstTropoCheckBox->setCheckState(Qt::CheckState(
396 settings.value("pppEstTropo").toInt()));
397 _pppGLONASSCheckBox = new QCheckBox();
398 _pppGLONASSCheckBox->setCheckState(Qt::CheckState(
399 settings.value("pppGLONASS").toInt()));
400 _pppGalileoCheckBox = new QCheckBox();
401 _pppGalileoCheckBox->setCheckState(Qt::CheckState(
402 settings.value("pppGalileo").toInt()));
403
404 _pppPlotCoordinates = new QCheckBox();
405 _pppPlotCoordinates->setCheckState(Qt::CheckState(
406 settings.value("pppPlotCoordinates").toInt()));
407
408 _pppApplySatAntCheckBox = new QCheckBox();
409 _pppApplySatAntCheckBox->setCheckState(Qt::CheckState(
410 settings.value("pppApplySatAnt").toInt()));
411
412 connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
413 this, SLOT(slotBncTextChanged()));
414
415 connect(_pppCorrMountLineEdit, SIGNAL(textChanged(const QString &)),
416 this, SLOT(slotBncTextChanged()));
417
418 connect(_pppUsePhaseCheckBox, SIGNAL(stateChanged(int)),
419 this, SLOT(slotBncTextChanged()));
420
421 connect(_pppRefCrdXLineEdit, SIGNAL(textChanged(const QString &)),
422 this, SLOT(slotBncTextChanged()));
423 connect(_pppRefCrdYLineEdit, SIGNAL(textChanged(const QString &)),
424 this, SLOT(slotBncTextChanged()));
425 connect(_pppRefCrdZLineEdit, SIGNAL(textChanged(const QString &)),
426 this, SLOT(slotBncTextChanged()));
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()));
433
434 connect(_pppEstTropoCheckBox, SIGNAL(stateChanged(int)),
435 this, SLOT(slotBncTextChanged()));
436
437 connect(_pppSync, SIGNAL(textChanged(const QString &)),
438 this, SLOT(slotBncTextChanged()));
439
440 connect(_pppSPPComboBox, SIGNAL(currentIndexChanged(const QString &)),
441 this, SLOT(slotBncTextChanged()));
442
443 connect(_pppAntexLineEdit, SIGNAL(textChanged(const QString &)),
444 this, SLOT(slotBncTextChanged()));
445
446 connect(_pppQuickStartLineEdit, SIGNAL(textChanged(const QString &)),
447 this, SLOT(slotBncTextChanged()));
448
449 // Streams
450 // -------
451 _mountPointsTable = new QTableWidget(0,8);
452
453 _mountPointsTable->horizontalHeader()->resizeSection(1,34*ww);
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);
458 _mountPointsTable->horizontalHeader()->resizeSection(6,5*ww);
459 _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
460 _mountPointsTable->horizontalHeader()->setStretchLastSection(true);
461 _mountPointsTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
462 _mountPointsTable->setHorizontalHeaderLabels(labels);
463 _mountPointsTable->setGridStyle(Qt::NoPen);
464 _mountPointsTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
465 _mountPointsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
466 _mountPointsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
467 _mountPointsTable->hideColumn(0);
468 connect(_mountPointsTable, SIGNAL(itemSelectionChanged()),
469 SLOT(slotSelectionChanged()));
470 populateMountPointsTable();
471
472 _log = new QTextBrowser();
473 _log->setReadOnly(true);
474
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);
488
489 _cmbMaxresLineEdit = new QLineEdit(settings.value("cmbMaxres").toString());
490
491 QPushButton* addCmbRowButton = new QPushButton("Add Row");
492 QPushButton* delCmbRowButton = new QPushButton("Delete");
493
494 connect(_cmbTable, SIGNAL(itemSelectionChanged()),
495 SLOT(slotBncTextChanged()));
496
497 _cmbMethodComboBox = new QComboBox();
498 _cmbMethodComboBox->setEditable(false);
499 _cmbMethodComboBox->addItems(QString("Filter,Single-Epoch").split(","));
500 int im = _cmbMethodComboBox->findText(settings.value("cmbMethod").toString());
501 if (im != -1) {
502 _cmbMethodComboBox->setCurrentIndex(im);
503 }
504
505 // Upload Results
506 // -------------
507 _uploadTable = new QTableWidget(0,9);
508 _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mount, Password, System, CoM, SP3 File, RNX File, bytes").split(","));
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);
517 _uploadTable->horizontalHeader()->resizeSection(6,15*ww);
518 _uploadTable->horizontalHeader()->resizeSection(7,15*ww);
519 _uploadTable->horizontalHeader()->resizeSection(8,10*ww);
520 _uploadTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
521 _uploadTable->horizontalHeader()->setStretchLastSection(true);
522 _uploadTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
523
524 connect(_uploadTable, SIGNAL(itemSelectionChanged()),
525 SLOT(slotBncTextChanged()));
526
527 QPushButton* addUploadRowButton = new QPushButton("Add Row");
528 QPushButton* delUploadRowButton = new QPushButton("Del Row");
529 QPushButton* setUploadTrafoButton = new QPushButton("Custom Trafo");
530 _uploadIntrComboBox = new QComboBox;
531 _uploadIntrComboBox->setEditable(false);
532 _uploadIntrComboBox->addItems(QString("1 day,1 hour, 30 min,15 min,10 min,5 min,2 min,1 min").split(","));
533 ii = _uploadIntrComboBox->findText(settings.value("uploadIntr").toString());
534 if (ii != -1) {
535 _uploadIntrComboBox->setCurrentIndex(ii);
536 }
537 _uploadSamplSpinBox = new QSpinBox;
538 _uploadSamplSpinBox->setMinimum(5);
539 _uploadSamplSpinBox->setMaximum(60);
540 _uploadSamplSpinBox->setSingleStep(5);
541 _uploadSamplSpinBox->setMaximumWidth(9*ww);
542 _uploadSamplSpinBox->setValue(settings.value("uploadSampl").toInt());
543 _uploadSamplSpinBox->setSuffix(" sec");
544
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");
552
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;
561 _uploadEphSampleSpinBox->setMinimum(5);
562 _uploadEphSampleSpinBox->setMaximum(60);
563 _uploadEphSampleSpinBox->setSingleStep(5);
564 _uploadEphSampleSpinBox->setMaximumWidth(9*ww);
565 _uploadEphSampleSpinBox->setValue(settings.value("uploadEphSample").toInt());
566 _uploadEphSampleSpinBox->setSuffix(" sec");
567 _uploadEphBytesCounter = new bncBytesCounter;
568
569 // WhatsThis
570 // ---------
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>"));
572 _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC.</p>"));
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>"));
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."));
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."));
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."));
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."));
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>"));
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."));
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."));
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>"));
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>"));
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>"));
586 _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNC at startup time in window mode with preassigned processing options.</p>"));
587 _rawOutFileLineEdit->setWhatsThis(tr("<p>Save all data coming in through various streams in the received order and format in one file.</p>"));
588
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>"));
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>"));
592 _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of the Broadcast Ephemeris Correction files.</p>"));
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>"));
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>"));
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>"));
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>"));
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."));
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>"));
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>"));
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>"));
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)."));
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."));
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."));
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."));
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>"));
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>"));
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>"));
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>"));
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>"));
621 _pppSPPComboBox->setWhatsThis(tr("<p>Choose between plain Single Point Positioning (SPP) and Precise Point Positioning (PPP).</p>"));
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>"));
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>"));
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>"));
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>"));
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."));
627 _pppNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where PPP results are saved as NMEA messages.</p>"));
628 _pppNMEAPortLineEdit->setWhatsThis(tr("<p>Specify an IP port number to output PPP results as NMEA messages through an IP port.</p>"));
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>"));
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>"));
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>"));
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>"));
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."));
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>"));
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>"));
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>"));
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>"));
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>"));
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."));
645 _pppSync->setWhatsThis(tr(
646 "<p> Zero value (or empty field, default) means that BNC processes each epoch of data "
647 "immediately after its arrival using satellite clock corrections available at "
648 "that time.</p><p> Non-zero value 'Sync Corr' (i.e. 5) means that the epochs of data "
649 "are buffered and the processing of each epoch is postponed till the satellite clock "
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>"));
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>"));
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."));
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>"));
655 addCmbRowButton->setWhatsThis(tr("Hit 'Add Row' button to add another line to the mountpoints table."));
656 delCmbRowButton->setWhatsThis(tr("Hit 'Delete' button to delete the highlighted line from the mountpoints table."));
657
658 // Canvas with Editable Fields
659 // ---------------------------
660 _canvas = new QWidget;
661 setCentralWidget(_canvas);
662
663 _aogroup = new QTabWidget();
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();
669 QWidget* cgroup = new QWidget();
670 QWidget* ogroup = new QWidget();
671 QWidget* rgroup = new QWidget();
672 QWidget* sergroup = new QWidget();
673 QWidget* pppgroup = new QWidget();
674 QWidget* ppp2group = new QWidget();
675 QWidget* cmbgroup = new QWidget();
676 QWidget* uploadgroup = new QWidget();
677 QWidget* uploadEphgroup = new QWidget();
678 _aogroup->addTab(pgroup,tr("Network"));
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"));
687 _aogroup->addTab(pppgroup,tr("PPP (1)"));
688 _aogroup->addTab(ppp2group,tr("PPP (2)"));
689#ifdef USE_COMBINATION
690 _aogroup->addTab(cmbgroup,tr("Combination"));
691#endif
692 _aogroup->addTab(uploadgroup,tr("Upload (clk)"));
693 _aogroup->addTab(uploadEphgroup,tr("Upload (eph)"));
694
695 // Log Tab
696 // -------
697 _loggroup = new QTabWidget();
698 _loggroup->addTab(_log,tr("Log"));
699 _loggroup->addTab(_bncFigure,tr("Throughput"));
700 _loggroup->addTab(_bncFigureLate,tr("Latency"));
701 _loggroup->addTab(_bncFigurePPP,tr("PPP Plot"));
702
703 // Netowork (Proxy and SSL) Tab
704 // ----------------------------
705 QGridLayout* pLayout = new QGridLayout;
706 pLayout->setColumnMinimumWidth(0,13*ww);
707 _proxyPortLineEdit->setMaximumWidth(9*ww);
708
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);
713 pLayout->addWidget(new QLabel("Settings for proxy in protected networks, leave boxes blank if none."),2, 0, 1, 50, Qt::AlignLeft);
714 pLayout->addWidget(new QLabel(" "),3,0);
715 pLayout->addWidget(new QLabel(" "),4,0);
716 pLayout->addWidget(new QLabel("Path to SSL Certificates"), 5, 0);
717 pLayout->addWidget(_sslCaCertPathLineEdit, 5, 1, 1,10);
718 pLayout->addWidget(new QLabel("default: " + bncSslConfig::defaultPath()), 5, 12, 1,20);
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);
722 pgroup->setLayout(pLayout);
723
724 // General Tab
725 // -----------
726 QGridLayout* gLayout = new QGridLayout;
727 gLayout->setColumnMinimumWidth(0,14*ww);
728 _onTheFlyComboBox->setMaximumWidth(9*ww);
729
730 gLayout->addWidget(new QLabel("Logfile (full path)"), 0, 0);
731 gLayout->addWidget(_logFileLineEdit, 0, 1, 1,30); // 1
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);
736 gLayout->addWidget(new QLabel("Auto start"), 3, 0);
737 gLayout->addWidget(_autoStartCheckBox, 3, 1);
738 gLayout->addWidget(new QLabel("Raw output file (full path)"), 4, 0);
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);
741 ggroup->setLayout(gLayout);
742
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);
749
750 oLayout->addWidget(new QLabel("Directory"), 0, 0);
751 oLayout->addWidget(_rnxPathLineEdit, 0, 1,1,24);
752 oLayout->addWidget(new QLabel("Interval"), 1, 0);
753 oLayout->addWidget(_rnxIntrComboBox, 1, 1);
754 oLayout->addWidget(new QLabel(" Sampling"), 1, 2, Qt::AlignRight);
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);
759 oLayout->addWidget(_rnxScrpLineEdit, 3, 1,1,24);
760 oLayout->addWidget(new QLabel("Version 3"), 4, 0);
761 oLayout->addWidget(_rnxV3CheckBox, 4, 1);
762 oLayout->addWidget(new QLabel("Saving RINEX observation files."),5,0,1,50, Qt::AlignLeft);
763 ogroup->setLayout(oLayout);
764
765 // RINEX Ephemeris
766 // ---------------
767 QGridLayout* eLayout = new QGridLayout;
768 eLayout->setColumnMinimumWidth(0,14*ww);
769 _ephIntrComboBox->setMaximumWidth(9*ww);
770 _outEphPortLineEdit->setMaximumWidth(9*ww);
771
772 eLayout->addWidget(new QLabel("Directory"), 0, 0);
773 eLayout->addWidget(_ephPathLineEdit, 0, 1, 1,30);
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);
778 eLayout->addWidget(new QLabel("Version 3"), 3, 0);
779 eLayout->addWidget(_ephV3CheckBox, 3, 1);
780 eLayout->addWidget(new QLabel("Saving RINEX ephemeris files and ephemeris output through IP port."),4,0,1,50,Qt::AlignLeft);
781 eLayout->addWidget(new QLabel(" "),5,0);
782 egroup->setLayout(eLayout);
783
784
785 // Broadcast Corrections
786 // ---------------------
787 QGridLayout* cLayout = new QGridLayout;
788 cLayout->setColumnMinimumWidth(0,14*ww);
789 _corrIntrComboBox->setMaximumWidth(9*ww);
790 _corrPortLineEdit->setMaximumWidth(9*ww);
791 _corrTimeSpinBox->setMaximumWidth(9*ww);
792
793 cLayout->addWidget(new QLabel("Directory, ASCII"), 0, 0);
794 cLayout->addWidget(_corrPathLineEdit, 0, 1,1,20);
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);
799 cLayout->addWidget(new QLabel(" Wait for full epoch"), 2, 2, Qt::AlignRight);
800 cLayout->addWidget(_corrTimeSpinBox, 2, 3, Qt::AlignLeft);
801 cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),3,0,1,50);
802 cLayout->addWidget(new QLabel(" "),4,0);
803 cLayout->addWidget(new QLabel(" "),5,0);
804 cgroup->setLayout(cLayout);
805
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);
822 sLayout->addWidget(_outFileLineEdit, 2, 1, 1, 20);
823 sLayout->addWidget(new QLabel("Port (unsynchronized)"), 3, 0);
824 sLayout->addWidget(_outUPortLineEdit, 3, 1);
825 sLayout->addWidget(new QLabel("Output decoded observations in a binary format to feed a real-time GNSS network engine."),4,0,1,50);
826 sLayout->addWidget(new QLabel(" "),5,0);
827 sgroup->setLayout(sLayout);
828
829 // Serial Output
830 // -------------
831 QGridLayout* serLayout = new QGridLayout;
832 serLayout->setColumnMinimumWidth(0,14*ww);
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);
839 _serialHeightNMEALineEdit->setMaximumWidth(8*ww);
840
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);
847 serLayout->addWidget(new QLabel("Flow control"), 2,2, Qt::AlignRight);
848 serLayout->addWidget(_serialFlowControlComboBox, 2,3);
849 serLayout->addWidget(new QLabel("Data bits"), 3,0, Qt::AlignLeft);
850 serLayout->addWidget(_serialDataBitsComboBox, 3,1);
851 serLayout->addWidget(new QLabel("Parity"), 3,2, Qt::AlignRight);
852 serLayout->addWidget(_serialParityComboBox, 3,3);
853 serLayout->addWidget(new QLabel(" Stop bits"), 3,4, Qt::AlignRight);
854 serLayout->addWidget(_serialStopBitsComboBox, 3,5);
855 serLayout->addWidget(new QLabel("NMEA"), 4,0);
856 serLayout->addWidget(_serialAutoNMEAComboBox, 4,1);
857 serLayout->addWidget(new QLabel(" File (full path)"), 4,2, Qt::AlignRight);
858 serLayout->addWidget(_serialFileNMEALineEdit, 4,3,1,15);
859 serLayout->addWidget(new QLabel("Height"), 4,20, Qt::AlignRight);
860 serLayout->addWidget(_serialHeightNMEALineEdit, 4,21,1,11);
861 serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver."),5,0,1,30);
862
863 sergroup->setLayout(serLayout);
864
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);
880 aLayout->addWidget(_adviseScriptLineEdit, 3, 1,1,30);
881 aLayout->addWidget(new QLabel("Failure and recovery reports, advisory notes."),4,0,1,50,Qt::AlignLeft);
882 aLayout->addWidget(new QLabel(" "), 5, 0);
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
902 // PPP Client
903 // ----------
904 QGridLayout* pppLayout = new QGridLayout;
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);
913 _pppMaxSolGapLineEdit->setMaximumWidth(6*ww);
914 _pppRefCrdXLineEdit->setMaximumWidth(10*ww);
915 _pppRefCrdYLineEdit->setMaximumWidth(10*ww);
916 _pppRefCrdZLineEdit->setMaximumWidth(10*ww);
917 _pppRefdNLineEdit->setMaximumWidth(5*ww);
918 _pppRefdELineEdit->setMaximumWidth(5*ww);
919 _pppRefdULineEdit->setMaximumWidth(5*ww);
920 _pppSync->setMaximumWidth(6*ww);
921 _pppSPPComboBox->setMaximumWidth(15*ww);
922 _pppNMEAPortLineEdit->setMaximumWidth(6*ww);
923
924 _postObsFileChooser = new qtFileChooser;
925 _postNavFileChooser = new qtFileChooser;
926 _postCorrFileChooser = new qtFileChooser;
927
928 int ir = 0;
929 pppLayout->addWidget(new QLabel("<b>Precise Point Positioning (Panel 1)</b>"), ir, 0, 1, 8);
930 ++ir;
931 pppLayout->addWidget(new QLabel("Obs Mountpoint"), ir, 0);
932 pppLayout->addWidget(_pppMountLineEdit, ir, 1);
933 pppLayout->addWidget(_pppSPPComboBox, ir, 2);
934 pppLayout->addWidget(new QLabel(" X "), ir, 3, Qt::AlignRight);
935 pppLayout->addWidget(_pppRefCrdXLineEdit, ir, 4);
936 pppLayout->addWidget(new QLabel(" Y "), ir, 5, Qt::AlignRight);
937 pppLayout->addWidget(_pppRefCrdYLineEdit, ir, 6);
938 pppLayout->addWidget(new QLabel(" Z "), ir, 7, Qt::AlignRight);
939 pppLayout->addWidget(_pppRefCrdZLineEdit, ir, 8);
940 ++ir;
941 pppLayout->addWidget(new QLabel("Corr Mountpoint "), ir, 0);
942 pppLayout->addWidget(_pppCorrMountLineEdit, ir, 1);
943 pppLayout->addWidget(new QLabel(" dN "), ir, 3, Qt::AlignRight);
944 pppLayout->addWidget(_pppRefdNLineEdit, ir, 4);
945 pppLayout->addWidget(new QLabel(" dE "), ir, 5, Qt::AlignRight);
946 pppLayout->addWidget(_pppRefdELineEdit, ir, 6);
947 pppLayout->addWidget(new QLabel(" dU "), ir, 7, Qt::AlignRight);
948 pppLayout->addWidget(_pppRefdULineEdit, ir, 8);
949 ++ir;
950 pppLayout->addWidget(new QLabel("Options"), ir, 0, 1, 5);
951 pppLayout->addWidget(_pppUsePhaseCheckBox, ir, 1, Qt::AlignRight);
952 pppLayout->addWidget(new QLabel("Use phase obs"), ir, 2);
953 pppLayout->addWidget(_pppEstTropoCheckBox, ir, 3, Qt::AlignRight);
954 pppLayout->addWidget(new QLabel("Estimate tropo"), ir, 4);
955 pppLayout->addWidget(_pppGLONASSCheckBox, ir, 5, Qt::AlignRight);
956 pppLayout->addWidget(new QLabel("Use GLONASS"), ir, 6);
957 pppLayout->addWidget(_pppGalileoCheckBox, ir, 7, Qt::AlignRight);
958 pppLayout->addWidget(new QLabel("Use Galileo "), ir, 8);
959 ++ir;
960 pppLayout->addWidget(new QLabel("Output"), ir, 0);
961 pppLayout->addWidget(_pppNMEALineEdit, ir, 1, 1, 3);
962 pppLayout->addWidget(new QLabel("NMEA File"), ir, 4);
963 pppLayout->addWidget(_pppNMEAPortLineEdit, ir, 5, Qt::AlignRight);
964 pppLayout->addWidget(new QLabel("NMEA Port"), ir, 6);
965 pppLayout->addWidget(_pppPlotCoordinates, ir, 7, Qt::AlignRight);
966 pppLayout->addWidget(new QLabel("PPP Plot"), ir, 8);
967 ++ir;
968 pppLayout->addWidget(new QLabel("<b>Post-Processing</b>"));
969 QHBoxLayout* hlpLayout = new QHBoxLayout;
970 {
971 hlpLayout->addWidget(_postObsFileChooser);
972 hlpLayout->addWidget(new QLabel("Obs"));
973 hlpLayout->addWidget(_postNavFileChooser);
974 hlpLayout->addWidget(new QLabel("Nav"));
975 hlpLayout->addWidget(_postCorrFileChooser);
976 hlpLayout->addWidget(new QLabel("Corr"));
977 }
978 pppLayout->addLayout(hlpLayout, ir, 1, 1, 7);
979
980 pppgroup->setLayout(pppLayout);
981
982 // PPP Client (second panel)
983 // -------------------------
984 QGridLayout* ppp2Layout = new QGridLayout;
985 ir = 0;
986 ppp2Layout->addWidget(new QLabel("<b>Precise Point Positioning (Panel 2)</b>"), ir, 0, 1, 8);
987 ++ir;
988 ppp2Layout->addWidget(new QLabel("Antennas"), ir, 0);
989 ppp2Layout->addWidget(_pppAntexLineEdit, ir, 1, 1, 3);
990 ppp2Layout->addWidget(new QLabel("ANTEX File "), ir, 4);
991 ppp2Layout->addWidget(_pppAntennaLineEdit, ir, 5, 1, 3);
992 ppp2Layout->addWidget(new QLabel("Rec. Ant. Name"), ir, 8);
993 ++ir;
994 ppp2Layout->addWidget(new QLabel("Satellite Antenna "), ir, 0);
995 ppp2Layout->addWidget(_pppApplySatAntCheckBox, ir, 1, Qt::AlignRight);
996 ppp2Layout->addWidget(new QLabel("Apply Offsets"), ir, 2, Qt::AlignLeft);
997 ++ir;
998 ppp2Layout->addWidget(new QLabel("Sigmas"), ir, 0);
999 ppp2Layout->addWidget(_pppSigCLineEdit, ir, 1, Qt::AlignRight);
1000 ppp2Layout->addWidget(new QLabel("Code"), ir, 2);
1001 ppp2Layout->addWidget(_pppSigPLineEdit, ir, 3);
1002 ppp2Layout->addWidget(new QLabel("Phase"), ir, 4);
1003 ppp2Layout->addWidget(_pppSigTrp0, ir, 5, Qt::AlignRight);
1004 ppp2Layout->addWidget(new QLabel("Tropo Init "), ir, 6);
1005 ppp2Layout->addWidget(_pppSigTrpP, ir, 7);
1006 ppp2Layout->addWidget(new QLabel("Tropo White Noise"), ir, 8);
1007 ++ir;
1008 ppp2Layout->addWidget(new QLabel("Options cont'd"), ir, 0);
1009 ppp2Layout->addWidget(_pppSigCrd0, ir, 1, Qt::AlignRight);
1010 ppp2Layout->addWidget(new QLabel("Sigma XYZ Init "), ir, 2);
1011 ppp2Layout->addWidget(_pppSigCrdP, ir, 3, Qt::AlignRight);
1012 ppp2Layout->addWidget(new QLabel("Sigma XYZ Noise "), ir, 4);
1013 ppp2Layout->addWidget(_pppQuickStartLineEdit, ir, 5, Qt::AlignRight);
1014 ppp2Layout->addWidget(new QLabel("Quick-Start (sec) "), ir, 6);
1015 ppp2Layout->addWidget(_pppMaxSolGapLineEdit, ir, 7, Qt::AlignRight);
1016 ppp2Layout->addWidget(new QLabel("Max Sol. Gap (sec)"), ir, 8);
1017 ++ir;
1018 ppp2Layout->addWidget(new QLabel("Options cont'd"), ir, 0);
1019 ppp2Layout->addWidget(_pppSync, ir, 1);
1020 ppp2Layout->addWidget(new QLabel("Sync Corr (sec) "), ir, 2);
1021 ppp2Layout->addWidget(_pppAverageLineEdit, ir, 3, Qt::AlignRight);
1022 ppp2Layout->addWidget(new QLabel("Averaging (min)") , ir, 4);
1023 ++ir;
1024 ppp2Layout->addWidget(new QLabel(" "), ir, 0);
1025 ppp2Layout->setRowStretch(ir, 99);
1026
1027 ppp2group->setLayout(ppp2Layout);
1028
1029 // Combination
1030 // -----------
1031 QGridLayout* cmbLayout = new QGridLayout;
1032
1033 populateCmbTable();
1034 cmbLayout->addWidget(_cmbTable,0,0,6,3);
1035
1036 cmbLayout->addWidget(addCmbRowButton,1,3);
1037 connect(addCmbRowButton, SIGNAL(clicked()), this, SLOT(slotAddCmbRow()));
1038 cmbLayout->addWidget(delCmbRowButton,2,3);
1039 cmbLayout->addWidget(new QLabel("Method"), 3, 3);
1040 cmbLayout->addWidget(_cmbMethodComboBox, 3, 4, Qt::AlignRight);
1041 cmbLayout->addWidget(new QLabel("Maximal Residuum"), 4, 3);
1042 cmbLayout->addWidget(_cmbMaxresLineEdit, 4, 4, Qt::AlignRight);
1043 connect(delCmbRowButton, SIGNAL(clicked()), this, SLOT(slotDelCmbRow()));
1044
1045 cmbLayout->addWidget(new QLabel(" Combine Broadcast Ephemeris corrections streams."),5,3,1,3);
1046
1047 cmbgroup->setLayout(cmbLayout);
1048
1049 // Upload Layout (Clocks)
1050 // ----------------------
1051 QGridLayout* uploadHlpLayout = new QGridLayout();
1052
1053 uploadHlpLayout->addWidget(new QLabel("Upload RTNet or Combination Results"),0,0);
1054
1055 uploadHlpLayout->addWidget(addUploadRowButton,0,1);
1056 connect(addUploadRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadRow()));
1057
1058 uploadHlpLayout->addWidget(delUploadRowButton,0,2);
1059 connect(delUploadRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadRow()));
1060
1061 uploadHlpLayout->addWidget(setUploadTrafoButton,1,1);
1062 connect(setUploadTrafoButton, SIGNAL(clicked()), this, SLOT(slotSetUploadTrafo()));
1063
1064 uploadHlpLayout->addWidget(new QLabel("Interval"),0,3, Qt::AlignRight);
1065 uploadHlpLayout->addWidget(_uploadIntrComboBox,0,4);
1066
1067 uploadHlpLayout->addWidget(new QLabel("Sampling"),1,3, Qt::AlignRight);
1068 uploadHlpLayout->addWidget(_uploadSamplSpinBox,1,4);
1069
1070 uploadHlpLayout->addWidget(new QLabel("Sampling (Orb)"),1,5, Qt::AlignRight);
1071 uploadHlpLayout->addWidget(_uploadSamplOrbSpinBox,1,6);
1072
1073 QBoxLayout* uploadLayout = new QBoxLayout(QBoxLayout::TopToBottom);
1074 populateUploadTable();
1075 uploadLayout->addWidget(_uploadTable);
1076 uploadLayout->addLayout(uploadHlpLayout);
1077
1078 uploadgroup->setLayout(uploadLayout);
1079
1080 // Upload Layout (Ephemeris)
1081 // -------------------------
1082 QGridLayout* uploadLayoutEph = new QGridLayout;
1083
1084 uploadLayoutEph->setColumnMinimumWidth(0, 9*ww);
1085 _uploadEphPortLineEdit->setMaximumWidth(9*ww);
1086 _uploadEphPasswordLineEdit->setMaximumWidth(9*ww);
1087 _uploadEphMountpointLineEdit->setMaximumWidth(12*ww);
1088
1089 uploadLayoutEph->addWidget(new QLabel("Host"), 0, 0);
1090 uploadLayoutEph->addWidget(_uploadEphHostLineEdit, 0, 1, 1, 3);
1091 uploadLayoutEph->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
1092 uploadLayoutEph->addWidget(_uploadEphPortLineEdit, 0, 5, 1, 1);
1093 uploadLayoutEph->addWidget(new QLabel("Mountpoint "), 1, 0);
1094 uploadLayoutEph->addWidget(_uploadEphMountpointLineEdit, 1, 1);
1095 uploadLayoutEph->addWidget(new QLabel(" Password"), 1, 2, Qt::AlignRight);
1096 uploadLayoutEph->addWidget(_uploadEphPasswordLineEdit, 1, 3);
1097 uploadLayoutEph->addWidget(new QLabel("Sampling"), 2, 0);
1098 uploadLayoutEph->addWidget(_uploadEphSampleSpinBox, 2, 1);
1099 uploadLayoutEph->addWidget(new QLabel("Upload concatenated RTCMv3 Broadcast Ephemeris to caster."), 3, 0, 1, 5);
1100 uploadLayoutEph->addWidget(_uploadEphBytesCounter, 3, 5);
1101
1102 uploadEphgroup->setLayout(uploadLayoutEph);
1103
1104 connect(_uploadEphHostLineEdit, SIGNAL(textChanged(const QString &)),
1105 this, SLOT(slotBncTextChanged()));
1106
1107 // Main Layout
1108 // -----------
1109 QGridLayout* mLayout = new QGridLayout;
1110 _aogroup->setCurrentIndex(settings.value("startTab").toInt());
1111 mLayout->addWidget(_aogroup, 0,0);
1112 mLayout->addWidget(_mountPointsTable, 1,0);
1113 _loggroup->setCurrentIndex(settings.value("statusTab").toInt());
1114 mLayout->addWidget(_loggroup, 2,0);
1115
1116 _canvas->setLayout(mLayout);
1117
1118 // Enable/Disable all Widgets
1119 // --------------------------
1120 slotBncTextChanged();
1121
1122 // Auto start
1123 // ----------
1124 if ( Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
1125 slotGetData();
1126 }
1127}
1128
1129// Destructor
1130////////////////////////////////////////////////////////////////////////////
1131bncWindow::~bncWindow() {
1132 delete _caster;
1133 delete _casterEph;
1134}
1135
1136//
1137////////////////////////////////////////////////////////////////////////////
1138void bncWindow::populateMountPointsTable() {
1139
1140 for (int iRow = _mountPointsTable->rowCount()-1; iRow >=0; iRow--) {
1141 _mountPointsTable->removeRow(iRow);
1142 }
1143
1144 bncSettings settings;
1145
1146 QListIterator<QString> it(settings.value("mountPoints").toStringList());
1147 if (!it.hasNext()) {
1148 _actGetData->setEnabled(false);
1149 }
1150 int iRow = 0;
1151 while (it.hasNext()) {
1152 QStringList hlp = it.next().split(" ");
1153 if (hlp.size() < 5) continue;
1154 _mountPointsTable->insertRow(iRow);
1155
1156 QUrl url(hlp[0]);
1157
1158 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
1159 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
1160 QString nmea(hlp[4]);
1161 if (hlp[5] == "S") {
1162 fullPath = hlp[0].replace(0,2,"");
1163 }
1164 QString ntripVersion = "2";
1165 if (hlp.size() >= 6) {
1166 ntripVersion = (hlp[5]);
1167 }
1168
1169 QTableWidgetItem* it;
1170 it = new QTableWidgetItem(url.userInfo());
1171 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1172 _mountPointsTable->setItem(iRow, 0, it);
1173
1174 it = new QTableWidgetItem(fullPath);
1175 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1176 _mountPointsTable->setItem(iRow, 1, it);
1177
1178 it = new QTableWidgetItem(format);
1179 _mountPointsTable->setItem(iRow, 2, it);
1180
1181 if (nmea == "yes") {
1182 it = new QTableWidgetItem(latitude);
1183 _mountPointsTable->setItem(iRow, 3, it);
1184 it = new QTableWidgetItem(longitude);
1185 _mountPointsTable->setItem(iRow, 4, it);
1186 } else {
1187 it = new QTableWidgetItem(latitude);
1188 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1189 _mountPointsTable->setItem(iRow, 3, it);
1190 it = new QTableWidgetItem(longitude);
1191 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1192 _mountPointsTable->setItem(iRow, 4, it);
1193 }
1194
1195 it = new QTableWidgetItem(nmea);
1196 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1197 _mountPointsTable->setItem(iRow, 5, it);
1198
1199 it = new QTableWidgetItem(ntripVersion);
1200 //// it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1201 _mountPointsTable->setItem(iRow, 6, it);
1202
1203 bncTableItem* bncIt = new bncTableItem();
1204 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
1205 _mountPointsTable->setItem(iRow, 7, bncIt);
1206
1207 iRow++;
1208 }
1209
1210 _mountPointsTable->sortItems(1);
1211}
1212
1213// Retrieve Table
1214////////////////////////////////////////////////////////////////////////////
1215void bncWindow::slotAddMountPoints() {
1216
1217 bncSettings settings;
1218 QString proxyHost = settings.value("proxyHost").toString();
1219 int proxyPort = settings.value("proxyPort").toInt();
1220 if (proxyHost != _proxyHostLineEdit->text() ||
1221 proxyPort != _proxyPortLineEdit->text().toInt()) {
1222 int iRet = QMessageBox::question(this, "Question", "Proxy options "
1223 "changed. Use the new ones?",
1224 QMessageBox::Yes, QMessageBox::No,
1225 QMessageBox::NoButton);
1226 if (iRet == QMessageBox::Yes) {
1227 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1228 settings.setValue("proxyPort", _proxyPortLineEdit->text());
1229 settings.sync();
1230 }
1231 }
1232
1233 settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
1234 settings.setValue("ignoreSslErrors", _ignoreSslErrorsCheckBox->checkState());
1235 settings.sync();
1236
1237 QMessageBox msgBox;
1238 msgBox.setIcon(QMessageBox::Question);
1239 msgBox.setWindowTitle("Add Stream");
1240 msgBox.setText("Add stream(s) coming from:");
1241
1242 QPushButton* buttonNtrip = msgBox.addButton(tr("Caster"), QMessageBox::ActionRole);
1243 QPushButton* buttonIP = msgBox.addButton(tr("TCP/IP port"), QMessageBox::ActionRole);
1244 QPushButton* buttonUDP = msgBox.addButton(tr("UDP port"), QMessageBox::ActionRole);
1245 QPushButton* buttonSerial = msgBox.addButton(tr("Serial port"), QMessageBox::ActionRole);
1246 QPushButton* buttonCancel = msgBox.addButton(tr("Cancel"), QMessageBox::ActionRole);
1247
1248 msgBox.exec();
1249
1250 if (msgBox.clickedButton() == buttonNtrip) {
1251 bncTableDlg* dlg = new bncTableDlg(this);
1252 dlg->move(this->pos().x()+50, this->pos().y()+50);
1253 connect(dlg, SIGNAL(newMountPoints(QStringList*)),
1254 this, SLOT(slotNewMountPoints(QStringList*)));
1255 dlg->exec();
1256 delete dlg;
1257 } else if (msgBox.clickedButton() == buttonIP) {
1258 bncIpPort* ipp = new bncIpPort(this);
1259 connect(ipp, SIGNAL(newMountPoints(QStringList*)),
1260 this, SLOT(slotNewMountPoints(QStringList*)));
1261 ipp->exec();
1262 delete ipp;
1263 } else if (msgBox.clickedButton() == buttonUDP) {
1264 bncUdpPort* udp = new bncUdpPort(this);
1265 connect(udp, SIGNAL(newMountPoints(QStringList*)),
1266 this, SLOT(slotNewMountPoints(QStringList*)));
1267 udp->exec();
1268 delete udp;
1269 } else if (msgBox.clickedButton() == buttonSerial) {
1270 bncSerialPort* sep = new bncSerialPort(this);
1271 connect(sep, SIGNAL(newMountPoints(QStringList*)),
1272 this, SLOT(slotNewMountPoints(QStringList*)));
1273 sep->exec();
1274 delete sep;
1275 } else if (msgBox.clickedButton() == buttonCancel) {
1276 // Cancel
1277 }
1278}
1279
1280// Delete Selected Mount Points
1281////////////////////////////////////////////////////////////////////////////
1282void bncWindow::slotDeleteMountPoints() {
1283
1284 int nRows = _mountPointsTable->rowCount();
1285 bool flg[nRows];
1286 for (int iRow = 0; iRow < nRows; iRow++) {
1287 if (_mountPointsTable->isItemSelected(_mountPointsTable->item(iRow,1))) {
1288 flg[iRow] = true;
1289 }
1290 else {
1291 flg[iRow] = false;
1292 }
1293 }
1294 for (int iRow = nRows-1; iRow >= 0; iRow--) {
1295 if (flg[iRow]) {
1296 _mountPointsTable->removeRow(iRow);
1297 }
1298 }
1299 _actDeleteMountPoints->setEnabled(false);
1300
1301 if (_mountPointsTable->rowCount() == 0) {
1302 _actGetData->setEnabled(false);
1303 }
1304}
1305
1306// New Mount Points Selected
1307////////////////////////////////////////////////////////////////////////////
1308void bncWindow::slotNewMountPoints(QStringList* mountPoints) {
1309 int iRow = 0;
1310 QListIterator<QString> it(*mountPoints);
1311 while (it.hasNext()) {
1312 QStringList hlp = it.next().split(" ");
1313 QUrl url(hlp[0]);
1314 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
1315 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
1316 QString nmea(hlp[4]);
1317 if (hlp[5] == "S") {
1318 fullPath = hlp[0].replace(0,2,"");
1319 }
1320 QString ntripVersion = "2";
1321 if (hlp.size() >= 6) {
1322 ntripVersion = (hlp[5]);
1323 }
1324
1325 _mountPointsTable->insertRow(iRow);
1326
1327 QTableWidgetItem* it;
1328 it = new QTableWidgetItem(url.userInfo());
1329 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1330 _mountPointsTable->setItem(iRow, 0, it);
1331
1332 it = new QTableWidgetItem(fullPath);
1333 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1334 _mountPointsTable->setItem(iRow, 1, it);
1335
1336 it = new QTableWidgetItem(format);
1337 _mountPointsTable->setItem(iRow, 2, it);
1338
1339 if (nmea == "yes") {
1340 it = new QTableWidgetItem(latitude);
1341 _mountPointsTable->setItem(iRow, 3, it);
1342 it = new QTableWidgetItem(longitude);
1343 _mountPointsTable->setItem(iRow, 4, it);
1344 } else {
1345 it = new QTableWidgetItem(latitude);
1346 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1347 _mountPointsTable->setItem(iRow, 3, it);
1348 it = new QTableWidgetItem(longitude);
1349 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1350 _mountPointsTable->setItem(iRow, 4, it);
1351 }
1352
1353 it = new QTableWidgetItem(nmea);
1354 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1355 _mountPointsTable->setItem(iRow, 5, it);
1356
1357 it = new QTableWidgetItem(ntripVersion);
1358 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1359 _mountPointsTable->setItem(iRow, 6, it);
1360
1361 bncTableItem* bncIt = new bncTableItem();
1362 _mountPointsTable->setItem(iRow, 7, bncIt);
1363
1364 iRow++;
1365 }
1366 _mountPointsTable->hideColumn(0);
1367 _mountPointsTable->sortItems(1);
1368 if (mountPoints->count() > 0 && !_actStop->isEnabled()) {
1369 _actGetData->setEnabled(true);
1370 }
1371 delete mountPoints;
1372}
1373
1374// Save Options
1375////////////////////////////////////////////////////////////////////////////
1376void bncWindow::slotSaveOptions() {
1377
1378 QStringList mountPoints;
1379 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1380
1381 if (_mountPointsTable->item(iRow, 6)->text() != "S") {
1382 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1383 "@" + _mountPointsTable->item(iRow, 1)->text() );
1384
1385 mountPoints.append(url.toString() + " " +
1386 _mountPointsTable->item(iRow, 2)->text()
1387 + " " + _mountPointsTable->item(iRow, 3)->text()
1388 + " " + _mountPointsTable->item(iRow, 4)->text()
1389 + " " + _mountPointsTable->item(iRow, 5)->text()
1390 + " " + _mountPointsTable->item(iRow, 6)->text());
1391 } else {
1392 mountPoints.append(
1393 "//" + _mountPointsTable->item(iRow, 1)->text()
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 }
1400 }
1401
1402 QStringList combineStreams;
1403 for (int iRow = 0; iRow < _cmbTable->rowCount(); iRow++) {
1404 QString hlp;
1405 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
1406 if (_cmbTable->item(iRow, iCol)) {
1407 hlp += _cmbTable->item(iRow, iCol)->text() + " ";
1408 }
1409 }
1410 if (!hlp.isEmpty()) {
1411 combineStreams << hlp;
1412 }
1413 }
1414
1415 QStringList uploadMountpointsOut;
1416 for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
1417 QString hlp;
1418 for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
1419 if (_uploadTable->cellWidget(iRow, iCol) &&
1420 (iCol == 3 || iCol == 4 || iCol == 5)) {
1421 if (iCol == 3) {
1422 QLineEdit* passwd = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
1423 hlp += passwd->text() + ",";
1424 }
1425 else if (iCol == 4) {
1426 QComboBox* system = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
1427 hlp += system->currentText() + ",";
1428 }
1429 else if (iCol == 5) {
1430 QCheckBox* com = (QCheckBox*)(_uploadTable->cellWidget(iRow, iCol));
1431 QString state; state.setNum(com->checkState());
1432 hlp += state + ",";
1433 }
1434 }
1435 else if (_uploadTable->item(iRow, iCol)) {
1436 hlp += _uploadTable->item(iRow, iCol)->text() + ",";
1437 }
1438 }
1439 if (!hlp.isEmpty()) {
1440 uploadMountpointsOut << hlp;
1441 }
1442 }
1443
1444 bncSettings settings;
1445
1446 settings.setValue("adviseFail", _adviseFailSpinBox->value());
1447 settings.setValue("adviseReco", _adviseRecoSpinBox->value());
1448 settings.setValue("adviseScript",_adviseScriptLineEdit->text());
1449 settings.setValue("autoStart", _autoStartCheckBox->checkState());
1450 settings.setValue("binSampl", _binSamplSpinBox->value());
1451 settings.setValue("corrIntr", _corrIntrComboBox->currentText());
1452 settings.setValue("corrPath", _corrPathLineEdit->text());
1453 settings.setValue("corrPort", _corrPortLineEdit->text());
1454 settings.setValue("corrTime", _corrTimeSpinBox->value());
1455 settings.setValue("ephIntr", _ephIntrComboBox->currentText());
1456 settings.setValue("ephPath", _ephPathLineEdit->text());
1457 settings.setValue("ephV3", _ephV3CheckBox->checkState());
1458 settings.setValue("logFile", _logFileLineEdit->text());
1459 settings.setValue("rawOutFile", _rawOutFileLineEdit->text());
1460 settings.setValue("miscMount", _miscMountLineEdit->text());
1461 settings.setValue("pppMount", _pppMountLineEdit->text());
1462 settings.setValue("pppCorrMount",_pppCorrMountLineEdit->text());
1463 settings.setValue("pppSPP", _pppSPPComboBox->currentText());
1464 settings.setValue("nmeaFile", _pppNMEALineEdit->text());
1465 settings.setValue("nmeaPort", _pppNMEAPortLineEdit->text());
1466 settings.setValue("pppSigmaCode",_pppSigCLineEdit->text());
1467 settings.setValue("pppSigmaPhase",_pppSigPLineEdit->text());
1468 settings.setValue("pppSigCrd0",_pppSigCrd0->text());
1469 settings.setValue("pppSigCrdP",_pppSigCrdP->text());
1470 settings.setValue("pppSigTrp0",_pppSigTrp0->text());
1471 settings.setValue("pppSigTrpP",_pppSigTrpP->text());
1472 settings.setValue("pppAverage", _pppAverageLineEdit->text());
1473 settings.setValue("pppQuickStart", _pppQuickStartLineEdit->text());
1474 settings.setValue("pppMaxSolGap", _pppMaxSolGapLineEdit->text());
1475 settings.setValue("pppRefCrdX", _pppRefCrdXLineEdit->text());
1476 settings.setValue("pppRefCrdY", _pppRefCrdYLineEdit->text());
1477 settings.setValue("pppRefCrdZ", _pppRefCrdZLineEdit->text());
1478 settings.setValue("pppRefdN", _pppRefdNLineEdit->text());
1479 settings.setValue("pppRefdE", _pppRefdELineEdit->text());
1480 settings.setValue("pppRefdU", _pppRefdULineEdit->text());
1481 settings.setValue("pppSync", _pppSync->text());
1482 settings.setValue("pppUsePhase", _pppUsePhaseCheckBox->checkState());
1483 settings.setValue("pppPlotCoordinates", _pppPlotCoordinates->checkState());
1484 settings.setValue("pppEstTropo", _pppEstTropoCheckBox->checkState());
1485 settings.setValue("pppGLONASS", _pppGLONASSCheckBox->checkState());
1486 settings.setValue("pppGalileo", _pppGalileoCheckBox->checkState());
1487 settings.setValue("pppAntenna", _pppAntennaLineEdit->text());
1488 settings.setValue("pppAntex", _pppAntexLineEdit->text());
1489 settings.setValue("pppApplySatAnt", _pppApplySatAntCheckBox->checkState());
1490 settings.setValue("mountPoints", mountPoints);
1491 settings.setValue("obsRate", _obsRateComboBox->currentText());
1492 settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
1493 settings.setValue("outEphPort", _outEphPortLineEdit->text());
1494 settings.setValue("outFile", _outFileLineEdit->text());
1495 settings.setValue("outPort", _outPortLineEdit->text());
1496 settings.setValue("outUPort", _outUPortLineEdit->text());
1497 settings.setValue("perfIntr", _perfIntrComboBox->currentText());
1498 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1499 settings.setValue("proxyPort", _proxyPortLineEdit->text());
1500 settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
1501 settings.setValue("ignoreSslErrors", _ignoreSslErrorsCheckBox->checkState());
1502 settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
1503 settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
1504 settings.setValue("rnxPath", _rnxPathLineEdit->text());
1505 settings.setValue("rnxSampl", _rnxSamplSpinBox->value());
1506 settings.setValue("rnxScript", _rnxScrpLineEdit->text());
1507 settings.setValue("rnxSkel", _rnxSkelLineEdit->text());
1508 settings.setValue("rnxV3", _rnxV3CheckBox->checkState());
1509 settings.setValue("scanRTCM", _scanRTCMCheckBox->checkState());
1510 settings.setValue("serialFileNMEA",_serialFileNMEALineEdit->text());
1511 settings.setValue("serialHeightNMEA",_serialHeightNMEALineEdit->text());
1512 settings.setValue("serialAutoNMEA", _serialAutoNMEAComboBox->currentText());
1513 settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText());
1514 settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText());
1515 settings.setValue("serialMountPoint",_serialMountPointLineEdit->text());
1516 settings.setValue("serialParity", _serialParityComboBox->currentText());
1517 settings.setValue("serialPortName", _serialPortNameLineEdit->text());
1518 settings.setValue("serialStopBits", _serialStopBitsComboBox->currentText());
1519 settings.setValue("serialFlowControl",_serialFlowControlComboBox->currentText());
1520 settings.setValue("startTab", _aogroup->currentIndex());
1521 settings.setValue("statusTab", _loggroup->currentIndex());
1522 settings.setValue("waitTime", _waitTimeSpinBox->value());
1523 if (!combineStreams.isEmpty()) {
1524 settings.setValue("combineStreams", combineStreams);
1525 }
1526 else {
1527 settings.setValue("combineStreams", "");
1528 }
1529 settings.setValue("cmbMaxres", _cmbMaxresLineEdit->text());
1530 settings.setValue("cmbMethod", _cmbMethodComboBox->currentText());
1531
1532 if (!uploadMountpointsOut.isEmpty()) {
1533 settings.setValue("uploadMountpointsOut", uploadMountpointsOut);
1534 }
1535 else {
1536 settings.setValue("uploadMountpointsOut", "");
1537 }
1538 settings.setValue("uploadIntr", _uploadIntrComboBox->currentText());
1539 settings.setValue("uploadSampl", _uploadSamplSpinBox->value());
1540 settings.setValue("uploadSamplOrb", _uploadSamplOrbSpinBox->value());
1541
1542 settings.setValue("uploadEphHost", _uploadEphHostLineEdit->text());
1543 settings.setValue("uploadEphPort", _uploadEphPortLineEdit->text());
1544 settings.setValue("uploadEphPassword", _uploadEphPasswordLineEdit->text());
1545 settings.setValue("uploadEphMountpoint",_uploadEphMountpointLineEdit->text());
1546 settings.setValue("uploadEphSample", _uploadEphSampleSpinBox->value());
1547
1548 if (_caster) {
1549 _caster->slotReadMountPoints();
1550 }
1551 settings.sync();
1552}
1553
1554// All get slots terminated
1555////////////////////////////////////////////////////////////////////////////
1556void bncWindow::slotGetThreadsFinished() {
1557 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true);
1558 delete _caster; _caster = 0;
1559 delete _casterEph; _casterEph = 0;
1560 _actGetData->setEnabled(true);
1561 _actStop->setEnabled(false);
1562}
1563
1564// Retrieve Data
1565////////////////////////////////////////////////////////////////////////////
1566void bncWindow::slotGetData() {
1567 slotSaveOptions();
1568
1569 _bncFigurePPP->reset();
1570
1571 _actDeleteMountPoints->setEnabled(false);
1572 _actGetData->setEnabled(false);
1573 _actStop->setEnabled(true);
1574
1575 _caster = new bncCaster(_outFileLineEdit->text(),
1576 _outPortLineEdit->text().toInt());
1577
1578 ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());
1579 ((bncApp*)qApp)->setPortCorr(_corrPortLineEdit->text().toInt());
1580 ((bncApp*)qApp)->initCombination();
1581
1582 connect(_caster, SIGNAL(getThreadsFinished()),
1583 this, SLOT(slotGetThreadsFinished()));
1584
1585 connect (_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)),
1586 this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
1587
1588 ((bncApp*)qApp)->slotMessage("========== Start BNC v" BNCVERSION " =========", true);
1589
1590 bncSettings settings;
1591
1592 QDir rnxdir(settings.value("rnxPath").toString());
1593 if (!rnxdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations directory", true);
1594
1595 QString rnx_file = settings.value("rnxScript").toString();
1596 if ( !rnx_file.isEmpty() ) {
1597 QFile rnxfile(settings.value("rnxScript").toString());
1598 if (!rnxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations script", true);
1599 }
1600
1601 QDir ephdir(settings.value("ephPath").toString());
1602 if (!ephdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Ephemeris directory", true);
1603
1604 QDir corrdir(settings.value("corrPath").toString());
1605 if (!corrdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Broadcast Corrections directory", true);
1606
1607 QString advise_file = settings.value("adviseScript").toString();
1608 if ( !advise_file.isEmpty() ) {
1609 QFile advisefile(settings.value("adviseScript").toString());
1610 if (!advisefile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Outages script", true);
1611 }
1612
1613 QString ant_file = settings.value("pppAntex").toString();
1614 if ( !ant_file.isEmpty() ) {
1615 QFile anxfile(settings.value("pppAntex").toString());
1616 if (!anxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find IGS ANTEX file", true);
1617 }
1618
1619 _caster->slotReadMountPoints();
1620
1621 _casterEph = new bncEphUploadCaster();
1622 connect(_casterEph, SIGNAL(newBytes(QByteArray,double)),
1623 _uploadEphBytesCounter, SLOT(slotNewBytes(QByteArray,double)));
1624}
1625
1626// Retrieve Data
1627////////////////////////////////////////////////////////////////////////////
1628void bncWindow::slotStop() {
1629 int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
1630 QMessageBox::Yes, QMessageBox::No,
1631 QMessageBox::NoButton);
1632 if (iRet == QMessageBox::Yes) {
1633 ((bncApp*)qApp)->stopCombination();
1634 delete _caster; _caster = 0;
1635 delete _casterEph; _casterEph = 0;
1636 _actGetData->setEnabled(true);
1637 _actStop->setEnabled(false);
1638 }
1639}
1640
1641// Close Application gracefully
1642////////////////////////////////////////////////////////////////////////////
1643void bncWindow::closeEvent(QCloseEvent* event) {
1644
1645 int iRet = QMessageBox::question(this, "Close", "Save Options?",
1646 QMessageBox::Yes, QMessageBox::No,
1647 QMessageBox::Cancel);
1648
1649 if (iRet == QMessageBox::Cancel) {
1650 event->ignore();
1651 return;
1652 }
1653 else if (iRet == QMessageBox::Yes) {
1654 slotSaveOptions();
1655 }
1656
1657 QMainWindow::closeEvent(event);
1658}
1659
1660// User changed the selection of mountPoints
1661////////////////////////////////////////////////////////////////////////////
1662void bncWindow::slotSelectionChanged() {
1663 if (_mountPointsTable->selectedItems().isEmpty()) {
1664 _actDeleteMountPoints->setEnabled(false);
1665 }
1666 else {
1667 _actDeleteMountPoints->setEnabled(true);
1668 }
1669}
1670
1671// Display Program Messages
1672////////////////////////////////////////////////////////////////////////////
1673void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) {
1674
1675#ifdef DEBUG_RTCM2_2021
1676 const int maxBufferSize = 1000;
1677#else
1678 const int maxBufferSize = 10000;
1679#endif
1680
1681 if (! showOnScreen ) {
1682 return;
1683 }
1684
1685 QString txt = _log->toPlainText() + "\n" +
1686 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg;
1687 _log->clear();
1688 _log->append(txt.right(maxBufferSize));
1689}
1690
1691// About Message
1692////////////////////////////////////////////////////////////////////////////
1693void bncWindow::slotAbout() {
1694 new bncAboutDlg(0);
1695}
1696
1697//Flowchart
1698////////////////////////////////////////////////////////////////////////////
1699void bncWindow::slotFlowchart() {
1700 new bncFlowchartDlg(0);
1701}
1702
1703// Help Window
1704////////////////////////////////////////////////////////////////////////////
1705void bncWindow::slotHelp() {
1706 QUrl url;
1707 url.setPath(":bnchelp.html");
1708 new bncHlpDlg(0, url);
1709}
1710
1711// Select Fonts
1712////////////////////////////////////////////////////////////////////////////
1713void bncWindow::slotFontSel() {
1714 bool ok;
1715 QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
1716 if (ok) {
1717 bncSettings settings;
1718 settings.setValue("font", newFont.toString());
1719 QApplication::setFont(newFont);
1720 int ww = QFontMetrics(newFont).width('w');
1721 setMinimumSize(60*ww, 80*ww);
1722 resize(60*ww, 80*ww);
1723 }
1724}
1725
1726// Whats This Help
1727void bncWindow::slotWhatsThis() {
1728 QWhatsThis::enterWhatsThisMode();
1729}
1730
1731//
1732////////////////////////////////////////////////////////////////////////////
1733void bncWindow::slotMountPointsRead(QList<bncGetThread*> threads) {
1734 _bncFigure->updateMountPoints();
1735 _bncFigureLate->updateMountPoints();
1736
1737 populateMountPointsTable();
1738 bncSettings settings;
1739 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
1740 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
1741 QListIterator<bncGetThread*> iTh(threads);
1742 while (iTh.hasNext()) {
1743 bncGetThread* thread = iTh.next();
1744 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1745 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1746 "@" + _mountPointsTable->item(iRow, 1)->text() );
1747 if (url == thread->mountPoint() &&
1748 _mountPointsTable->item(iRow, 3)->text() == thread->latitude() &&
1749 _mountPointsTable->item(iRow, 4)->text() == thread->longitude() ) {
1750 ((bncTableItem*) _mountPointsTable->item(iRow, 7))->setGetThread(thread);
1751 disconnect(thread, SIGNAL(newBytes(QByteArray, double)),
1752 _bncFigure, SLOT(slotNewData(QByteArray, double)));
1753 connect(thread, SIGNAL(newBytes(QByteArray, double)),
1754 _bncFigure, SLOT(slotNewData(QByteArray, double)));
1755 disconnect(thread, SIGNAL(newLatency(QByteArray, double)),
1756 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
1757 connect(thread, SIGNAL(newLatency(QByteArray, double)),
1758 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
1759 if ( Qt::CheckState(settings.value("pppPlotCoordinates").toInt()) == Qt::Checked) {
1760 disconnect(thread,
1761 SIGNAL(newPosition(bncTime, double, double, double)),
1762 _bncFigurePPP,
1763 SLOT(slotNewPosition(bncTime, double, double, double)));
1764 connect(thread, SIGNAL(newPosition(bncTime, double, double, double)),
1765 _bncFigurePPP,
1766 SLOT(slotNewPosition(bncTime, double, double, double)));
1767 }
1768 break;
1769 }
1770 }
1771 }
1772}
1773
1774//
1775////////////////////////////////////////////////////////////////////////////
1776void bncWindow::CreateMenu() {
1777 // Create Menus
1778 // ------------
1779 _menuFile = menuBar()->addMenu(tr("&File"));
1780 _menuFile->addAction(_actFontSel);
1781 _menuFile->addSeparator();
1782 _menuFile->addAction(_actSaveOpt);
1783 _menuFile->addSeparator();
1784 _menuFile->addAction(_actQuit);
1785
1786 _menuHlp = menuBar()->addMenu(tr("&Help"));
1787 _menuHlp->addAction(_actHelp);
1788 _menuHlp->addAction(_actFlowchart);
1789 _menuHlp->addAction(_actAbout);
1790}
1791
1792// Toolbar
1793////////////////////////////////////////////////////////////////////////////
1794void bncWindow::AddToolbar() {
1795 // Tool (Command) Bar
1796 // ------------------
1797 QToolBar* toolBar = new QToolBar;
1798 addToolBar(Qt::BottomToolBarArea, toolBar);
1799 toolBar->setMovable(false);
1800 toolBar->addAction(_actAddMountPoints);
1801 toolBar->addAction(_actDeleteMountPoints);
1802 toolBar->addAction(_actGetData);
1803 toolBar->addAction(_actStop);
1804 toolBar->addAction(_actPostProcessing);
1805 _postProgressLabel = new QLabel(" Progress");
1806 toolBar->addWidget(_postProgressLabel);
1807 toolBar->addWidget(_postProgressBar);
1808 enableWidget(false, _postProgressLabel);
1809 enableWidget(false, _postProgressBar);
1810 toolBar->addWidget(new QLabel(" "));
1811 toolBar->addAction(_actwhatsthis);
1812}
1813
1814// About
1815////////////////////////////////////////////////////////////////////////////
1816bncAboutDlg::bncAboutDlg(QWidget* parent) :
1817 QDialog(parent) {
1818
1819 QTextBrowser* tb = new QTextBrowser;
1820 QUrl url; url.setPath(":bncabout.html");
1821 tb->setSource(url);
1822 tb->setReadOnly(true);
1823
1824 int ww = QFontMetrics(font()).width('w');
1825 QPushButton* _closeButton = new QPushButton("Close");
1826 _closeButton->setMaximumWidth(10*ww);
1827 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1828
1829 QGridLayout* dlgLayout = new QGridLayout();
1830 QLabel* img = new QLabel();
1831 img->setPixmap(QPixmap(":ntrip-logo.png"));
1832 dlgLayout->addWidget(img, 0,0);
1833 dlgLayout->addWidget(new QLabel("BKG Ntrip Client (BNC) Version "BNCVERSION), 0,1);
1834 dlgLayout->addWidget(tb,1,0,1,2);
1835 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);
1836
1837 setLayout(dlgLayout);
1838 resize(60*ww, 60*ww);
1839 setWindowTitle("About BNC");
1840 show();
1841}
1842
1843//
1844////////////////////////////////////////////////////////////////////////////
1845bncAboutDlg::~bncAboutDlg() {
1846};
1847
1848// Flowchart
1849////////////////////////////////////////////////////////////////////////////
1850bncFlowchartDlg::bncFlowchartDlg(QWidget* parent) :
1851 QDialog(parent) {
1852
1853 int ww = QFontMetrics(font()).width('w');
1854 QPushButton* _closeButton = new QPushButton("Close");
1855 _closeButton->setMaximumWidth(10*ww);
1856 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1857
1858 QGridLayout* dlgLayout = new QGridLayout();
1859 QLabel* img = new QLabel();
1860 img->setPixmap(QPixmap(":bncflowchart.png"));
1861 dlgLayout->addWidget(img, 0,0);
1862 dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
1863
1864 setLayout(dlgLayout);
1865 setWindowTitle("Flow Chart");
1866 show();
1867}
1868
1869//
1870////////////////////////////////////////////////////////////////////////////
1871bncFlowchartDlg::~bncFlowchartDlg() {
1872};
1873
1874// Enable/Disable Widget (and change its color)
1875////////////////////////////////////////////////////////////////////////////
1876void bncWindow::enableWidget(bool enable, QWidget* widget) {
1877 const static QPalette paletteWhite(QColor(255, 255, 255));
1878 const static QPalette paletteGray(QColor(230, 230, 230));
1879
1880 widget->setEnabled(enable);
1881 if (enable) {
1882 widget->setPalette(paletteWhite);
1883 }
1884 else {
1885 widget->setPalette(paletteGray);
1886 }
1887}
1888
1889// Bnc Text
1890////////////////////////////////////////////////////////////////////////////
1891void bncWindow::slotBncTextChanged(){
1892
1893 bool enable = true;
1894
1895 // Proxy
1896 //------
1897 if (sender() == 0 || sender() == _proxyHostLineEdit) {
1898 enable = !_proxyHostLineEdit->text().isEmpty();
1899 enableWidget(enable, _proxyPortLineEdit);
1900 }
1901
1902 // RINEX Observations
1903 // ------------------
1904 if (sender() == 0 || sender() == _rnxPathLineEdit) {
1905 enable = !_rnxPathLineEdit->text().isEmpty();
1906 enableWidget(enable, _rnxSamplSpinBox);
1907 enableWidget(enable, _rnxSkelLineEdit);
1908 enableWidget(enable, _rnxScrpLineEdit);
1909 enableWidget(enable, _rnxV3CheckBox);
1910 enableWidget(enable, _rnxIntrComboBox);
1911 }
1912
1913 // RINEX Ephemeris
1914 // ---------------
1915 if (sender() == 0 || sender() == _ephPathLineEdit || sender() == _outEphPortLineEdit) {
1916 enable = !_ephPathLineEdit->text().isEmpty() || !_outEphPortLineEdit->text().isEmpty();
1917 enableWidget(enable, _ephIntrComboBox);
1918 enableWidget(enable, _ephV3CheckBox);
1919 }
1920
1921 // Broadcast Corrections
1922 // ---------------------
1923 if (sender() == 0 || sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) {
1924 enable = !_corrPathLineEdit->text().isEmpty() || !_corrPortLineEdit->text().isEmpty();
1925 enableWidget(enable, _corrIntrComboBox);
1926 }
1927
1928 // Feed Engine
1929 // -----------
1930 if (sender() == 0 || sender() == _outPortLineEdit || sender() == _outFileLineEdit) {
1931 enable = !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty();
1932 enableWidget(enable, _waitTimeSpinBox);
1933 enableWidget(enable, _binSamplSpinBox);
1934 }
1935
1936 // Serial Output
1937 // -------------
1938 if (sender() == 0 || sender() == _serialMountPointLineEdit ||
1939 sender() == _serialAutoNMEAComboBox) {
1940 enable = !_serialMountPointLineEdit->text().isEmpty();
1941 enableWidget(enable, _serialPortNameLineEdit);
1942 enableWidget(enable, _serialBaudRateComboBox);
1943 enableWidget(enable, _serialParityComboBox);
1944 enableWidget(enable, _serialDataBitsComboBox);
1945 enableWidget(enable, _serialStopBitsComboBox);
1946 enableWidget(enable, _serialFlowControlComboBox);
1947 enableWidget(enable, _serialAutoNMEAComboBox);
1948
1949 bool enable2 = enable && _serialAutoNMEAComboBox->currentText() != "Auto";
1950 enableWidget(enable2, _serialFileNMEALineEdit);
1951 }
1952
1953 // Outages
1954 // -------
1955 if (sender() == 0 || sender() == _obsRateComboBox) {
1956 enable = !_obsRateComboBox->currentText().isEmpty();
1957 enableWidget(enable, _adviseFailSpinBox);
1958 enableWidget(enable, _adviseRecoSpinBox);
1959 enableWidget(enable, _adviseScriptLineEdit);
1960 }
1961
1962 // Miscellaneous
1963 // -------------
1964 if (sender() == 0 || sender() == _miscMountLineEdit) {
1965 enable = !_miscMountLineEdit->text().isEmpty();
1966 enableWidget(enable, _perfIntrComboBox);
1967 enableWidget(enable, _scanRTCMCheckBox);
1968 }
1969
1970 // PPP Client
1971 // ----------
1972 if (sender() == 0
1973 || sender() == _pppMountLineEdit
1974 || sender() == _pppCorrMountLineEdit
1975 || sender() == _pppRefCrdXLineEdit
1976 || sender() == _pppRefCrdYLineEdit
1977 || sender() == _pppRefCrdZLineEdit
1978 || sender() == _pppRefdNLineEdit
1979 || sender() == _pppRefdELineEdit
1980 || sender() == _pppRefdULineEdit
1981 || sender() == _pppSync
1982 || sender() == _pppSPPComboBox
1983 || sender() == _pppQuickStartLineEdit
1984 || sender() == _pppEstTropoCheckBox
1985 || sender() == _pppUsePhaseCheckBox
1986 || sender() == _pppAntexLineEdit ) {
1987
1988 enable = (!_pppMountLineEdit->text().isEmpty() && !_pppCorrMountLineEdit->text().isEmpty()) ||
1989 (!_pppMountLineEdit->text().isEmpty() && _pppSPPComboBox->currentText() == "SPP") ||
1990 (_pppSPPComboBox->currentText() == "Post-Processing");
1991
1992 enableWidget(enable, _pppNMEALineEdit);
1993 enableWidget(enable, _pppNMEAPortLineEdit);
1994 enableWidget(enable, _pppRefCrdXLineEdit);
1995 enableWidget(enable, _pppRefCrdYLineEdit);
1996 enableWidget(enable, _pppRefCrdZLineEdit);
1997 enableWidget(enable, _pppRefdNLineEdit);
1998 enableWidget(enable, _pppRefdELineEdit);
1999 enableWidget(enable, _pppRefdULineEdit);
2000 enableWidget(enable, _pppUsePhaseCheckBox);
2001 enableWidget(enable, _pppPlotCoordinates);
2002 enableWidget(enable, _pppEstTropoCheckBox);
2003 enableWidget(enable, _pppGLONASSCheckBox);
2004 enableWidget(enable, _pppGalileoCheckBox);
2005 enableWidget(enable, _pppAntexLineEdit);
2006 enableWidget(enable, _pppSigCLineEdit);
2007 enableWidget(enable, _pppSigCrd0);
2008 enableWidget(enable, _pppSigCrdP);
2009
2010 bool enable2 = enable && !_pppRefCrdXLineEdit->text().isEmpty() &&
2011 !_pppRefCrdYLineEdit->text().isEmpty() &&
2012 !_pppRefCrdZLineEdit->text().isEmpty();
2013
2014 enableWidget(enable2, _pppAverageLineEdit);
2015 enableWidget(enable2, _pppQuickStartLineEdit);
2016
2017 bool enable3 = enable2 && !_pppQuickStartLineEdit->text().isEmpty();
2018 enableWidget(enable3, _pppMaxSolGapLineEdit);
2019
2020 bool enable4 = enable && !_pppAntexLineEdit->text().isEmpty();
2021 enableWidget(enable4, _pppAntennaLineEdit);
2022 enableWidget(enable4, _pppApplySatAntCheckBox);
2023
2024 bool enable5 = enable && _pppEstTropoCheckBox->isChecked() && !_pppMountLineEdit->text().isEmpty();
2025 enableWidget(enable5, _pppSigTrp0);
2026 enableWidget(enable5, _pppSigTrpP);
2027
2028 bool enable6 = enable && _pppUsePhaseCheckBox->isChecked();
2029 enableWidget(enable6, _pppSigPLineEdit);
2030
2031 bool enable7 = enable && _pppSPPComboBox->currentText() == "PPP";
2032 enableWidget(enable7, _pppSync);
2033 enableWidget(enable7, _pppCorrMountLineEdit);
2034
2035 bool enable8 = _pppSPPComboBox->currentText() == "Post-Processing";
2036 enableWidget(enable8, _postObsFileChooser);
2037 enableWidget(enable8, _postNavFileChooser);
2038 enableWidget(enable8, _postCorrFileChooser);
2039 _actPostProcessing->setEnabled(enable8);
2040
2041 enableWidget(!enable8, _pppMountLineEdit);
2042 }
2043}
2044
2045//
2046////////////////////////////////////////////////////////////////////////////
2047void bncWindow::slotAddCmbRow() {
2048 int iRow = _cmbTable->rowCount();
2049 _cmbTable->insertRow(iRow);
2050 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
2051 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
2052 }
2053}
2054
2055//
2056////////////////////////////////////////////////////////////////////////////
2057void bncWindow::slotDelCmbRow() {
2058 int nRows = _cmbTable->rowCount();
2059 bool flg[nRows];
2060 for (int iRow = 0; iRow < nRows; iRow++) {
2061 if (_cmbTable->isItemSelected(_cmbTable->item(iRow,1))) {
2062 flg[iRow] = true;
2063 }
2064 else {
2065 flg[iRow] = false;
2066 }
2067 }
2068 for (int iRow = nRows-1; iRow >= 0; iRow--) {
2069 if (flg[iRow]) {
2070 _cmbTable->removeRow(iRow);
2071 }
2072 }
2073}
2074
2075//
2076////////////////////////////////////////////////////////////////////////////
2077void bncWindow::populateCmbTable() {
2078
2079 for (int iRow = _cmbTable->rowCount()-1; iRow >=0; iRow--) {
2080 _cmbTable->removeRow(iRow);
2081 }
2082
2083 bncSettings settings;
2084
2085 int iRow = -1;
2086 QListIterator<QString> it(settings.value("combineStreams").toStringList());
2087 while (it.hasNext()) {
2088 QStringList hlp = it.next().split(" ");
2089 if (hlp.size() > 2) {
2090 ++iRow;
2091 _cmbTable->insertRow(iRow);
2092 }
2093 for (int iCol = 0; iCol < hlp.size(); iCol++) {
2094 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
2095 }
2096 }
2097}
2098
2099//
2100////////////////////////////////////////////////////////////////////////////
2101void bncWindow::slotAddUploadRow() {
2102 int iRow = _uploadTable->rowCount();
2103 _uploadTable->insertRow(iRow);
2104 for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
2105 if (iCol == 3) {
2106 QLineEdit* passwd = new QLineEdit();
2107 passwd->setFrame(false);
2108 passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
2109 _uploadTable->setCellWidget(iRow, iCol, passwd);
2110 }
2111 else if (iCol == 4) {
2112 QComboBox* system = new QComboBox();
2113 system->setEditable(false);
2114 system->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS95,SIRGAS2000,Custom").split(","));
2115 system->setFrame(false);
2116 _uploadTable->setCellWidget(iRow, iCol, system);
2117 }
2118 else if (iCol == 5) {
2119 QCheckBox* com = new QCheckBox();
2120 _uploadTable->setCellWidget(iRow, iCol, com);
2121 }
2122 else if (iCol == 8) {
2123 bncTableItem* bncIt = new bncTableItem();
2124 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
2125 _uploadTable->setItem(iRow, iCol, bncIt);
2126 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
2127 }
2128 else {
2129 _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(""));
2130 }
2131 }
2132}
2133
2134//
2135////////////////////////////////////////////////////////////////////////////
2136void bncWindow::slotDelUploadRow() {
2137 ((bncApp*)qApp)->_uploadTableItems.clear();
2138 int nRows = _uploadTable->rowCount();
2139 bool flg[nRows];
2140 for (int iRow = 0; iRow < nRows; iRow++) {
2141 if (_uploadTable->isItemSelected(_uploadTable->item(iRow,1))) {
2142 flg[iRow] = true;
2143 }
2144 else {
2145 flg[iRow] = false;
2146 }
2147 }
2148 for (int iRow = nRows-1; iRow >= 0; iRow--) {
2149 if (flg[iRow]) {
2150 _uploadTable->removeRow(iRow);
2151 }
2152 }
2153 for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
2154 ((bncApp*)qApp)->_uploadTableItems[iRow] =
2155 (bncTableItem*) _uploadTable->item(iRow, 8);
2156 }
2157}
2158
2159//
2160////////////////////////////////////////////////////////////////////////////
2161void bncWindow::populateUploadTable() {
2162 for (int iRow = _uploadTable->rowCount()-1; iRow >=0; iRow--) {
2163 _uploadTable->removeRow(iRow);
2164 }
2165
2166 bncSettings settings;
2167
2168 int iRow = -1;
2169 QListIterator<QString> it(settings.value("uploadMountpointsOut").toStringList());
2170 while (it.hasNext()) {
2171 QStringList hlp = it.next().split(",");
2172 if (hlp.size() > 6) {
2173 ++iRow;
2174 _uploadTable->insertRow(iRow);
2175 }
2176 for (int iCol = 0; iCol < hlp.size(); iCol++) {
2177 if (iCol == 3) {
2178 QLineEdit* passwd = new QLineEdit();
2179 passwd->setFrame(false);
2180 passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
2181 passwd->setText(hlp[iCol]);
2182 _uploadTable->setCellWidget(iRow, iCol, passwd);
2183 }
2184 else if (iCol == 4) {
2185 QComboBox* system = new QComboBox();
2186 system->setEditable(false);
2187 system->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS95,SIRGAS2000,Custom").split(","));
2188 system->setFrame(false);
2189 system->setCurrentIndex(system->findText(hlp[iCol]));
2190 _uploadTable->setCellWidget(iRow, iCol, system);
2191 }
2192 else if (iCol == 5) {
2193 QCheckBox* com = new QCheckBox();
2194 if (hlp[iCol].toInt() == Qt::Checked) {
2195 com->setCheckState(Qt::Checked);
2196 }
2197 _uploadTable->setCellWidget(iRow, iCol, com);
2198 }
2199 else if (iCol == 8) {
2200 bncTableItem* bncIt = new bncTableItem();
2201 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
2202 _uploadTable->setItem(iRow, iCol, bncIt);
2203 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
2204 }
2205 else {
2206 _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
2207 }
2208 }
2209 }
2210}
2211
2212//
2213////////////////////////////////////////////////////////////////////////////
2214void bncWindow::slotSetUploadTrafo() {
2215 bncCustomTrafo* dlg = new bncCustomTrafo(this);
2216 dlg->exec();
2217 delete dlg;
2218}
2219
2220// Post-Processing
2221////////////////////////////////////////////////////////////////////////////
2222void bncWindow::slotPostProcessing() {
2223 _actPostProcessing->setEnabled(false);
2224 slotSaveOptions();
2225 _postProgressBar->reset();
2226 enableWidget(true, _postProgressLabel);
2227 enableWidget(true, _postProgressBar);
2228 //// beg test
2229 for (int ii = 0; ii <= 100; ii += 20) {
2230 _postProgressBar->setValue(ii);
2231 sleep(1);
2232 }
2233 //// end test
2234 enableWidget(false, _postProgressLabel);
2235 enableWidget(false, _postProgressBar);
2236 _postProgressBar->reset();
2237 _actPostProcessing->setEnabled(true);
2238}
Note: See TracBrowser for help on using the repository browser.