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

Last change on this file since 3729 was 3729, checked in by weber, 12 years ago

Design update.

File size: 118.7 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#ifdef USE_POSTPROCESSING
65# include "rinex/bncpostprocess.h"
66#endif
67
68using namespace std;
69
70// Constructor
71////////////////////////////////////////////////////////////////////////////
72bncWindow::bncWindow() {
73
74 _caster = 0;
75 _casterEph = 0;
76
77 _bncFigure = new bncFigure(this);
78 _bncFigureLate = new bncFigureLate(this);
79 _bncFigurePPP = new bncFigurePPP(this);
80
81 int ww = QFontMetrics(this->font()).width('w');
82
83 static const QStringList labels = QString("account, Streams: resource loader / mountpoint, decoder, lat, long, nmea, ntrip, bytes").split(",");
84
85 setMinimumSize(85*ww, 65*ww);
86
87 setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION));
88
89 connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)),
90 this, SLOT(slotWindowMessage(QByteArray,bool)));
91
92 // Create Actions
93 // --------------
94 _actHelp = new QAction(tr("&Help Contents"),this);
95 connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
96
97 _actAbout = new QAction(tr("&About BNC"),this);
98 connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
99
100 _actFlowchart = new QAction(tr("&Flow Chart"),this);
101 connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
102
103 _actFontSel = new QAction(tr("Select &Font"),this);
104 connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
105
106 _actSaveOpt = new QAction(tr("&Save && Reread Configuration"),this);
107 connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
108
109 _actQuit = new QAction(tr("&Quit"),this);
110 connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
111
112 _actAddMountPoints = new QAction(tr("Add &Stream"),this);
113 connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
114
115 _actDeleteMountPoints = new QAction(tr("&Delete Stream"),this);
116 connect(_actDeleteMountPoints, SIGNAL(triggered()), SLOT(slotDeleteMountPoints()));
117 _actDeleteMountPoints->setEnabled(false);
118
119 _actGetData = new QAction(tr("Sta&rt"),this);
120 connect(_actGetData, SIGNAL(triggered()), SLOT(slotGetData()));
121
122 _actPostProcessing = new QAction(tr("Start Post-Processing"),this);
123 connect(_actPostProcessing, SIGNAL(triggered()), SLOT(slotStartPostProcessing()));
124
125 _actStop = new QAction(tr("Sto&p"),this);
126 connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
127 _actStop->setEnabled(false);
128
129 _actwhatsthis= new QAction(tr("Help ?=Shift+F1"),this);
130 connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
131
132 CreateMenu();
133 AddToolbar();
134
135 bncSettings settings;
136
137 // Netowrk Options
138 // ---------------
139 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
140 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
141
142 connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString &)),
143 this, SLOT(slotBncTextChanged()));
144
145 _sslCaCertPathLineEdit = new QLineEdit(settings.value("sslCaCertPath").toString());
146 _ignoreSslErrorsCheckBox = new QCheckBox();
147 _ignoreSslErrorsCheckBox->setCheckState(Qt::CheckState(
148 settings.value("ignoreSslErrors").toInt()));
149
150 // General Options
151 // ---------------
152 _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
153 _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString());
154 _rnxAppendCheckBox = new QCheckBox();
155 _rnxAppendCheckBox->setCheckState(Qt::CheckState(
156 settings.value("rnxAppend").toInt()));
157 _onTheFlyComboBox = new QComboBox();
158 _onTheFlyComboBox->setEditable(false);
159 _onTheFlyComboBox->addItems(QString("1 day,1 hour,1 min").split(","));
160 int ii = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
161 if (ii != -1) {
162 _onTheFlyComboBox->setCurrentIndex(ii);
163 }
164 _autoStartCheckBox = new QCheckBox();
165 _autoStartCheckBox->setCheckState(Qt::CheckState(
166 settings.value("autoStart").toInt()));
167
168 // RINEX Observations Options
169 // --------------------------
170 _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
171 _rnxIntrComboBox = new QComboBox();
172 _rnxIntrComboBox->setEditable(false);
173 _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
174 ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
175 if (ii != -1) {
176 _rnxIntrComboBox->setCurrentIndex(ii);
177 }
178 _rnxSamplSpinBox = new QSpinBox();
179 _rnxSamplSpinBox->setMinimum(0);
180 _rnxSamplSpinBox->setMaximum(60);
181 _rnxSamplSpinBox->setSingleStep(5);
182 _rnxSamplSpinBox->setValue(settings.value("rnxSampl").toInt());
183 _rnxSamplSpinBox->setSuffix(" sec");
184 _rnxSkelLineEdit = new QLineEdit(settings.value("rnxSkel").toString());
185 _rnxSkelLineEdit->setMaximumWidth(5*ww);
186 _rnxScrpLineEdit = new QLineEdit(settings.value("rnxScript").toString());
187 _rnxV3CheckBox = new QCheckBox();
188 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt()));
189
190 connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString &)),
191 this, SLOT(slotBncTextChanged()));
192
193 // RINEX Ephemeris Options
194 // -----------------------
195 _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
196 _ephIntrComboBox = new QComboBox();
197 _ephIntrComboBox->setEditable(false);
198 _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
199 int jj = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
200 if (jj != -1) {
201 _ephIntrComboBox->setCurrentIndex(jj);
202 }
203 _outEphPortLineEdit = new QLineEdit(settings.value("outEphPort").toString());
204 _ephV3CheckBox = new QCheckBox();
205 _ephV3CheckBox->setCheckState(Qt::CheckState(settings.value("ephV3").toInt()));
206
207 connect(_outEphPortLineEdit, SIGNAL(textChanged(const QString &)),
208 this, SLOT(slotBncTextChanged()));
209
210 connect(_ephPathLineEdit, SIGNAL(textChanged(const QString &)),
211 this, SLOT(slotBncTextChanged()));
212
213 // Broadcast Corrections Options
214 // -----------------------------
215 _corrPathLineEdit = new QLineEdit(settings.value("corrPath").toString());
216 _corrIntrComboBox = new QComboBox();
217 _corrIntrComboBox->setEditable(false);
218 _corrIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
219 int mm = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
220 if (mm != -1) {
221 _corrIntrComboBox->setCurrentIndex(mm);
222 }
223 _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
224 _corrTimeSpinBox = new QSpinBox();
225 _corrTimeSpinBox->setMinimum(0);
226 _corrTimeSpinBox->setMaximum(60);
227 _corrTimeSpinBox->setSingleStep(1);
228 _corrTimeSpinBox->setSuffix(" sec");
229 _corrTimeSpinBox->setValue(settings.value("corrTime").toInt());
230
231 connect(_corrPathLineEdit, SIGNAL(textChanged(const QString &)),
232 this, SLOT(slotBncTextChanged()));
233
234 connect(_corrPortLineEdit, SIGNAL(textChanged(const QString &)),
235 this, SLOT(slotBncTextChanged()));
236
237 // Feed Engine Options
238 // -------------------
239 _outPortLineEdit = new QLineEdit(settings.value("outPort").toString());
240 _waitTimeSpinBox = new QSpinBox();
241 _waitTimeSpinBox->setMinimum(1);
242 _waitTimeSpinBox->setMaximum(30);
243 _waitTimeSpinBox->setSingleStep(1);
244 _waitTimeSpinBox->setSuffix(" sec");
245 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
246 _binSamplSpinBox = new QSpinBox();
247 _binSamplSpinBox->setMinimum(0);
248 _binSamplSpinBox->setMaximum(60);
249 _binSamplSpinBox->setSingleStep(5);
250 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
251 _binSamplSpinBox->setSuffix(" sec");
252 _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
253 _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
254
255 connect(_outPortLineEdit, SIGNAL(textChanged(const QString &)),
256 this, SLOT(slotBncTextChanged()));
257
258 connect(_outFileLineEdit, SIGNAL(textChanged(const QString &)),
259 this, SLOT(slotBncTextChanged()));
260
261 // Serial Output Options
262 // ---------------------
263 _serialMountPointLineEdit = new QLineEdit(settings.value("serialMountPoint").toString());
264 _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
265 _serialBaudRateComboBox = new QComboBox();
266 _serialBaudRateComboBox->addItems(QString("110,300,600,"
267 "1200,2400,4800,9600,19200,38400,57600,115200").split(","));
268 int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
269 if (kk != -1) {
270 _serialBaudRateComboBox->setCurrentIndex(kk);
271 }
272 _serialFlowControlComboBox = new QComboBox();
273 _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(","));
274 kk = _serialFlowControlComboBox->findText(settings.value("serialFlowControl").toString());
275 if (kk != -1) {
276 _serialFlowControlComboBox->setCurrentIndex(kk);
277 }
278 _serialDataBitsComboBox = new QComboBox();
279 _serialDataBitsComboBox->addItems(QString("5,6,7,8").split(","));
280 kk = _serialDataBitsComboBox->findText(settings.value("serialDataBits").toString());
281 if (kk != -1) {
282 _serialDataBitsComboBox->setCurrentIndex(kk);
283 }
284 _serialParityComboBox = new QComboBox();
285 _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(","));
286 kk = _serialParityComboBox->findText(settings.value("serialParity").toString());
287 if (kk != -1) {
288 _serialParityComboBox->setCurrentIndex(kk);
289 }
290 _serialStopBitsComboBox = new QComboBox();
291 _serialStopBitsComboBox->addItems(QString("1,2").split(","));
292 kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString());
293 if (kk != -1) {
294 _serialStopBitsComboBox->setCurrentIndex(kk);
295 }
296 _serialAutoNMEAComboBox = new QComboBox();
297 _serialAutoNMEAComboBox->addItems(QString("Auto,Manual").split(","));
298 kk = _serialAutoNMEAComboBox->findText(settings.value("serialAutoNMEA").toString());
299 if (kk != -1) {
300 _serialAutoNMEAComboBox->setCurrentIndex(kk);
301 }
302 _serialFileNMEALineEdit = new QLineEdit(settings.value("serialFileNMEA").toString());
303 _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString());
304
305 connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString &)),
306 this, SLOT(slotBncTextChanged()));
307
308 connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString &)),
309 this, SLOT(slotBncTextChanged()));
310
311 // Outages Options
312 // ---------------
313 _obsRateComboBox = new QComboBox();
314 _obsRateComboBox->setEditable(false);
315 _obsRateComboBox->addItems(QString(",0.1 Hz,0.2 Hz,0.5 Hz,1 Hz,5 Hz").split(","));
316 kk = _obsRateComboBox->findText(settings.value("obsRate").toString());
317 if (kk != -1) {
318 _obsRateComboBox->setCurrentIndex(kk);
319 }
320 _adviseFailSpinBox = new QSpinBox();
321 _adviseFailSpinBox->setMinimum(0);
322 _adviseFailSpinBox->setMaximum(60);
323 _adviseFailSpinBox->setSingleStep(1);
324 _adviseFailSpinBox->setSuffix(" min");
325 _adviseFailSpinBox->setValue(settings.value("adviseFail").toInt());
326 _adviseRecoSpinBox = new QSpinBox();
327 _adviseRecoSpinBox->setMinimum(0);
328 _adviseRecoSpinBox->setMaximum(60);
329 _adviseRecoSpinBox->setSingleStep(1);
330 _adviseRecoSpinBox->setSuffix(" min");
331 _adviseRecoSpinBox->setValue(settings.value("adviseReco").toInt());
332 _adviseScriptLineEdit = new QLineEdit(settings.value("adviseScript").toString());
333
334 connect(_obsRateComboBox, SIGNAL(currentIndexChanged(const QString &)),
335 this, SLOT(slotBncTextChanged()));
336
337 // Miscellaneous Options
338 // ---------------------
339 _miscMountLineEdit = new QLineEdit(settings.value("miscMount").toString());
340 _perfIntrComboBox = new QComboBox();
341 _perfIntrComboBox->setEditable(false);
342 _perfIntrComboBox->addItems(QString(",2 sec, 10 sec,1 min,5 min,15 min,1 hour,6 hours,1 day").split(","));
343 int ll = _perfIntrComboBox->findText(settings.value("perfIntr").toString());
344 if (ll != -1) {
345 _perfIntrComboBox->setCurrentIndex(ll);
346 }
347 _scanRTCMCheckBox = new QCheckBox();
348 _scanRTCMCheckBox->setCheckState(Qt::CheckState(
349 settings.value("scanRTCM").toInt()));
350
351 connect(_miscMountLineEdit, SIGNAL(textChanged(const QString &)),
352 this, SLOT(slotBncTextChanged()));
353
354 // PPP Options
355 // -----------
356 _pppMountLineEdit = new QLineEdit(settings.value("pppMount").toString());
357 _pppMountLineEdit->setMaximumWidth(8*ww);
358 _pppCorrMountLineEdit = new QLineEdit(settings.value("pppCorrMount").toString());
359 _pppCorrMountLineEdit->setMaximumWidth(8*ww);
360 _pppNMEALineEdit = new QLineEdit(settings.value("nmeaFile").toString());
361 _pppNMEAPortLineEdit = new QLineEdit(settings.value("nmeaPort").toString());
362 _pppSigCLineEdit = new QLineEdit(settings.value("pppSigmaCode").toString());
363 _pppSigPLineEdit = new QLineEdit(settings.value("pppSigmaPhase").toString());
364 _pppSigCrd0 = new QLineEdit(settings.value("pppSigCrd0").toString());
365 _pppSigCrdP = new QLineEdit(settings.value("pppSigCrdP").toString());
366 _pppSigTrp0 = new QLineEdit(settings.value("pppSigTrp0").toString());
367 _pppSigTrpP = new QLineEdit(settings.value("pppSigTrpP").toString());
368 _pppAverageLineEdit = new QLineEdit(settings.value("pppAverage").toString());
369 _pppQuickStartLineEdit = new QLineEdit(settings.value("pppQuickStart").toString());
370 _pppMaxSolGapLineEdit = new QLineEdit(settings.value("pppMaxSolGap").toString());
371 _pppRefCrdXLineEdit = new QLineEdit(settings.value("pppRefCrdX").toString());
372 _pppRefCrdYLineEdit = new QLineEdit(settings.value("pppRefCrdY").toString());
373 _pppRefCrdZLineEdit = new QLineEdit(settings.value("pppRefCrdZ").toString());
374 _pppRefdNLineEdit = new QLineEdit(settings.value("pppRefdN").toString());
375 _pppRefdELineEdit = new QLineEdit(settings.value("pppRefdE").toString());
376 _pppRefdULineEdit = new QLineEdit(settings.value("pppRefdU").toString());
377 _pppSync = new QLineEdit(settings.value("pppSync").toString());
378 _pppAntexFileChooser = new qtFileChooser;
379 _pppAntexFileChooser->setMinimumWidth(12*ww);
380 _pppAntennaLineEdit = new QLineEdit(settings.value("pppAntenna").toString());
381 _pppAntennaLineEdit->setMinimumWidth(14*ww);
382 _pppAntexFileChooser->setFileName(settings.value("pppAntex").toString());
383
384
385 _pppSPPComboBox = new QComboBox();
386 _pppSPPComboBox->setEditable(false);
387 _pppSPPComboBox->addItems(QString("PPP,SPP").split(","));
388 int ik = _pppSPPComboBox->findText(settings.value("pppSPP").toString());
389 if (ik != -1) {
390 _pppSPPComboBox->setCurrentIndex(ik);
391 }
392 _pppUsePhaseCheckBox = new QCheckBox();
393 _pppUsePhaseCheckBox->setCheckState(Qt::CheckState(
394 settings.value("pppUsePhase").toInt()));
395 _pppEstTropoCheckBox = new QCheckBox();
396 _pppEstTropoCheckBox->setCheckState(Qt::CheckState(
397 settings.value("pppEstTropo").toInt()));
398 _pppGLONASSCheckBox = new QCheckBox();
399 _pppGLONASSCheckBox->setCheckState(Qt::CheckState(
400 settings.value("pppGLONASS").toInt()));
401 _pppGalileoCheckBox = new QCheckBox();
402 _pppGalileoCheckBox->setCheckState(Qt::CheckState(
403 settings.value("pppGalileo").toInt()));
404
405 _pppPlotCoordinates = new QCheckBox();
406 _pppPlotCoordinates->setCheckState(Qt::CheckState(
407 settings.value("pppPlotCoordinates").toInt()));
408
409 _pppApplySatAntCheckBox = new QCheckBox();
410 _pppApplySatAntCheckBox->setCheckState(Qt::CheckState(
411 settings.value("pppApplySatAnt").toInt()));
412
413 connect(_pppMountLineEdit, SIGNAL(textChanged(const QString &)),
414 this, SLOT(slotBncTextChanged()));
415
416 connect(_pppCorrMountLineEdit, SIGNAL(textChanged(const QString &)),
417 this, SLOT(slotBncTextChanged()));
418
419 connect(_pppUsePhaseCheckBox, SIGNAL(stateChanged(int)),
420 this, SLOT(slotBncTextChanged()));
421
422 connect(_pppRefCrdXLineEdit, SIGNAL(textChanged(const QString &)),
423 this, SLOT(slotBncTextChanged()));
424 connect(_pppRefCrdYLineEdit, SIGNAL(textChanged(const QString &)),
425 this, SLOT(slotBncTextChanged()));
426 connect(_pppRefCrdZLineEdit, SIGNAL(textChanged(const QString &)),
427 this, SLOT(slotBncTextChanged()));
428 connect(_pppRefdNLineEdit, SIGNAL(textChanged(const QString &)),
429 this, SLOT(slotBncTextChanged()));
430 connect(_pppRefdELineEdit, SIGNAL(textChanged(const QString &)),
431 this, SLOT(slotBncTextChanged()));
432 connect(_pppRefdULineEdit, SIGNAL(textChanged(const QString &)),
433 this, SLOT(slotBncTextChanged()));
434
435 connect(_pppEstTropoCheckBox, SIGNAL(stateChanged(int)),
436 this, SLOT(slotBncTextChanged()));
437
438 connect(_pppSync, SIGNAL(textChanged(const QString &)),
439 this, SLOT(slotBncTextChanged()));
440
441 connect(_pppSPPComboBox, SIGNAL(currentIndexChanged(const QString &)),
442 this, SLOT(slotBncTextChanged()));
443
444 connect(_pppAntexFileChooser, SIGNAL(fileNameChanged(const QString &)),
445 this, SLOT(slotBncTextChanged()));
446
447 connect(_pppQuickStartLineEdit, SIGNAL(textChanged(const QString &)),
448 this, SLOT(slotBncTextChanged()));
449
450 // Post Processing
451 // ---------------
452 _postProcComboBox = new QComboBox();
453 _postProcComboBox->setEditable(false);
454 _postProcComboBox->addItems(QString(",PPP").split(","));
455 int in = _postProcComboBox->findText(settings.value("postProc").toString());
456 if (in != -1) {
457 _postProcComboBox->setCurrentIndex(in);
458 }
459
460 connect(_postProcComboBox, SIGNAL(currentIndexChanged(const QString &)),
461 this, SLOT(slotBncTextChanged()));
462
463 // Streams
464 // -------
465 _mountPointsTable = new QTableWidget(0,8);
466
467 _mountPointsTable->horizontalHeader()->resizeSection(1,34*ww);
468 _mountPointsTable->horizontalHeader()->resizeSection(2,9*ww);
469 _mountPointsTable->horizontalHeader()->resizeSection(3,7*ww);
470 _mountPointsTable->horizontalHeader()->resizeSection(4,7*ww);
471 _mountPointsTable->horizontalHeader()->resizeSection(5,5*ww);
472 _mountPointsTable->horizontalHeader()->resizeSection(6,5*ww);
473 _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
474 _mountPointsTable->horizontalHeader()->setStretchLastSection(true);
475 _mountPointsTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
476 _mountPointsTable->setHorizontalHeaderLabels(labels);
477 _mountPointsTable->setGridStyle(Qt::NoPen);
478 _mountPointsTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
479 _mountPointsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
480 _mountPointsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
481 _mountPointsTable->hideColumn(0);
482 connect(_mountPointsTable, SIGNAL(itemSelectionChanged()),
483 SLOT(slotSelectionChanged()));
484 populateMountPointsTable();
485
486 _log = new QTextBrowser();
487 _log->setReadOnly(true);
488
489 // Combination
490 // -----------
491 _cmbTable = new QTableWidget(0,3);
492 _cmbTable->setHorizontalHeaderLabels(QString("Mountpoint, AC Name, Weight").split(","));
493 _cmbTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
494 _cmbTable->setSelectionBehavior(QAbstractItemView::SelectRows);
495 _cmbTable->setMaximumWidth(30*ww);
496 _cmbTable->horizontalHeader()->resizeSection(0,10*ww);
497 _cmbTable->horizontalHeader()->resizeSection(1,8*ww);
498 _cmbTable->horizontalHeader()->resizeSection(2,8*ww);
499 _cmbTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
500 _cmbTable->horizontalHeader()->setStretchLastSection(true);
501 _cmbTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
502
503 _cmbMaxresLineEdit = new QLineEdit(settings.value("cmbMaxres").toString());
504
505 QPushButton* addCmbRowButton = new QPushButton("Add Row");
506 QPushButton* delCmbRowButton = new QPushButton("Delete");
507
508 connect(_cmbTable, SIGNAL(itemSelectionChanged()),
509 SLOT(slotBncTextChanged()));
510
511 _cmbMethodComboBox = new QComboBox();
512 _cmbMethodComboBox->setEditable(false);
513 _cmbMethodComboBox->addItems(QString("Filter,Single-Epoch").split(","));
514 int im = _cmbMethodComboBox->findText(settings.value("cmbMethod").toString());
515 if (im != -1) {
516 _cmbMethodComboBox->setCurrentIndex(im);
517 }
518
519 // Upload Results
520 // -------------
521 _uploadTable = new QTableWidget(0,9);
522 _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mount, Password, System, CoM, SP3 File, RNX File, bytes").split(","));
523 _uploadTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
524 _uploadTable->setSelectionBehavior(QAbstractItemView::SelectRows);
525 _uploadTable->horizontalHeader()->resizeSection(0,13*ww);
526 _uploadTable->horizontalHeader()->resizeSection(1,5*ww);
527 _uploadTable->horizontalHeader()->resizeSection(2,6*ww);
528 _uploadTable->horizontalHeader()->resizeSection(3,8*ww);
529 _uploadTable->horizontalHeader()->resizeSection(4,11*ww);
530 _uploadTable->horizontalHeader()->resizeSection(5,4*ww);
531 _uploadTable->horizontalHeader()->resizeSection(6,15*ww);
532 _uploadTable->horizontalHeader()->resizeSection(7,15*ww);
533 _uploadTable->horizontalHeader()->resizeSection(8,10*ww);
534 _uploadTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
535 _uploadTable->horizontalHeader()->setStretchLastSection(true);
536 _uploadTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
537
538 connect(_uploadTable, SIGNAL(itemSelectionChanged()),
539 SLOT(slotBncTextChanged()));
540
541 QPushButton* addUploadRowButton = new QPushButton("Add Row");
542 QPushButton* delUploadRowButton = new QPushButton("Del Row");
543 QPushButton* setUploadTrafoButton = new QPushButton("Custom Trafo");
544 _uploadIntrComboBox = new QComboBox;
545 _uploadIntrComboBox->setEditable(false);
546 _uploadIntrComboBox->addItems(QString("1 day,1 hour, 30 min,15 min,10 min,5 min,2 min,1 min").split(","));
547 ii = _uploadIntrComboBox->findText(settings.value("uploadIntr").toString());
548 if (ii != -1) {
549 _uploadIntrComboBox->setCurrentIndex(ii);
550 }
551 _uploadSamplSpinBox = new QSpinBox;
552 _uploadSamplSpinBox->setMinimum(5);
553 _uploadSamplSpinBox->setMaximum(60);
554 _uploadSamplSpinBox->setSingleStep(5);
555 _uploadSamplSpinBox->setMaximumWidth(9*ww);
556 _uploadSamplSpinBox->setValue(settings.value("uploadSampl").toInt());
557 _uploadSamplSpinBox->setSuffix(" sec");
558
559 _uploadSamplOrbSpinBox = new QSpinBox;
560 _uploadSamplOrbSpinBox->setMinimum(0);
561 _uploadSamplOrbSpinBox->setMaximum(60);
562 _uploadSamplOrbSpinBox->setSingleStep(5);
563 _uploadSamplOrbSpinBox->setMaximumWidth(9*ww);
564 _uploadSamplOrbSpinBox->setValue(settings.value("uploadSamplOrb").toInt());
565 _uploadSamplOrbSpinBox->setSuffix(" sec");
566
567 // Upload RTCM3 Ephemeris
568 // ----------------------
569 _uploadEphHostLineEdit = new QLineEdit(settings.value("uploadEphHost").toString());
570 _uploadEphPortLineEdit = new QLineEdit(settings.value("uploadEphPort").toString());
571 _uploadEphPasswordLineEdit = new QLineEdit(settings.value("uploadEphPassword").toString());
572 _uploadEphPasswordLineEdit->setEchoMode(QLineEdit::PasswordEchoOnEdit);
573 _uploadEphMountpointLineEdit = new QLineEdit(settings.value("uploadEphMountpoint").toString());
574 _uploadEphSampleSpinBox = new QSpinBox;
575 _uploadEphSampleSpinBox->setMinimum(5);
576 _uploadEphSampleSpinBox->setMaximum(60);
577 _uploadEphSampleSpinBox->setSingleStep(5);
578 _uploadEphSampleSpinBox->setMaximumWidth(9*ww);
579 _uploadEphSampleSpinBox->setValue(settings.value("uploadEphSample").toInt());
580 _uploadEphSampleSpinBox->setSuffix(" sec");
581 _uploadEphBytesCounter = new bncBytesCounter;
582
583 // WhatsThis weber
584 // ---------
585 _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>"));
586 _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC.</p>"));
587 _sslCaCertPathLineEdit->setWhatsThis(tr("<p>Communication with an NTRIP broadcaster over SSL requires the exchange of client and/or server certificates. Specify the path to a directory where you save certificates on your system. Don't try communication via SSL if you are not sure wheter this is supported by the involved NTRIP broadcaster. Note that SSL communication is usually done over port 443.</p>"));
588 _ignoreSslErrorsCheckBox->setWhatsThis(tr("<p>SSL communication may involve queries coming from the NTRIP broadcaster. Tick 'Ignore SSL authorization erros' if you don't want to be bothered with this.</p>"));
589 _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>"));
590 _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."));
591 _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."));
592 _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."));
593 _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."));
594 _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."));
595 _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>"));
596 _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."));
597 _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."));
598 _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."));
599 _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>"));
600 _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>"));
601 _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>"));
602 _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNC at startup time in window mode with preassigned processing options.</p>"));
603 _rawOutFileLineEdit->setWhatsThis(tr("<p>Save all data coming in through various streams in the received order and format in one file.</p>"));
604
605 _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>"));
606 _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file.</p>"));
607 _ephIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Navigation file.</p>"));
608 _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of the Broadcast Ephemeris Correction files.</p>"));
609 _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>"));
610 _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>"));
611 _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>"));
612 _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>"));
613 _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>"));
614 _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."));
615 _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>"));
616 _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>"));
617 _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>"));
618 _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."));
619 _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)."));
620 _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."));
621 _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."));
622 _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."));
623 _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>"));
624 _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>"));
625 _serialMountPointLineEdit->setWhatsThis(tr("<p>Enter a 'Mountpoint' to forward the corresponding stream to a serial connected receiver.</p>"));
626 _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>"));
627 _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>"));
628 _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>"));
629 _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>"));
630 _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>"));
631 _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>"));
632 _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>"));
633 _serialFileNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where NMEA messages coming from your serial connected receiver are saved.</p>"));
634 _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>"));
635 _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>"));
636 _pppCorrMountLineEdit->setWhatsThis(tr("<p>You must specify an orbit/clock corrections stream by its mountpoint from the 'Streams' list compiled below. Example: 'CLK10'</p>"));
637 _pppSPPComboBox->setWhatsThis(tr("<p>Choose between plain Single Point Positioning (SPP) and Precise Point Positioning (PPP).</p>"));
638 _postProcComboBox->setWhatsThis(tr("<p>Select a post-processing mode.</p>"));
639 _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>"));
640 _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>"));
641 _pppGLONASSCheckBox->setWhatsThis(tr("<p>By default BNC does not use GLONASS observations in PPP mode.</p><p>Tick 'Use GLONASS' for adding GLONASS observations to GPS and Galileo (optional) in a PPP solution.</p>"));
642 _pppGalileoCheckBox->setWhatsThis(tr("<p>By default BNC does not use Galileo observations in PPP mode.</p><p>Tick 'Use Galileo' for adding Galileo observations to GPS and GLONASS (optional) in a PPP solution.</p>"));
643 _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."));
644 _pppNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where PPP results are saved as NMEA messages.</p>"));
645 _pppNMEAPortLineEdit->setWhatsThis(tr("<p>Specify an IP port number to output PPP results as NMEA messages through an IP port.</p>"));
646 _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>"));
647 _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>"));
648 _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>"));
649 _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>"));
650 _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>"));
651 _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."));
652 _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>"));
653 _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>"));
654 _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.018 meters per hour.</p>"));
655 _pppRefCrdXLineEdit->setWhatsThis(tr("<p>Enter reference coordinate X of the receiver's position.</p>"));
656 _pppRefCrdYLineEdit->setWhatsThis(tr("<p>Enter reference coordinate Y of the receiver's position.</p>"));
657 _pppRefCrdZLineEdit->setWhatsThis(tr("<p>Enter reference coordinate Z of the receiver's position.</p>"));
658 _pppRefdNLineEdit->setWhatsThis(tr("<p>Enter north antenna excentricity.</p>"));
659 _pppRefdELineEdit->setWhatsThis(tr("<p>Enter east antenna excentricity.</p>"));
660 _pppRefdULineEdit->setWhatsThis(tr("<p>Enter up antenna excentricity.</p>"));
661 _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."));
662 _pppSync->setWhatsThis(tr(
663 "<p> Zero value (or empty field, default) means that BNC processes each epoch of data "
664 "immediately after its arrival using satellite clock corrections available at "
665 "that time.</p><p> Non-zero value 'Sync Corr' (i.e. 5) means that the epochs of data "
666 "are buffered and the processing of each epoch is postponed till the satellite clock "
667 "corrections not older than 'Sync Corr' seconds are available.<p>"));
668 _pppAntexFileChooser->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>"));
669 _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>"));
670 _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."));
671 _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 coming 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 orbit information in the final combination stream is just copied from one of the incoming streams. The stream used for providing the orbits may vary over time: if the orbit providing stream has an outage then BNC switches to the next remaining streams to get hold of the orbit information.</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>"));
672 _cmbMaxresLineEdit->setWhatsThis(tr("<p>BNC combines all incoming clocks according to specified weights. Individual clock estimates that differ by more than 'Maximal Residuum' meters from the average of all clocks will be ignored.<p></p>It is suggested to specify a value of about 0.2 m for the Kalman filter combination approach and a value of about 3.0 meters for the Single-Epoch combination approach.</p><p>Default is a value of '999.0'.</p>"));
673 _cmbMethodComboBox->setWhatsThis(tr("<p>Select a clock combination approach. Options are 'Single-Epoch' and Kalman 'Filter'. It is suggested to use the Kalman filter approach for the purpose of Precise Point Positioning.</p>"));
674 _uploadTable->setWhatsThis(tr("<p>BNC can upload clock and orbit corrections to broadcast ephemeris (Broadcast Corrections) in RTCM Version 3 SSR format. The clock and orbit corrections may either come from a Real-time Network Engine or from a combination of incoming orbit/clock streams.</p><p>Hit the 'Add Row' button, double click on the 'Host' field to enter the IP or URL of an NTRIP broadcaster and hit Enter. Then double click on the 'Port' field to enter the NTRIP broadcaster IP port.</p>"));
675
676 addCmbRowButton->setWhatsThis(tr("Hit 'Add Row' button to add another line to the mountpoints table."));
677 delCmbRowButton->setWhatsThis(tr("Hit 'Delete' button to delete the highlighted line from the mountpoints table."));
678
679
680 // Canvas with Editable Fields
681 // ---------------------------
682 _canvas = new QWidget;
683 setCentralWidget(_canvas);
684
685 _aogroup = new QTabWidget();
686 QWidget* pgroup = new QWidget();
687 QWidget* ggroup = new QWidget();
688 QWidget* sgroup = new QWidget();
689 QWidget* egroup = new QWidget();
690 QWidget* agroup = new QWidget();
691 QWidget* cgroup = new QWidget();
692 QWidget* ogroup = new QWidget();
693 QWidget* rgroup = new QWidget();
694 QWidget* sergroup = new QWidget();
695 QWidget* pppgroup = new QWidget();
696 QWidget* ppp2group = new QWidget();
697 QWidget* postgroup = new QWidget();
698 QWidget* cmbgroup = new QWidget();
699 QWidget* uploadgroup = new QWidget();
700 QWidget* uploadEphgroup = new QWidget();
701 _aogroup->addTab(pgroup,tr("Network"));
702 _aogroup->addTab(ggroup,tr("General"));
703 _aogroup->addTab(ogroup,tr("RINEX Observations"));
704 _aogroup->addTab(egroup,tr("RINEX Ephemeris"));
705 _aogroup->addTab(cgroup,tr("Broadcast Corrections"));
706 _aogroup->addTab(sgroup,tr("Feed Engine"));
707 _aogroup->addTab(sergroup,tr("Serial Output"));
708 _aogroup->addTab(agroup,tr("Outages"));
709 _aogroup->addTab(rgroup,tr("Miscellaneous"));
710 _aogroup->addTab(pppgroup,tr("PPP (1)"));
711 _aogroup->addTab(ppp2group,tr("PPP (2)"));
712 _aogroup->addTab(postgroup,tr("Post-Processing"));
713#ifdef USE_COMBINATION
714 _aogroup->addTab(cmbgroup,tr("Combination"));
715#endif
716 _aogroup->addTab(uploadgroup,tr("Upload (clk)"));
717 _aogroup->addTab(uploadEphgroup,tr("Upload (eph)"));
718
719 // Log Tab
720 // -------
721 _loggroup = new QTabWidget();
722 _loggroup->addTab(_log,tr("Log"));
723 _loggroup->addTab(_bncFigure,tr("Throughput"));
724 _loggroup->addTab(_bncFigureLate,tr("Latency"));
725 _loggroup->addTab(_bncFigurePPP,tr("PPP Plot"));
726
727 // Netowork (Proxy and SSL) Tab
728 // ----------------------------
729 QGridLayout* pLayout = new QGridLayout;
730 pLayout->setColumnMinimumWidth(0,13*ww);
731 _proxyPortLineEdit->setMaximumWidth(9*ww);
732
733 pLayout->addWidget(new QLabel("Proxy host"), 0, 0);
734 pLayout->addWidget(_proxyHostLineEdit, 0, 1, 1,10);
735 pLayout->addWidget(new QLabel("Proxy port"), 1, 0);
736 pLayout->addWidget(_proxyPortLineEdit, 1, 1);
737 pLayout->addWidget(new QLabel("Path to SSL certificates"), 2, 0);
738 pLayout->addWidget(_sslCaCertPathLineEdit, 2, 1, 1,10);
739 pLayout->addWidget(new QLabel("default: " + bncSslConfig::defaultPath()), 2, 12, 1,20);
740 pLayout->addWidget(new QLabel("Ignore SSL authorization errors"), 3,0);
741 pLayout->addWidget(_ignoreSslErrorsCheckBox, 3, 1, 1,10);
742 pLayout->addWidget(new QLabel("Settings for proxy in protected networks and settings for SSL authorization, leave boxes blank if none."),4, 0, 1, 50, Qt::AlignLeft);
743 pLayout->addWidget(new QLabel(" "), 5,0);
744 pLayout->addWidget(new QLabel(" "), 6,0);
745 pgroup->setLayout(pLayout);
746
747 // General Tab
748 // -----------
749 QGridLayout* gLayout = new QGridLayout;
750 gLayout->setColumnMinimumWidth(0,14*ww);
751 _onTheFlyComboBox->setMaximumWidth(9*ww);
752
753 gLayout->addWidget(new QLabel("Logfile (full path)"), 0, 0);
754 gLayout->addWidget(_logFileLineEdit, 0, 1, 1,30); // 1
755 gLayout->addWidget(new QLabel("Append files"), 1, 0);
756 gLayout->addWidget(_rnxAppendCheckBox, 1, 1);
757 gLayout->addWidget(new QLabel("Reread configuration"), 2, 0);
758 gLayout->addWidget(_onTheFlyComboBox, 2, 1);
759 gLayout->addWidget(new QLabel("Auto start"), 3, 0);
760 gLayout->addWidget(_autoStartCheckBox, 3, 1);
761 gLayout->addWidget(new QLabel("Raw output file (full path)"), 4, 0);
762 gLayout->addWidget(_rawOutFileLineEdit, 4, 1, 1,30);
763 gLayout->addWidget(new QLabel("General settings for logfile, file handling, configuration on-the-fly, and auto-start."),5, 0, 1, 50, Qt::AlignLeft);
764 gLayout->addWidget(new QLabel(" "), 6, 0);
765 ggroup->setLayout(gLayout);
766
767 // RINEX Observations
768 // ------------------
769 QGridLayout* oLayout = new QGridLayout;
770 oLayout->setColumnMinimumWidth(0,14*ww);
771 _rnxIntrComboBox->setMaximumWidth(9*ww);
772 _rnxSamplSpinBox->setMaximumWidth(9*ww);
773
774 oLayout->addWidget(new QLabel("Directory"), 0, 0);
775 oLayout->addWidget(_rnxPathLineEdit, 0, 1, 1, 24);
776 oLayout->addWidget(new QLabel("Interval"), 1, 0);
777 oLayout->addWidget(_rnxIntrComboBox, 1, 1);
778 oLayout->addWidget(new QLabel(" Sampling"), 1, 2, Qt::AlignRight);
779 oLayout->addWidget(_rnxSamplSpinBox, 1, 3, Qt::AlignLeft);
780 oLayout->addWidget(new QLabel("Skeleton extension"), 2, 0);
781 oLayout->addWidget(_rnxSkelLineEdit, 2, 1, 1, 1, Qt::AlignLeft);
782 oLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
783 oLayout->addWidget(_rnxScrpLineEdit, 3, 1, 1, 24);
784 oLayout->addWidget(new QLabel("Version 3"), 4, 0);
785 oLayout->addWidget(_rnxV3CheckBox, 4, 1);
786 oLayout->addWidget(new QLabel("Saving RINEX observation files."),5, 0, 1, 50, Qt::AlignLeft);
787 oLayout->addWidget(new QLabel(" "), 6, 0);
788 ogroup->setLayout(oLayout);
789
790 // RINEX Ephemeris
791 // ---------------
792 QGridLayout* eLayout = new QGridLayout;
793 eLayout->setColumnMinimumWidth(0,14*ww);
794 _ephIntrComboBox->setMaximumWidth(9*ww);
795 _outEphPortLineEdit->setMaximumWidth(9*ww);
796
797 eLayout->addWidget(new QLabel("Directory"), 0, 0);
798 eLayout->addWidget(_ephPathLineEdit, 0, 1, 1,30);
799 eLayout->addWidget(new QLabel("Interval"), 1, 0);
800 eLayout->addWidget(_ephIntrComboBox, 1, 1);
801 eLayout->addWidget(new QLabel("Port"), 2, 0);
802 eLayout->addWidget(_outEphPortLineEdit, 2, 1);
803 eLayout->addWidget(new QLabel("Version 3"), 3, 0);
804 eLayout->addWidget(_ephV3CheckBox, 3, 1);
805 eLayout->addWidget(new QLabel("Saving RINEX ephemeris files and ephemeris output through IP port."),4,0,1,50,Qt::AlignLeft);
806 eLayout->addWidget(new QLabel(" "), 5, 0);
807 eLayout->addWidget(new QLabel(" "), 6, 0);
808 egroup->setLayout(eLayout);
809
810
811 // Broadcast Corrections
812 // ---------------------
813 QGridLayout* cLayout = new QGridLayout;
814 cLayout->setColumnMinimumWidth(0,14*ww);
815 _corrIntrComboBox->setMaximumWidth(9*ww);
816 _corrPortLineEdit->setMaximumWidth(9*ww);
817 _corrTimeSpinBox->setMaximumWidth(9*ww);
818
819 cLayout->addWidget(new QLabel("Directory, ASCII"), 0, 0);
820 cLayout->addWidget(_corrPathLineEdit, 0, 1,1,20);
821 cLayout->addWidget(new QLabel("Interval"), 1, 0);
822 cLayout->addWidget(_corrIntrComboBox, 1, 1);
823 cLayout->addWidget(new QLabel("Port"), 2, 0);
824 cLayout->addWidget(_corrPortLineEdit, 2, 1);
825 cLayout->addWidget(new QLabel(" Wait for full epoch"), 2, 2, Qt::AlignRight);
826 cLayout->addWidget(_corrTimeSpinBox, 2, 3, Qt::AlignLeft);
827 cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),3,0,1,50);
828 cLayout->addWidget(new QLabel(" "),4,0);
829 cLayout->addWidget(new QLabel(" "),5,0);
830 cLayout->addWidget(new QLabel(" "),6,0);
831 cgroup->setLayout(cLayout);
832
833 // Feed Engine
834 // -----------
835 QGridLayout* sLayout = new QGridLayout;
836 sLayout->setColumnMinimumWidth(0,14*ww);
837 _outPortLineEdit->setMaximumWidth(9*ww);
838 _waitTimeSpinBox->setMaximumWidth(9*ww);
839 _binSamplSpinBox->setMaximumWidth(9*ww);
840 _outUPortLineEdit->setMaximumWidth(9*ww);
841
842 sLayout->addWidget(new QLabel("Port"), 0, 0);
843 sLayout->addWidget(_outPortLineEdit, 0, 1);
844 sLayout->addWidget(new QLabel("Wait for full epoch"), 0, 2, Qt::AlignRight);
845 sLayout->addWidget(_waitTimeSpinBox, 0, 3, Qt::AlignLeft);
846 sLayout->addWidget(new QLabel("Sampling"), 1, 0);
847 sLayout->addWidget(_binSamplSpinBox, 1, 1, Qt::AlignLeft);
848 sLayout->addWidget(new QLabel("File (full path)"), 2, 0);
849 sLayout->addWidget(_outFileLineEdit, 2, 1, 1, 20);
850 sLayout->addWidget(new QLabel("Port (unsynchronized)"), 3, 0);
851 sLayout->addWidget(_outUPortLineEdit, 3, 1);
852 sLayout->addWidget(new QLabel("Output decoded observations in a binary format to feed a real-time GNSS network engine."),4,0,1,50);
853 sLayout->addWidget(new QLabel(" "),5,0);
854 sLayout->addWidget(new QLabel(" "),6,0);
855 sgroup->setLayout(sLayout);
856
857 // Serial Output
858 // -------------
859 QGridLayout* serLayout = new QGridLayout;
860 serLayout->setColumnMinimumWidth(0,14*ww);
861 _serialBaudRateComboBox->setMaximumWidth(9*ww);
862 _serialFlowControlComboBox->setMaximumWidth(11*ww);
863 _serialDataBitsComboBox->setMaximumWidth(5*ww);
864 _serialParityComboBox->setMaximumWidth(9*ww);
865 _serialStopBitsComboBox->setMaximumWidth(5*ww);
866 _serialAutoNMEAComboBox->setMaximumWidth(9*ww);
867 _serialHeightNMEALineEdit->setMaximumWidth(8*ww);
868
869 serLayout->addWidget(new QLabel("Mountpoint"), 0, 0, Qt::AlignLeft);
870 serLayout->addWidget(_serialMountPointLineEdit, 0, 1,1,2);
871 serLayout->addWidget(new QLabel("Port name"), 1, 0, Qt::AlignLeft);
872 serLayout->addWidget(_serialPortNameLineEdit, 1, 1,1,2);
873 serLayout->addWidget(new QLabel("Baud rate"), 2, 0, Qt::AlignLeft);
874 serLayout->addWidget(_serialBaudRateComboBox, 2, 1);
875 serLayout->addWidget(new QLabel("Flow control"), 2, 2, Qt::AlignRight);
876 serLayout->addWidget(_serialFlowControlComboBox, 2, 3);
877 serLayout->addWidget(new QLabel("Data bits"), 3, 0, Qt::AlignLeft);
878 serLayout->addWidget(_serialDataBitsComboBox, 3, 1);
879 serLayout->addWidget(new QLabel("Parity"), 3, 2, Qt::AlignRight);
880 serLayout->addWidget(_serialParityComboBox, 3, 3);
881 serLayout->addWidget(new QLabel(" Stop bits"), 3, 4, Qt::AlignRight);
882 serLayout->addWidget(_serialStopBitsComboBox, 3, 5);
883 serLayout->addWidget(new QLabel("NMEA"), 4, 0);
884 serLayout->addWidget(_serialAutoNMEAComboBox, 4, 1);
885 serLayout->addWidget(new QLabel(" File (full path)"), 4, 2, Qt::AlignRight);
886 serLayout->addWidget(_serialFileNMEALineEdit, 4, 3, 1,15);
887 serLayout->addWidget(new QLabel("Height"), 4,20, Qt::AlignRight);
888 serLayout->addWidget(_serialHeightNMEALineEdit, 4,21, 1,11);
889 serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver."),5,0,1,30);
890 serLayout->addWidget(new QLabel(" "), 6, 0);
891
892 sergroup->setLayout(serLayout);
893
894 // Outages
895 // -------
896 QGridLayout* aLayout = new QGridLayout;
897 aLayout->setColumnMinimumWidth(0,14*ww);
898 _obsRateComboBox->setMaximumWidth(9*ww);
899 _adviseFailSpinBox->setMaximumWidth(9*ww);
900 _adviseRecoSpinBox->setMaximumWidth(9*ww);
901
902 aLayout->addWidget(new QLabel("Observation rate"), 0, 0);
903 aLayout->addWidget(_obsRateComboBox, 0, 1);
904 aLayout->addWidget(new QLabel("Failure threshold"), 1, 0);
905 aLayout->addWidget(_adviseFailSpinBox, 1, 1);
906 aLayout->addWidget(new QLabel("Recovery threshold"), 2, 0);
907 aLayout->addWidget(_adviseRecoSpinBox, 2, 1);
908 aLayout->addWidget(new QLabel("Script (full path)"), 3, 0);
909 aLayout->addWidget(_adviseScriptLineEdit, 3, 1,1,30);
910 aLayout->addWidget(new QLabel("Failure and recovery reports, advisory notes."),4,0,1,50,Qt::AlignLeft);
911 aLayout->addWidget(new QLabel(" "), 5, 0);
912 aLayout->addWidget(new QLabel(" "), 6, 0);
913 agroup->setLayout(aLayout);
914
915 // Miscellaneous
916 // -------------
917 QGridLayout* rLayout = new QGridLayout;
918 rLayout->setColumnMinimumWidth(0,14*ww);
919 _perfIntrComboBox->setMaximumWidth(9*ww);
920
921 rLayout->addWidget(new QLabel("Mountpoint"), 0, 0);
922 rLayout->addWidget(_miscMountLineEdit, 0, 1, 1,7);
923 rLayout->addWidget(new QLabel("Log latency"), 1, 0);
924 rLayout->addWidget(_perfIntrComboBox, 1, 1);
925 rLayout->addWidget(new QLabel("Scan RTCM"), 2, 0);
926 rLayout->addWidget(_scanRTCMCheckBox, 2, 1);
927 rLayout->addWidget(new QLabel("Log latencies or scan RTCM streams for numbers of message types and antenna information."),3, 0,1,30);
928 rLayout->addWidget(new QLabel(" "), 4, 0);
929 rLayout->addWidget(new QLabel(" "), 5, 0);
930 rLayout->addWidget(new QLabel(" "), 6, 0);
931 rgroup->setLayout(rLayout);
932
933 // PPP Client
934 // ----------
935 QGridLayout* pppLayout = new QGridLayout;
936 _pppSigCLineEdit->setMaximumWidth(6*ww);
937 _pppSigPLineEdit->setMaximumWidth(6*ww);
938 _pppSigCrd0->setMaximumWidth(6*ww);
939 _pppSigCrdP->setMaximumWidth(6*ww);
940 _pppSigTrp0->setMaximumWidth(6*ww);
941 _pppSigTrpP->setMaximumWidth(6*ww);
942 _pppAverageLineEdit->setMaximumWidth(6*ww);
943 _pppQuickStartLineEdit->setMaximumWidth(6*ww);
944 _pppMaxSolGapLineEdit->setMaximumWidth(6*ww);
945 _pppRefCrdXLineEdit->setMaximumWidth(10*ww);
946 _pppRefCrdYLineEdit->setMaximumWidth(10*ww);
947 _pppRefCrdZLineEdit->setMaximumWidth(10*ww);
948 _pppRefdNLineEdit->setMaximumWidth(6*ww);
949 _pppRefdELineEdit->setMaximumWidth(6*ww);
950 _pppRefdULineEdit->setMaximumWidth(6*ww);
951 _pppSync->setMaximumWidth(6*ww);
952 _pppSPPComboBox->setMaximumWidth(15*ww);
953 _pppNMEAPortLineEdit->setMaximumWidth(6*ww);
954
955 pppLayout->addWidget(new QLabel("Obs Mountpoint"), 0, 0);
956 pppLayout->addWidget(_pppMountLineEdit, 0, 1);
957 pppLayout->addWidget(_pppSPPComboBox, 0, 2);
958 pppLayout->addWidget(new QLabel(" X "), 0, 3, Qt::AlignRight);
959 pppLayout->addWidget(_pppRefCrdXLineEdit, 0, 4);
960 pppLayout->addWidget(new QLabel(" Y "), 0, 5, Qt::AlignRight);
961 pppLayout->addWidget(_pppRefCrdYLineEdit, 0, 6);
962 pppLayout->addWidget(new QLabel(" Z "), 0, 7, Qt::AlignRight);
963 pppLayout->addWidget(_pppRefCrdZLineEdit, 0, 8);
964 pppLayout->addWidget(new QLabel("Corr Mountpoint "), 1, 0);
965 pppLayout->addWidget(_pppCorrMountLineEdit, 1, 1);
966 pppLayout->addWidget(new QLabel(" dN "), 1, 3, Qt::AlignRight);
967 pppLayout->addWidget(_pppRefdNLineEdit, 1, 4);
968 pppLayout->addWidget(new QLabel(" dE "), 1, 5, Qt::AlignRight);
969 pppLayout->addWidget(_pppRefdELineEdit, 1, 6);
970 pppLayout->addWidget(new QLabel(" dU "), 1, 7, Qt::AlignRight);
971 pppLayout->addWidget(_pppRefdULineEdit, 1, 8);
972 pppLayout->addWidget(new QLabel("Output"), 2, 0);
973 pppLayout->addWidget(new QLabel("NMEA File"), 2, 1, Qt::AlignRight);
974 pppLayout->addWidget(_pppNMEALineEdit, 2, 2, 1, 3);
975 pppLayout->addWidget(new QLabel(" NMEA Port"), 2, 5, Qt::AlignRight);
976 pppLayout->addWidget(_pppNMEAPortLineEdit, 2, 6);
977 pppLayout->addWidget(new QLabel("PPP Plot"), 2, 7, Qt::AlignRight);
978 pppLayout->addWidget(_pppPlotCoordinates, 2, 8);
979 pppLayout->addWidget(new QLabel("Coordinates from Precise Point Positioning (PPP)."), 3, 0, 1, 8, Qt::AlignLeft);
980 pppLayout->addWidget(new QLabel(" "), 4, 0, 1, 5);
981 pppLayout->addWidget(new QLabel(" "), 5, 0, 1, 5);
982 pppLayout->addWidget(new QLabel(" "), 6, 0);
983
984 pppgroup->setLayout(pppLayout);
985
986 // PPP Client (second panel)
987 // -------------------------
988 QGridLayout* ppp2Layout = new QGridLayout;
989 _pppAntennaLineEdit->setMinimumWidth(18*ww);
990
991 ppp2Layout->addWidget(new QLabel("ANTEX file"), 0, 0);
992 ppp2Layout->addWidget(_pppAntexFileChooser, 0, 1, 1, 3);
993 ppp2Layout->addWidget(_pppAntennaLineEdit, 0, 4, 1, 2, Qt::AlignRight);
994 ppp2Layout->addWidget(new QLabel("Antenna Name"), 0, 6);
995 ppp2Layout->addWidget(_pppApplySatAntCheckBox, 0, 7, Qt::AlignRight);
996 ppp2Layout->addWidget(new QLabel("Apply Sat. Ant. Offsets"), 0, 8);
997 ppp2Layout->addWidget(new QLabel("Options"), 1, 0);
998 ppp2Layout->addWidget(_pppUsePhaseCheckBox, 1, 1, Qt::AlignRight);
999 ppp2Layout->addWidget(new QLabel("Use phase obs"), 1, 2);
1000 ppp2Layout->addWidget(_pppEstTropoCheckBox, 1, 3, Qt::AlignRight);
1001 ppp2Layout->addWidget(new QLabel("Estimate tropo"), 1, 4);
1002 ppp2Layout->addWidget(_pppGLONASSCheckBox, 1, 5, Qt::AlignRight);
1003 ppp2Layout->addWidget(new QLabel("Use GLONASS"), 1, 6);
1004 ppp2Layout->addWidget(_pppGalileoCheckBox, 1, 7, Qt::AlignRight);
1005 ppp2Layout->addWidget(new QLabel("Use Galileo "), 1, 8);
1006 ppp2Layout->addWidget(new QLabel("Options cont'd"), 2, 0);
1007 ppp2Layout->addWidget(_pppSync, 2, 1);
1008 ppp2Layout->addWidget(new QLabel("Sync Corr (sec) "), 2, 2);
1009 ppp2Layout->addWidget(_pppAverageLineEdit, 2, 3, Qt::AlignRight);
1010 ppp2Layout->addWidget(new QLabel("Averaging (min)") , 2, 4);
1011 ppp2Layout->addWidget(_pppQuickStartLineEdit, 2, 5, Qt::AlignRight);
1012 ppp2Layout->addWidget(new QLabel("Quick-Start (sec) "), 2, 6);
1013 ppp2Layout->addWidget(_pppMaxSolGapLineEdit, 2, 7, Qt::AlignRight);
1014 ppp2Layout->addWidget(new QLabel("Max Sol. Gap (sec)"), 2, 8);
1015 ppp2Layout->addWidget(new QLabel("Sigmas"), 3, 0);
1016 ppp2Layout->addWidget(_pppSigCLineEdit, 3, 1, Qt::AlignRight);
1017 ppp2Layout->addWidget(new QLabel("Code"), 3, 2);
1018 ppp2Layout->addWidget(_pppSigPLineEdit, 3, 3);
1019 ppp2Layout->addWidget(new QLabel("Phase"), 3, 4);
1020 ppp2Layout->addWidget(_pppSigTrp0, 3, 5, Qt::AlignRight);
1021 ppp2Layout->addWidget(new QLabel("Tropo Init "), 3, 6);
1022 ppp2Layout->addWidget(_pppSigTrpP, 3, 7);
1023 ppp2Layout->addWidget(new QLabel("Tropo White Noise"), 3, 8);
1024 ppp2Layout->addWidget(new QLabel("Sigmas cont'd"), 4, 0);
1025 ppp2Layout->addWidget(_pppSigCrd0, 4, 1, Qt::AlignRight);
1026 ppp2Layout->addWidget(new QLabel("Sigma XYZ Init "), 4, 2);
1027 ppp2Layout->addWidget(_pppSigCrdP, 4, 3, Qt::AlignRight);
1028 ppp2Layout->addWidget(new QLabel("Sigma XYZ Noise "), 4, 4);
1029 ppp2Layout->addWidget(new QLabel("Coordinates from Precise Point Positioning (PPP), continued."), 5, 0, 1, 5);
1030 ppp2Layout->addWidget(new QLabel(" "), 6, 0);
1031
1032 ppp2group->setLayout(ppp2Layout);
1033
1034 // Post Processing
1035 // ---------------
1036 QGridLayout* postLayout = new QGridLayout;
1037 postLayout->setColumnMinimumWidth(0,14*ww);
1038 _postProcComboBox->setMaximumWidth(10*ww);
1039
1040 _postObsFileChooser = new qtFileChooser;
1041 _postObsFileChooser->setFileName(settings.value("postObsFile").toString());
1042 _postObsFileChooser->setWhatsThis(tr("Specify the full path to an observation file in RINEX v2 or v3 format."));
1043
1044 _postNavFileChooser = new qtFileChooser;
1045 _postNavFileChooser->setFileName(settings.value("postNavFile").toString());
1046 _postNavFileChooser->setWhatsThis(tr("Specify the full path to a RINEX v2 or v3 navigation file."));
1047
1048 _postCorrFileChooser = new qtFileChooser;
1049 _postCorrFileChooser->setFileName(settings.value("postCorrFile").toString());
1050 _postCorrFileChooser->setWhatsThis(tr("Specify the full path to an orbit/clock corrections file in plain ASCII format."));
1051
1052 _postOutLineEdit = new QLineEdit(settings.value("postOutFile").toString());
1053 _postOutLineEdit->setWhatsThis(tr("Specify the full path to an output file."));
1054
1055 postLayout->addWidget(new QLabel("Mode"), 0, 0);
1056 postLayout->addWidget(_postProcComboBox, 0, 1);
1057 postLayout->addWidget(new QLabel("Input files (full path)"), 1, 0);
1058
1059 postLayout->addWidget(_postObsFileChooser, 1, 1);
1060 postLayout->addWidget(new QLabel("Obs "), 1, 2);
1061 postLayout->addWidget(_postNavFileChooser, 1, 3);
1062 postLayout->addWidget(new QLabel("Nav "), 1, 4);
1063 postLayout->addWidget(_postCorrFileChooser, 1, 5);
1064 postLayout->addWidget(new QLabel("Corr"), 1, 6);
1065
1066 postLayout->addWidget(new QLabel("Output file (full path)"), 2, 0);
1067 postLayout->addWidget(_postOutLineEdit, 2, 1, 1, 2);
1068 postLayout->addWidget(new QLabel("Post-processing, input, output, options."), 3, 0, 1, 5);
1069 postLayout->addWidget(new QLabel(" "), 4, 0);
1070 postLayout->addWidget(new QLabel(" "), 5, 0);
1071 postLayout->addWidget(new QLabel(" "), 6, 0);
1072
1073 postgroup->setLayout(postLayout);
1074
1075 // Combination
1076 // -----------
1077 QGridLayout* cmbLayout = new QGridLayout;
1078
1079 cmbLayout->setColumnMinimumWidth(0,12*ww);
1080 _cmbMethodComboBox->setMaximumWidth(12*ww);
1081 addCmbRowButton->setMaximumWidth(12*ww);
1082 delCmbRowButton->setMaximumWidth(12*ww);
1083 _cmbMaxresLineEdit->setMaximumWidth(8*ww);
1084
1085 populateCmbTable();
1086 cmbLayout->addWidget(_cmbTable, 0,0,4,3);
1087 cmbLayout->addWidget(addCmbRowButton, 0,2);
1088 connect(addCmbRowButton, SIGNAL(clicked()), this, SLOT(slotAddCmbRow()));
1089 cmbLayout->addWidget(delCmbRowButton, 0,3);
1090 cmbLayout->addWidget(new QLabel("Method"), 1, 2);
1091 cmbLayout->addWidget(_cmbMethodComboBox, 1, 3, Qt::AlignRight);
1092 cmbLayout->addWidget(new QLabel("Maximal Residuum"), 2, 2);
1093 cmbLayout->addWidget(_cmbMaxresLineEdit, 2, 3, Qt::AlignRight);
1094 connect(delCmbRowButton, SIGNAL(clicked()), this, SLOT(slotDelCmbRow()));
1095 cmbLayout->addWidget(new QLabel("Combine Broadcast Ephemeris correction streams."),3,2,1,3);
1096 cmbLayout->addWidget(new QLabel(" "), 4, 0);
1097 cmbLayout->addWidget(new QLabel(" "), 5, 0);
1098 cmbLayout->addWidget(new QLabel(" "), 6, 0);
1099
1100 cmbgroup->setLayout(cmbLayout);
1101
1102 // Upload Layout (Clocks)
1103 // ----------------------
1104 QGridLayout* uploadHlpLayout = new QGridLayout();
1105
1106 connect(addUploadRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadRow()));
1107 connect(delUploadRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadRow()));
1108 connect(setUploadTrafoButton, SIGNAL(clicked()), this, SLOT(slotSetUploadTrafo()));
1109
1110 uploadHlpLayout->addWidget(addUploadRowButton, 0,0);
1111 uploadHlpLayout->addWidget(delUploadRowButton, 0,1);
1112 uploadHlpLayout->addWidget(new QLabel("Interval"), 0,2, Qt::AlignRight);
1113 uploadHlpLayout->addWidget(_uploadIntrComboBox, 0,3);
1114 uploadHlpLayout->addWidget(new QLabel(" Sampling (Clk)"),0,4, Qt::AlignRight);
1115 uploadHlpLayout->addWidget(_uploadSamplSpinBox, 0,5);
1116 uploadHlpLayout->addWidget(new QLabel(" Sampling (Orb)"),0,6, Qt::AlignRight);
1117 uploadHlpLayout->addWidget(_uploadSamplOrbSpinBox, 0,7);
1118 uploadHlpLayout->addWidget(setUploadTrafoButton, 0,8);
1119 uploadHlpLayout->addWidget(new QLabel("Upload orbit/clock stream coming from Real-time Network Engine or upload orbit/clock combination stream."),1,0,1,8);
1120
1121 QBoxLayout* uploadLayout = new QBoxLayout(QBoxLayout::TopToBottom);
1122 populateUploadTable();
1123 uploadLayout->addWidget(_uploadTable);
1124 uploadLayout->addLayout(uploadHlpLayout);
1125
1126 uploadgroup->setLayout(uploadLayout);
1127
1128 // Upload Layout (Ephemeris)
1129 // -------------------------
1130 QGridLayout* uploadLayoutEph = new QGridLayout;
1131
1132 uploadLayoutEph->setColumnMinimumWidth(0, 9*ww);
1133 _uploadEphPortLineEdit->setMaximumWidth(9*ww);
1134 _uploadEphPasswordLineEdit->setMaximumWidth(9*ww);
1135 _uploadEphMountpointLineEdit->setMaximumWidth(12*ww);
1136
1137 uploadLayoutEph->addWidget(new QLabel("Host"), 0, 0);
1138 uploadLayoutEph->addWidget(_uploadEphHostLineEdit, 0, 1, 1, 2);
1139 uploadLayoutEph->addWidget(new QLabel(" Port"), 0, 4, Qt::AlignRight);
1140 uploadLayoutEph->addWidget(_uploadEphPortLineEdit, 0, 5, 1, 1);
1141 uploadLayoutEph->addWidget(new QLabel("Mountpoint "), 1, 0);
1142 uploadLayoutEph->addWidget(_uploadEphMountpointLineEdit, 1, 1);
1143 uploadLayoutEph->addWidget(new QLabel(" Password"), 1, 2, Qt::AlignRight);
1144 uploadLayoutEph->addWidget(_uploadEphPasswordLineEdit, 1, 3, 1, 2);
1145 uploadLayoutEph->addWidget(new QLabel("Sampling"), 2, 0);
1146 uploadLayoutEph->addWidget(_uploadEphSampleSpinBox, 2, 1);
1147 uploadLayoutEph->addWidget(new QLabel("Upload concatenated RTCMv3 Broadcast Ephemeris to caster:"), 3, 0, 1, 50);
1148 uploadLayoutEph->addWidget(_uploadEphBytesCounter, 3, 5);
1149 uploadLayoutEph->addWidget(new QLabel(" "), 4, 0);
1150 uploadLayoutEph->addWidget(new QLabel(" "), 5, 0);
1151 uploadLayoutEph->addWidget(new QLabel(" "), 6, 0);
1152
1153 uploadEphgroup->setLayout(uploadLayoutEph);
1154
1155 connect(_uploadEphHostLineEdit, SIGNAL(textChanged(const QString &)),
1156 this, SLOT(slotBncTextChanged()));
1157
1158 // Main Layout
1159 // -----------
1160 QGridLayout* mLayout = new QGridLayout;
1161 _aogroup->setCurrentIndex(settings.value("startTab").toInt());
1162 mLayout->addWidget(_aogroup, 0,0);
1163 mLayout->addWidget(_mountPointsTable, 1,0);
1164 _loggroup->setCurrentIndex(settings.value("statusTab").toInt());
1165 mLayout->addWidget(_loggroup, 2,0);
1166
1167 _canvas->setLayout(mLayout);
1168
1169 // Enable/Disable all Widgets
1170 // --------------------------
1171 slotBncTextChanged();
1172
1173 // Auto start
1174 // ----------
1175 if ( Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
1176 slotGetData();
1177 }
1178}
1179
1180// Destructor
1181////////////////////////////////////////////////////////////////////////////
1182bncWindow::~bncWindow() {
1183 delete _caster;
1184 delete _casterEph;
1185}
1186
1187//
1188////////////////////////////////////////////////////////////////////////////
1189void bncWindow::populateMountPointsTable() {
1190
1191 for (int iRow = _mountPointsTable->rowCount()-1; iRow >=0; iRow--) {
1192 _mountPointsTable->removeRow(iRow);
1193 }
1194
1195 bncSettings settings;
1196
1197 QListIterator<QString> it(settings.value("mountPoints").toStringList());
1198 if (!it.hasNext()) {
1199 _actGetData->setEnabled(false);
1200 }
1201 int iRow = 0;
1202 while (it.hasNext()) {
1203 QStringList hlp = it.next().split(" ");
1204 if (hlp.size() < 5) continue;
1205 _mountPointsTable->insertRow(iRow);
1206
1207 QUrl url(hlp[0]);
1208
1209 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
1210 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
1211 QString nmea(hlp[4]);
1212 if (hlp[5] == "S") {
1213 fullPath = hlp[0].replace(0,2,"");
1214 }
1215 QString ntripVersion = "2";
1216 if (hlp.size() >= 6) {
1217 ntripVersion = (hlp[5]);
1218 }
1219
1220 QTableWidgetItem* it;
1221 it = new QTableWidgetItem(url.userInfo());
1222 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1223 _mountPointsTable->setItem(iRow, 0, it);
1224
1225 it = new QTableWidgetItem(fullPath);
1226 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1227 _mountPointsTable->setItem(iRow, 1, it);
1228
1229 it = new QTableWidgetItem(format);
1230 _mountPointsTable->setItem(iRow, 2, it);
1231
1232 if (nmea == "yes") {
1233 it = new QTableWidgetItem(latitude);
1234 _mountPointsTable->setItem(iRow, 3, it);
1235 it = new QTableWidgetItem(longitude);
1236 _mountPointsTable->setItem(iRow, 4, it);
1237 } else {
1238 it = new QTableWidgetItem(latitude);
1239 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1240 _mountPointsTable->setItem(iRow, 3, it);
1241 it = new QTableWidgetItem(longitude);
1242 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1243 _mountPointsTable->setItem(iRow, 4, it);
1244 }
1245
1246 it = new QTableWidgetItem(nmea);
1247 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1248 _mountPointsTable->setItem(iRow, 5, it);
1249
1250 it = new QTableWidgetItem(ntripVersion);
1251 //// it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1252 _mountPointsTable->setItem(iRow, 6, it);
1253
1254 bncTableItem* bncIt = new bncTableItem();
1255 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
1256 _mountPointsTable->setItem(iRow, 7, bncIt);
1257
1258 iRow++;
1259 }
1260
1261 _mountPointsTable->sortItems(1);
1262}
1263
1264// Retrieve Table
1265////////////////////////////////////////////////////////////////////////////
1266void bncWindow::slotAddMountPoints() {
1267
1268 bncSettings settings;
1269 QString proxyHost = settings.value("proxyHost").toString();
1270 int proxyPort = settings.value("proxyPort").toInt();
1271 if (proxyHost != _proxyHostLineEdit->text() ||
1272 proxyPort != _proxyPortLineEdit->text().toInt()) {
1273 int iRet = QMessageBox::question(this, "Question", "Proxy options "
1274 "changed. Use the new ones?",
1275 QMessageBox::Yes, QMessageBox::No,
1276 QMessageBox::NoButton);
1277 if (iRet == QMessageBox::Yes) {
1278 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1279 settings.setValue("proxyPort", _proxyPortLineEdit->text());
1280 settings.sync();
1281 }
1282 }
1283
1284 settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
1285 settings.setValue("ignoreSslErrors", _ignoreSslErrorsCheckBox->checkState());
1286 settings.sync();
1287
1288 QMessageBox msgBox;
1289 msgBox.setIcon(QMessageBox::Question);
1290 msgBox.setWindowTitle("Add Stream");
1291 msgBox.setText("Add stream(s) coming from:");
1292
1293 QPushButton* buttonNtrip = msgBox.addButton(tr("Caster"), QMessageBox::ActionRole);
1294 QPushButton* buttonIP = msgBox.addButton(tr("TCP/IP port"), QMessageBox::ActionRole);
1295 QPushButton* buttonUDP = msgBox.addButton(tr("UDP port"), QMessageBox::ActionRole);
1296 QPushButton* buttonSerial = msgBox.addButton(tr("Serial port"), QMessageBox::ActionRole);
1297 QPushButton* buttonCancel = msgBox.addButton(tr("Cancel"), QMessageBox::ActionRole);
1298
1299 msgBox.exec();
1300
1301 if (msgBox.clickedButton() == buttonNtrip) {
1302 bncTableDlg* dlg = new bncTableDlg(this);
1303 dlg->move(this->pos().x()+50, this->pos().y()+50);
1304 connect(dlg, SIGNAL(newMountPoints(QStringList*)),
1305 this, SLOT(slotNewMountPoints(QStringList*)));
1306 dlg->exec();
1307 delete dlg;
1308 } else if (msgBox.clickedButton() == buttonIP) {
1309 bncIpPort* ipp = new bncIpPort(this);
1310 connect(ipp, SIGNAL(newMountPoints(QStringList*)),
1311 this, SLOT(slotNewMountPoints(QStringList*)));
1312 ipp->exec();
1313 delete ipp;
1314 } else if (msgBox.clickedButton() == buttonUDP) {
1315 bncUdpPort* udp = new bncUdpPort(this);
1316 connect(udp, SIGNAL(newMountPoints(QStringList*)),
1317 this, SLOT(slotNewMountPoints(QStringList*)));
1318 udp->exec();
1319 delete udp;
1320 } else if (msgBox.clickedButton() == buttonSerial) {
1321 bncSerialPort* sep = new bncSerialPort(this);
1322 connect(sep, SIGNAL(newMountPoints(QStringList*)),
1323 this, SLOT(slotNewMountPoints(QStringList*)));
1324 sep->exec();
1325 delete sep;
1326 } else if (msgBox.clickedButton() == buttonCancel) {
1327 // Cancel
1328 }
1329}
1330
1331// Delete Selected Mount Points
1332////////////////////////////////////////////////////////////////////////////
1333void bncWindow::slotDeleteMountPoints() {
1334
1335 int nRows = _mountPointsTable->rowCount();
1336 bool flg[nRows];
1337 for (int iRow = 0; iRow < nRows; iRow++) {
1338 if (_mountPointsTable->isItemSelected(_mountPointsTable->item(iRow,1))) {
1339 flg[iRow] = true;
1340 }
1341 else {
1342 flg[iRow] = false;
1343 }
1344 }
1345 for (int iRow = nRows-1; iRow >= 0; iRow--) {
1346 if (flg[iRow]) {
1347 _mountPointsTable->removeRow(iRow);
1348 }
1349 }
1350 _actDeleteMountPoints->setEnabled(false);
1351
1352 if (_mountPointsTable->rowCount() == 0) {
1353 _actGetData->setEnabled(false);
1354 }
1355}
1356
1357// New Mount Points Selected
1358////////////////////////////////////////////////////////////////////////////
1359void bncWindow::slotNewMountPoints(QStringList* mountPoints) {
1360 int iRow = 0;
1361 QListIterator<QString> it(*mountPoints);
1362 while (it.hasNext()) {
1363 QStringList hlp = it.next().split(" ");
1364 QUrl url(hlp[0]);
1365 QString fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
1366 QString format(hlp[1]); QString latitude(hlp[2]); QString longitude(hlp[3]);
1367 QString nmea(hlp[4]);
1368 if (hlp[5] == "S") {
1369 fullPath = hlp[0].replace(0,2,"");
1370 }
1371 QString ntripVersion = "2";
1372 if (hlp.size() >= 6) {
1373 ntripVersion = (hlp[5]);
1374 }
1375
1376 _mountPointsTable->insertRow(iRow);
1377
1378 QTableWidgetItem* it;
1379 it = new QTableWidgetItem(url.userInfo());
1380 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1381 _mountPointsTable->setItem(iRow, 0, it);
1382
1383 it = new QTableWidgetItem(fullPath);
1384 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1385 _mountPointsTable->setItem(iRow, 1, it);
1386
1387 it = new QTableWidgetItem(format);
1388 _mountPointsTable->setItem(iRow, 2, it);
1389
1390 if (nmea == "yes") {
1391 it = new QTableWidgetItem(latitude);
1392 _mountPointsTable->setItem(iRow, 3, it);
1393 it = new QTableWidgetItem(longitude);
1394 _mountPointsTable->setItem(iRow, 4, it);
1395 } else {
1396 it = new QTableWidgetItem(latitude);
1397 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1398 _mountPointsTable->setItem(iRow, 3, it);
1399 it = new QTableWidgetItem(longitude);
1400 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1401 _mountPointsTable->setItem(iRow, 4, it);
1402 }
1403
1404 it = new QTableWidgetItem(nmea);
1405 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1406 _mountPointsTable->setItem(iRow, 5, it);
1407
1408 it = new QTableWidgetItem(ntripVersion);
1409 it->setFlags(it->flags() & ~Qt::ItemIsEditable);
1410 _mountPointsTable->setItem(iRow, 6, it);
1411
1412 bncTableItem* bncIt = new bncTableItem();
1413 _mountPointsTable->setItem(iRow, 7, bncIt);
1414
1415 iRow++;
1416 }
1417 _mountPointsTable->hideColumn(0);
1418 _mountPointsTable->sortItems(1);
1419 if (mountPoints->count() > 0 && !_actStop->isEnabled()) {
1420 _actGetData->setEnabled(true);
1421 }
1422 delete mountPoints;
1423}
1424
1425// Save Options
1426////////////////////////////////////////////////////////////////////////////
1427void bncWindow::slotSaveOptions() {
1428
1429 QStringList mountPoints;
1430 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1431
1432 if (_mountPointsTable->item(iRow, 6)->text() != "S") {
1433 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1434 "@" + _mountPointsTable->item(iRow, 1)->text() );
1435
1436 mountPoints.append(url.toString() + " " +
1437 _mountPointsTable->item(iRow, 2)->text()
1438 + " " + _mountPointsTable->item(iRow, 3)->text()
1439 + " " + _mountPointsTable->item(iRow, 4)->text()
1440 + " " + _mountPointsTable->item(iRow, 5)->text()
1441 + " " + _mountPointsTable->item(iRow, 6)->text());
1442 } else {
1443 mountPoints.append(
1444 "//" + _mountPointsTable->item(iRow, 1)->text()
1445 + " " + _mountPointsTable->item(iRow, 2)->text()
1446 + " " + _mountPointsTable->item(iRow, 3)->text()
1447 + " " + _mountPointsTable->item(iRow, 4)->text()
1448 + " " + _mountPointsTable->item(iRow, 5)->text()
1449 + " " + _mountPointsTable->item(iRow, 6)->text());
1450 }
1451 }
1452
1453 QStringList combineStreams;
1454 for (int iRow = 0; iRow < _cmbTable->rowCount(); iRow++) {
1455 QString hlp;
1456 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
1457 if (_cmbTable->item(iRow, iCol)) {
1458 hlp += _cmbTable->item(iRow, iCol)->text() + " ";
1459 }
1460 }
1461 if (!hlp.isEmpty()) {
1462 combineStreams << hlp;
1463 }
1464 }
1465
1466 QStringList uploadMountpointsOut;
1467 for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
1468 QString hlp;
1469 for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
1470 if (_uploadTable->cellWidget(iRow, iCol) &&
1471 (iCol == 3 || iCol == 4 || iCol == 5)) {
1472 if (iCol == 3) {
1473 QLineEdit* passwd = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
1474 hlp += passwd->text() + ",";
1475 }
1476 else if (iCol == 4) {
1477 QComboBox* system = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
1478 hlp += system->currentText() + ",";
1479 }
1480 else if (iCol == 5) {
1481 QCheckBox* com = (QCheckBox*)(_uploadTable->cellWidget(iRow, iCol));
1482 QString state; state.setNum(com->checkState());
1483 hlp += state + ",";
1484 }
1485 }
1486 else if (_uploadTable->item(iRow, iCol)) {
1487 hlp += _uploadTable->item(iRow, iCol)->text() + ",";
1488 }
1489 }
1490 if (!hlp.isEmpty()) {
1491 uploadMountpointsOut << hlp;
1492 }
1493 }
1494
1495 bncSettings settings;
1496
1497 settings.setValue("adviseFail", _adviseFailSpinBox->value());
1498 settings.setValue("adviseReco", _adviseRecoSpinBox->value());
1499 settings.setValue("adviseScript",_adviseScriptLineEdit->text());
1500 settings.setValue("autoStart", _autoStartCheckBox->checkState());
1501 settings.setValue("binSampl", _binSamplSpinBox->value());
1502 settings.setValue("corrIntr", _corrIntrComboBox->currentText());
1503 settings.setValue("corrPath", _corrPathLineEdit->text());
1504 settings.setValue("corrPort", _corrPortLineEdit->text());
1505 settings.setValue("corrTime", _corrTimeSpinBox->value());
1506 settings.setValue("ephIntr", _ephIntrComboBox->currentText());
1507 settings.setValue("ephPath", _ephPathLineEdit->text());
1508 settings.setValue("ephV3", _ephV3CheckBox->checkState());
1509 settings.setValue("logFile", _logFileLineEdit->text());
1510 settings.setValue("rawOutFile", _rawOutFileLineEdit->text());
1511 settings.setValue("miscMount", _miscMountLineEdit->text());
1512 settings.setValue("pppMount", _pppMountLineEdit->text());
1513 settings.setValue("pppCorrMount",_pppCorrMountLineEdit->text());
1514 settings.setValue("pppSPP", _pppSPPComboBox->currentText());
1515 settings.setValue("nmeaFile", _pppNMEALineEdit->text());
1516 settings.setValue("nmeaPort", _pppNMEAPortLineEdit->text());
1517 settings.setValue("pppSigmaCode",_pppSigCLineEdit->text());
1518 settings.setValue("pppSigmaPhase",_pppSigPLineEdit->text());
1519 settings.setValue("pppSigCrd0",_pppSigCrd0->text());
1520 settings.setValue("pppSigCrdP",_pppSigCrdP->text());
1521 settings.setValue("pppSigTrp0",_pppSigTrp0->text());
1522 settings.setValue("pppSigTrpP",_pppSigTrpP->text());
1523 settings.setValue("pppAverage", _pppAverageLineEdit->text());
1524 settings.setValue("pppQuickStart", _pppQuickStartLineEdit->text());
1525 settings.setValue("pppMaxSolGap", _pppMaxSolGapLineEdit->text());
1526 settings.setValue("pppRefCrdX", _pppRefCrdXLineEdit->text());
1527 settings.setValue("pppRefCrdY", _pppRefCrdYLineEdit->text());
1528 settings.setValue("pppRefCrdZ", _pppRefCrdZLineEdit->text());
1529 settings.setValue("pppRefdN", _pppRefdNLineEdit->text());
1530 settings.setValue("pppRefdE", _pppRefdELineEdit->text());
1531 settings.setValue("pppRefdU", _pppRefdULineEdit->text());
1532 settings.setValue("pppSync", _pppSync->text());
1533 settings.setValue("pppUsePhase", _pppUsePhaseCheckBox->checkState());
1534 settings.setValue("pppPlotCoordinates", _pppPlotCoordinates->checkState());
1535 settings.setValue("pppEstTropo", _pppEstTropoCheckBox->checkState());
1536 settings.setValue("pppGLONASS", _pppGLONASSCheckBox->checkState());
1537 settings.setValue("pppGalileo", _pppGalileoCheckBox->checkState());
1538 settings.setValue("pppAntenna", _pppAntennaLineEdit->text());
1539 settings.setValue("pppAntex", _pppAntexFileChooser->fileName());
1540 settings.setValue("pppApplySatAnt", _pppApplySatAntCheckBox->checkState());
1541 settings.setValue("postProc", _postProcComboBox->currentText());
1542 settings.setValue("mountPoints", mountPoints);
1543 settings.setValue("obsRate", _obsRateComboBox->currentText());
1544 settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
1545 settings.setValue("outEphPort", _outEphPortLineEdit->text());
1546 settings.setValue("outFile", _outFileLineEdit->text());
1547 settings.setValue("outPort", _outPortLineEdit->text());
1548 settings.setValue("outUPort", _outUPortLineEdit->text());
1549 settings.setValue("perfIntr", _perfIntrComboBox->currentText());
1550 settings.setValue("proxyHost", _proxyHostLineEdit->text());
1551 settings.setValue("proxyPort", _proxyPortLineEdit->text());
1552 settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
1553 settings.setValue("ignoreSslErrors", _ignoreSslErrorsCheckBox->checkState());
1554 settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
1555 settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
1556 settings.setValue("rnxPath", _rnxPathLineEdit->text());
1557 settings.setValue("rnxSampl", _rnxSamplSpinBox->value());
1558 settings.setValue("rnxScript", _rnxScrpLineEdit->text());
1559 settings.setValue("rnxSkel", _rnxSkelLineEdit->text());
1560 settings.setValue("rnxV3", _rnxV3CheckBox->checkState());
1561 settings.setValue("scanRTCM", _scanRTCMCheckBox->checkState());
1562 settings.setValue("serialFileNMEA",_serialFileNMEALineEdit->text());
1563 settings.setValue("serialHeightNMEA",_serialHeightNMEALineEdit->text());
1564 settings.setValue("serialAutoNMEA", _serialAutoNMEAComboBox->currentText());
1565 settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText());
1566 settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText());
1567 settings.setValue("serialMountPoint",_serialMountPointLineEdit->text());
1568 settings.setValue("serialParity", _serialParityComboBox->currentText());
1569 settings.setValue("serialPortName", _serialPortNameLineEdit->text());
1570 settings.setValue("serialStopBits", _serialStopBitsComboBox->currentText());
1571 settings.setValue("serialFlowControl",_serialFlowControlComboBox->currentText());
1572 settings.setValue("startTab", _aogroup->currentIndex());
1573 settings.setValue("statusTab", _loggroup->currentIndex());
1574 settings.setValue("waitTime", _waitTimeSpinBox->value());
1575 if (!combineStreams.isEmpty()) {
1576 settings.setValue("combineStreams", combineStreams);
1577 }
1578 else {
1579 settings.setValue("combineStreams", "");
1580 }
1581 settings.setValue("cmbMaxres", _cmbMaxresLineEdit->text());
1582 settings.setValue("cmbMethod", _cmbMethodComboBox->currentText());
1583
1584 if (!uploadMountpointsOut.isEmpty()) {
1585 settings.setValue("uploadMountpointsOut", uploadMountpointsOut);
1586 }
1587 else {
1588 settings.setValue("uploadMountpointsOut", "");
1589 }
1590 settings.setValue("uploadIntr", _uploadIntrComboBox->currentText());
1591 settings.setValue("uploadSampl", _uploadSamplSpinBox->value());
1592 settings.setValue("uploadSamplOrb", _uploadSamplOrbSpinBox->value());
1593
1594 settings.setValue("uploadEphHost", _uploadEphHostLineEdit->text());
1595 settings.setValue("uploadEphPort", _uploadEphPortLineEdit->text());
1596 settings.setValue("uploadEphPassword", _uploadEphPasswordLineEdit->text());
1597 settings.setValue("uploadEphMountpoint",_uploadEphMountpointLineEdit->text());
1598 settings.setValue("uploadEphSample", _uploadEphSampleSpinBox->value());
1599
1600 settings.setValue("postObsFile", _postObsFileChooser->fileName());
1601 settings.setValue("postNavFile", _postNavFileChooser->fileName());
1602 settings.setValue("postCorrFile", _postCorrFileChooser->fileName());
1603 settings.setValue("postOutFile", _postOutLineEdit->text());
1604
1605 if (_caster) {
1606 _caster->slotReadMountPoints();
1607 }
1608 settings.sync();
1609}
1610
1611// All get slots terminated
1612////////////////////////////////////////////////////////////////////////////
1613void bncWindow::slotGetThreadsFinished() {
1614 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true);
1615 delete _caster; _caster = 0;
1616 delete _casterEph; _casterEph = 0;
1617 _actGetData->setEnabled(true);
1618 _actStop->setEnabled(false);
1619}
1620
1621// Retrieve Data
1622////////////////////////////////////////////////////////////////////////////
1623void bncWindow::slotGetData() {
1624 slotSaveOptions();
1625
1626 _bncFigurePPP->reset();
1627
1628 _actDeleteMountPoints->setEnabled(false);
1629 _actGetData->setEnabled(false);
1630 _actStop->setEnabled(true);
1631
1632 _caster = new bncCaster(_outFileLineEdit->text(),
1633 _outPortLineEdit->text().toInt());
1634
1635 ((bncApp*)qApp)->setPort(_outEphPortLineEdit->text().toInt());
1636 ((bncApp*)qApp)->setPortCorr(_corrPortLineEdit->text().toInt());
1637 ((bncApp*)qApp)->initCombination();
1638
1639 connect(_caster, SIGNAL(getThreadsFinished()),
1640 this, SLOT(slotGetThreadsFinished()));
1641
1642 connect (_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)),
1643 this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
1644
1645 ((bncApp*)qApp)->slotMessage("========== Start BNC v" BNCVERSION " =========", true);
1646
1647 bncSettings settings;
1648
1649 QDir rnxdir(settings.value("rnxPath").toString());
1650 if (!rnxdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations directory", true);
1651
1652 QString rnx_file = settings.value("rnxScript").toString();
1653 if ( !rnx_file.isEmpty() ) {
1654 QFile rnxfile(settings.value("rnxScript").toString());
1655 if (!rnxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Observations script", true);
1656 }
1657
1658 QDir ephdir(settings.value("ephPath").toString());
1659 if (!ephdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find RINEX Ephemeris directory", true);
1660
1661 QDir corrdir(settings.value("corrPath").toString());
1662 if (!corrdir.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Broadcast Corrections directory", true);
1663
1664 QString advise_file = settings.value("adviseScript").toString();
1665 if ( !advise_file.isEmpty() ) {
1666 QFile advisefile(settings.value("adviseScript").toString());
1667 if (!advisefile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find Outages script", true);
1668 }
1669
1670 QString ant_file = settings.value("pppAntex").toString();
1671 if ( !ant_file.isEmpty() ) {
1672 QFile anxfile(settings.value("pppAntex").toString());
1673 if (!anxfile.exists()) ((bncApp*)qApp)->slotMessage("Cannot find IGS ANTEX file", true);
1674 }
1675
1676 _caster->slotReadMountPoints();
1677
1678 _casterEph = new bncEphUploadCaster();
1679 connect(_casterEph, SIGNAL(newBytes(QByteArray,double)),
1680 _uploadEphBytesCounter, SLOT(slotNewBytes(QByteArray,double)));
1681}
1682
1683// Retrieve Data
1684////////////////////////////////////////////////////////////////////////////
1685void bncWindow::slotStop() {
1686 int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
1687 QMessageBox::Yes, QMessageBox::No,
1688 QMessageBox::NoButton);
1689 if (iRet == QMessageBox::Yes) {
1690 ((bncApp*)qApp)->stopCombination();
1691 delete _caster; _caster = 0;
1692 delete _casterEph; _casterEph = 0;
1693 _actGetData->setEnabled(true);
1694 _actStop->setEnabled(false);
1695 }
1696}
1697
1698// Close Application gracefully
1699////////////////////////////////////////////////////////////////////////////
1700void bncWindow::closeEvent(QCloseEvent* event) {
1701
1702 int iRet = QMessageBox::question(this, "Close", "Save Options?",
1703 QMessageBox::Yes, QMessageBox::No,
1704 QMessageBox::Cancel);
1705
1706 if (iRet == QMessageBox::Cancel) {
1707 event->ignore();
1708 return;
1709 }
1710 else if (iRet == QMessageBox::Yes) {
1711 slotSaveOptions();
1712 }
1713
1714 QMainWindow::closeEvent(event);
1715}
1716
1717// User changed the selection of mountPoints
1718////////////////////////////////////////////////////////////////////////////
1719void bncWindow::slotSelectionChanged() {
1720 if (_mountPointsTable->selectedItems().isEmpty()) {
1721 _actDeleteMountPoints->setEnabled(false);
1722 }
1723 else {
1724 _actDeleteMountPoints->setEnabled(true);
1725 }
1726}
1727
1728// Display Program Messages
1729////////////////////////////////////////////////////////////////////////////
1730void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) {
1731
1732#ifdef DEBUG_RTCM2_2021
1733 const int maxBufferSize = 1000;
1734#else
1735 const int maxBufferSize = 10000;
1736#endif
1737
1738 if (! showOnScreen ) {
1739 return;
1740 }
1741
1742 QString txt = _log->toPlainText() + "\n" +
1743 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg;
1744 _log->clear();
1745 _log->append(txt.right(maxBufferSize));
1746}
1747
1748// About Message
1749////////////////////////////////////////////////////////////////////////////
1750void bncWindow::slotAbout() {
1751 new bncAboutDlg(0);
1752}
1753
1754//Flowchart
1755////////////////////////////////////////////////////////////////////////////
1756void bncWindow::slotFlowchart() {
1757 new bncFlowchartDlg(0);
1758}
1759
1760// Help Window
1761////////////////////////////////////////////////////////////////////////////
1762void bncWindow::slotHelp() {
1763 QUrl url;
1764 url.setPath(":bnchelp.html");
1765 new bncHlpDlg(0, url);
1766}
1767
1768// Select Fonts
1769////////////////////////////////////////////////////////////////////////////
1770void bncWindow::slotFontSel() {
1771 bool ok;
1772 QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
1773 if (ok) {
1774 bncSettings settings;
1775 settings.setValue("font", newFont.toString());
1776 QApplication::setFont(newFont);
1777 int ww = QFontMetrics(newFont).width('w');
1778 setMinimumSize(60*ww, 80*ww);
1779 resize(60*ww, 80*ww);
1780 }
1781}
1782
1783// Whats This Help
1784void bncWindow::slotWhatsThis() {
1785 QWhatsThis::enterWhatsThisMode();
1786}
1787
1788//
1789////////////////////////////////////////////////////////////////////////////
1790void bncWindow::slotMountPointsRead(QList<bncGetThread*> threads) {
1791 _bncFigure->updateMountPoints();
1792 _bncFigureLate->updateMountPoints();
1793
1794 populateMountPointsTable();
1795 bncSettings settings;
1796 _binSamplSpinBox->setValue(settings.value("binSampl").toInt());
1797 _waitTimeSpinBox->setValue(settings.value("waitTime").toInt());
1798 QListIterator<bncGetThread*> iTh(threads);
1799 while (iTh.hasNext()) {
1800 bncGetThread* thread = iTh.next();
1801 for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
1802 QUrl url( "//" + _mountPointsTable->item(iRow, 0)->text() +
1803 "@" + _mountPointsTable->item(iRow, 1)->text() );
1804 if (url == thread->mountPoint() &&
1805 _mountPointsTable->item(iRow, 3)->text() == thread->latitude() &&
1806 _mountPointsTable->item(iRow, 4)->text() == thread->longitude() ) {
1807 ((bncTableItem*) _mountPointsTable->item(iRow, 7))->setGetThread(thread);
1808 disconnect(thread, SIGNAL(newBytes(QByteArray, double)),
1809 _bncFigure, SLOT(slotNewData(QByteArray, double)));
1810 connect(thread, SIGNAL(newBytes(QByteArray, double)),
1811 _bncFigure, SLOT(slotNewData(QByteArray, double)));
1812 disconnect(thread, SIGNAL(newLatency(QByteArray, double)),
1813 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
1814 connect(thread, SIGNAL(newLatency(QByteArray, double)),
1815 _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
1816 if ( Qt::CheckState(settings.value("pppPlotCoordinates").toInt()) == Qt::Checked) {
1817 disconnect(thread,
1818 SIGNAL(newPosition(bncTime, double, double, double)),
1819 _bncFigurePPP,
1820 SLOT(slotNewPosition(bncTime, double, double, double)));
1821 connect(thread, SIGNAL(newPosition(bncTime, double, double, double)),
1822 _bncFigurePPP,
1823 SLOT(slotNewPosition(bncTime, double, double, double)));
1824 }
1825 break;
1826 }
1827 }
1828 }
1829}
1830
1831//
1832////////////////////////////////////////////////////////////////////////////
1833void bncWindow::CreateMenu() {
1834 // Create Menus
1835 // ------------
1836 _menuFile = menuBar()->addMenu(tr("&File"));
1837 _menuFile->addAction(_actFontSel);
1838 _menuFile->addSeparator();
1839 _menuFile->addAction(_actSaveOpt);
1840 _menuFile->addSeparator();
1841 _menuFile->addAction(_actQuit);
1842
1843 _menuHlp = menuBar()->addMenu(tr("&Help"));
1844 _menuHlp->addAction(_actHelp);
1845 _menuHlp->addAction(_actFlowchart);
1846 _menuHlp->addAction(_actAbout);
1847}
1848
1849// Toolbar
1850////////////////////////////////////////////////////////////////////////////
1851void bncWindow::AddToolbar() {
1852 QToolBar* toolBar = new QToolBar;
1853 addToolBar(Qt::BottomToolBarArea, toolBar);
1854 toolBar->setMovable(false);
1855 toolBar->addAction(_actAddMountPoints);
1856 toolBar->addAction(_actDeleteMountPoints);
1857 toolBar->addAction(_actGetData);
1858 toolBar->addAction(_actStop);
1859 toolBar->addAction(_actPostProcessing);
1860 toolBar->addWidget(new QLabel(" "));
1861 toolBar->addAction(_actwhatsthis);
1862}
1863
1864// About
1865////////////////////////////////////////////////////////////////////////////
1866bncAboutDlg::bncAboutDlg(QWidget* parent) :
1867 QDialog(parent) {
1868
1869 QTextBrowser* tb = new QTextBrowser;
1870 QUrl url; url.setPath(":bncabout.html");
1871 tb->setSource(url);
1872 tb->setReadOnly(true);
1873
1874 int ww = QFontMetrics(font()).width('w');
1875 QPushButton* _closeButton = new QPushButton("Close");
1876 _closeButton->setMaximumWidth(10*ww);
1877 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1878
1879 QGridLayout* dlgLayout = new QGridLayout();
1880 QLabel* img = new QLabel();
1881 img->setPixmap(QPixmap(":ntrip-logo.png"));
1882 dlgLayout->addWidget(img, 0,0);
1883 dlgLayout->addWidget(new QLabel("BKG Ntrip Client (BNC) Version "BNCVERSION), 0,1);
1884 dlgLayout->addWidget(tb,1,0,1,2);
1885 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);
1886
1887 setLayout(dlgLayout);
1888 resize(60*ww, 60*ww);
1889 setWindowTitle("About BNC");
1890 show();
1891}
1892
1893//
1894////////////////////////////////////////////////////////////////////////////
1895bncAboutDlg::~bncAboutDlg() {
1896};
1897
1898// Flowchart
1899////////////////////////////////////////////////////////////////////////////
1900bncFlowchartDlg::bncFlowchartDlg(QWidget* parent) :
1901 QDialog(parent) {
1902
1903 int ww = QFontMetrics(font()).width('w');
1904 QPushButton* _closeButton = new QPushButton("Close");
1905 _closeButton->setMaximumWidth(10*ww);
1906 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
1907
1908 QGridLayout* dlgLayout = new QGridLayout();
1909 QLabel* img = new QLabel();
1910 img->setPixmap(QPixmap(":bncflowchart.png"));
1911 dlgLayout->addWidget(img, 0,0);
1912 dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
1913
1914 setLayout(dlgLayout);
1915 setWindowTitle("Flow Chart");
1916 show();
1917}
1918
1919//
1920////////////////////////////////////////////////////////////////////////////
1921bncFlowchartDlg::~bncFlowchartDlg() {
1922};
1923
1924// Enable/Disable Widget (and change its color)
1925////////////////////////////////////////////////////////////////////////////
1926void bncWindow::enableWidget(bool enable, QWidget* widget) {
1927 const static QPalette paletteWhite(QColor(255, 255, 255));
1928 const static QPalette paletteGray(QColor(230, 230, 230));
1929
1930 widget->setEnabled(enable);
1931 if (enable) {
1932 widget->setPalette(paletteWhite);
1933 }
1934 else {
1935 widget->setPalette(paletteGray);
1936 }
1937}
1938
1939// Bnc Text
1940////////////////////////////////////////////////////////////////////////////
1941void bncWindow::slotBncTextChanged(){
1942
1943 bool enable = true;
1944
1945 // Proxy
1946 //------
1947 if (sender() == 0 || sender() == _proxyHostLineEdit) {
1948 enable = !_proxyHostLineEdit->text().isEmpty();
1949 enableWidget(enable, _proxyPortLineEdit);
1950 }
1951
1952 // RINEX Observations
1953 // ------------------
1954 if (sender() == 0 || sender() == _rnxPathLineEdit) {
1955 enable = !_rnxPathLineEdit->text().isEmpty();
1956 enableWidget(enable, _rnxSamplSpinBox);
1957 enableWidget(enable, _rnxSkelLineEdit);
1958 enableWidget(enable, _rnxScrpLineEdit);
1959 enableWidget(enable, _rnxV3CheckBox);
1960 enableWidget(enable, _rnxIntrComboBox);
1961 }
1962
1963 // RINEX Ephemeris
1964 // ---------------
1965 if (sender() == 0 || sender() == _ephPathLineEdit || sender() == _outEphPortLineEdit) {
1966 enable = !_ephPathLineEdit->text().isEmpty() || !_outEphPortLineEdit->text().isEmpty();
1967 enableWidget(enable, _ephIntrComboBox);
1968 enableWidget(enable, _ephV3CheckBox);
1969 }
1970
1971 // Broadcast Corrections
1972 // ---------------------
1973 if (sender() == 0 || sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) {
1974 enable = !_corrPathLineEdit->text().isEmpty() || !_corrPortLineEdit->text().isEmpty();
1975 enableWidget(enable, _corrIntrComboBox);
1976 }
1977
1978 // Feed Engine
1979 // -----------
1980 if (sender() == 0 || sender() == _outPortLineEdit || sender() == _outFileLineEdit) {
1981 enable = !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty();
1982 enableWidget(enable, _waitTimeSpinBox);
1983 enableWidget(enable, _binSamplSpinBox);
1984 }
1985
1986 // Serial Output
1987 // -------------
1988 if (sender() == 0 || sender() == _serialMountPointLineEdit ||
1989 sender() == _serialAutoNMEAComboBox) {
1990 enable = !_serialMountPointLineEdit->text().isEmpty();
1991 enableWidget(enable, _serialPortNameLineEdit);
1992 enableWidget(enable, _serialBaudRateComboBox);
1993 enableWidget(enable, _serialParityComboBox);
1994 enableWidget(enable, _serialDataBitsComboBox);
1995 enableWidget(enable, _serialStopBitsComboBox);
1996 enableWidget(enable, _serialFlowControlComboBox);
1997 enableWidget(enable, _serialAutoNMEAComboBox);
1998
1999 bool enable2 = enable && _serialAutoNMEAComboBox->currentText() != "Auto";
2000 enableWidget(enable2, _serialFileNMEALineEdit);
2001 }
2002
2003 // Outages
2004 // -------
2005 if (sender() == 0 || sender() == _obsRateComboBox) {
2006 enable = !_obsRateComboBox->currentText().isEmpty();
2007 enableWidget(enable, _adviseFailSpinBox);
2008 enableWidget(enable, _adviseRecoSpinBox);
2009 enableWidget(enable, _adviseScriptLineEdit);
2010 }
2011
2012 // Miscellaneous
2013 // -------------
2014 if (sender() == 0 || sender() == _miscMountLineEdit) {
2015 enable = !_miscMountLineEdit->text().isEmpty();
2016 enableWidget(enable, _perfIntrComboBox);
2017 enableWidget(enable, _scanRTCMCheckBox);
2018 }
2019
2020 // Post Processing
2021 // ---------------
2022 if (sender() == 0
2023 || sender() == _postProcComboBox ) {
2024 enable = (_postProcComboBox->currentText() == "PPP");
2025
2026 bool enable9 = _postProcComboBox->currentText() == "PPP";
2027 enableWidget(enable9, _postObsFileChooser);
2028 enableWidget(enable9, _postNavFileChooser);
2029 enableWidget(enable9, _postCorrFileChooser);
2030 enableWidget(enable9, _postOutLineEdit);
2031 _actPostProcessing->setEnabled(enable9);
2032 if (enable9) {
2033 _actGetData->setEnabled(false);
2034 }
2035 else {
2036 _actGetData->setEnabled(true);
2037 }
2038 }
2039
2040 // PPP Client
2041 // ----------
2042 if (sender() == 0
2043 || sender() == _pppMountLineEdit
2044 || sender() == _pppCorrMountLineEdit
2045 || sender() == _pppRefCrdXLineEdit
2046 || sender() == _pppRefCrdYLineEdit
2047 || sender() == _pppRefCrdZLineEdit
2048 || sender() == _pppRefdNLineEdit
2049 || sender() == _pppRefdELineEdit
2050 || sender() == _pppRefdULineEdit
2051 || sender() == _pppSync
2052 || sender() == _pppSPPComboBox
2053 || sender() == _pppQuickStartLineEdit
2054 || sender() == _pppEstTropoCheckBox
2055 || sender() == _pppUsePhaseCheckBox
2056 || sender() == _pppAntexFileChooser ) {
2057
2058 enable = (!_pppMountLineEdit->text().isEmpty() && !_pppCorrMountLineEdit->text().isEmpty()) ||
2059 (!_pppMountLineEdit->text().isEmpty() && _pppSPPComboBox->currentText() == "SPP");
2060
2061 enableWidget(enable, _pppNMEALineEdit);
2062 enableWidget(enable, _pppNMEAPortLineEdit);
2063 enableWidget(enable, _pppRefCrdXLineEdit);
2064 enableWidget(enable, _pppRefCrdYLineEdit);
2065 enableWidget(enable, _pppRefCrdZLineEdit);
2066 enableWidget(enable, _pppRefdNLineEdit);
2067 enableWidget(enable, _pppRefdELineEdit);
2068 enableWidget(enable, _pppRefdULineEdit);
2069 enableWidget(enable, _pppUsePhaseCheckBox);
2070 enableWidget(enable, _pppPlotCoordinates);
2071 enableWidget(enable, _pppEstTropoCheckBox);
2072 enableWidget(enable, _pppGLONASSCheckBox);
2073 enableWidget(enable, _pppGalileoCheckBox);
2074 enableWidget(enable, _pppAntexFileChooser);
2075 enableWidget(enable, _pppSigCLineEdit);
2076 enableWidget(enable, _pppSigCrd0);
2077 enableWidget(enable, _pppSigCrdP);
2078
2079 bool enable2 = enable && !_pppRefCrdXLineEdit->text().isEmpty() &&
2080 !_pppRefCrdYLineEdit->text().isEmpty() &&
2081 !_pppRefCrdZLineEdit->text().isEmpty();
2082
2083 enableWidget(enable2, _pppAverageLineEdit);
2084 enableWidget(enable2, _pppQuickStartLineEdit);
2085
2086 bool enable3 = enable2 && !_pppQuickStartLineEdit->text().isEmpty();
2087 enableWidget(enable3, _pppMaxSolGapLineEdit);
2088
2089 bool enable4 = enable && !_pppAntexFileChooser->fileName().isEmpty();
2090 enableWidget(enable4, _pppAntennaLineEdit);
2091 enableWidget(enable4, _pppApplySatAntCheckBox);
2092
2093 bool enable5 = enable && _pppEstTropoCheckBox->isChecked() && !_pppMountLineEdit->text().isEmpty();
2094 enableWidget(enable5, _pppSigTrp0);
2095 enableWidget(enable5, _pppSigTrpP);
2096
2097 bool enable6 = enable && _pppUsePhaseCheckBox->isChecked();
2098 enableWidget(enable6, _pppSigPLineEdit);
2099
2100 bool enable7 = enable && _pppSPPComboBox->currentText() == "PPP";
2101 enableWidget(enable7, _pppSync);
2102
2103 bool enable8 = _pppSPPComboBox->currentText() == "PPP";
2104 enableWidget(enable8, _pppCorrMountLineEdit);
2105 }
2106}
2107
2108//
2109////////////////////////////////////////////////////////////////////////////
2110void bncWindow::slotAddCmbRow() {
2111 int iRow = _cmbTable->rowCount();
2112 _cmbTable->insertRow(iRow);
2113 for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
2114 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
2115 }
2116}
2117
2118//
2119////////////////////////////////////////////////////////////////////////////
2120void bncWindow::slotDelCmbRow() {
2121 int nRows = _cmbTable->rowCount();
2122 bool flg[nRows];
2123 for (int iRow = 0; iRow < nRows; iRow++) {
2124 if (_cmbTable->isItemSelected(_cmbTable->item(iRow,1))) {
2125 flg[iRow] = true;
2126 }
2127 else {
2128 flg[iRow] = false;
2129 }
2130 }
2131 for (int iRow = nRows-1; iRow >= 0; iRow--) {
2132 if (flg[iRow]) {
2133 _cmbTable->removeRow(iRow);
2134 }
2135 }
2136}
2137
2138//
2139////////////////////////////////////////////////////////////////////////////
2140void bncWindow::populateCmbTable() {
2141
2142 for (int iRow = _cmbTable->rowCount()-1; iRow >=0; iRow--) {
2143 _cmbTable->removeRow(iRow);
2144 }
2145
2146 bncSettings settings;
2147
2148 int iRow = -1;
2149 QListIterator<QString> it(settings.value("combineStreams").toStringList());
2150 while (it.hasNext()) {
2151 QStringList hlp = it.next().split(" ");
2152 if (hlp.size() > 2) {
2153 ++iRow;
2154 _cmbTable->insertRow(iRow);
2155 }
2156 for (int iCol = 0; iCol < hlp.size(); iCol++) {
2157 _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
2158 }
2159 }
2160}
2161
2162//
2163////////////////////////////////////////////////////////////////////////////
2164void bncWindow::slotAddUploadRow() {
2165 int iRow = _uploadTable->rowCount();
2166 _uploadTable->insertRow(iRow);
2167 for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
2168 if (iCol == 3) {
2169 QLineEdit* passwd = new QLineEdit();
2170 passwd->setFrame(false);
2171 passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
2172 _uploadTable->setCellWidget(iRow, iCol, passwd);
2173 }
2174 else if (iCol == 4) {
2175 QComboBox* system = new QComboBox();
2176 system->setEditable(false);
2177 system->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS95,SIRGAS2000,Custom").split(","));
2178 system->setFrame(false);
2179 _uploadTable->setCellWidget(iRow, iCol, system);
2180 }
2181 else if (iCol == 5) {
2182 QCheckBox* com = new QCheckBox();
2183 _uploadTable->setCellWidget(iRow, iCol, com);
2184 }
2185 else if (iCol == 8) {
2186 bncTableItem* bncIt = new bncTableItem();
2187 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
2188 _uploadTable->setItem(iRow, iCol, bncIt);
2189 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
2190 }
2191 else {
2192 _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(""));
2193 }
2194 }
2195}
2196
2197//
2198////////////////////////////////////////////////////////////////////////////
2199void bncWindow::slotDelUploadRow() {
2200 ((bncApp*)qApp)->_uploadTableItems.clear();
2201 int nRows = _uploadTable->rowCount();
2202 bool flg[nRows];
2203 for (int iRow = 0; iRow < nRows; iRow++) {
2204 if (_uploadTable->isItemSelected(_uploadTable->item(iRow,1))) {
2205 flg[iRow] = true;
2206 }
2207 else {
2208 flg[iRow] = false;
2209 }
2210 }
2211 for (int iRow = nRows-1; iRow >= 0; iRow--) {
2212 if (flg[iRow]) {
2213 _uploadTable->removeRow(iRow);
2214 }
2215 }
2216 for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
2217 ((bncApp*)qApp)->_uploadTableItems[iRow] =
2218 (bncTableItem*) _uploadTable->item(iRow, 8);
2219 }
2220}
2221
2222//
2223////////////////////////////////////////////////////////////////////////////
2224void bncWindow::populateUploadTable() {
2225 for (int iRow = _uploadTable->rowCount()-1; iRow >=0; iRow--) {
2226 _uploadTable->removeRow(iRow);
2227 }
2228
2229 bncSettings settings;
2230
2231 int iRow = -1;
2232 QListIterator<QString> it(settings.value("uploadMountpointsOut").toStringList());
2233 while (it.hasNext()) {
2234 QStringList hlp = it.next().split(",");
2235 if (hlp.size() > 6) {
2236 ++iRow;
2237 _uploadTable->insertRow(iRow);
2238 }
2239 for (int iCol = 0; iCol < hlp.size(); iCol++) {
2240 if (iCol == 3) {
2241 QLineEdit* passwd = new QLineEdit();
2242 passwd->setFrame(false);
2243 passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
2244 passwd->setText(hlp[iCol]);
2245 _uploadTable->setCellWidget(iRow, iCol, passwd);
2246 }
2247 else if (iCol == 4) {
2248 QComboBox* system = new QComboBox();
2249 system->setEditable(false);
2250 system->addItems(QString("IGS05,ETRF2000,NAD83,GDA94,SIRGAS95,SIRGAS2000,Custom").split(","));
2251 system->setFrame(false);
2252 system->setCurrentIndex(system->findText(hlp[iCol]));
2253 _uploadTable->setCellWidget(iRow, iCol, system);
2254 }
2255 else if (iCol == 5) {
2256 QCheckBox* com = new QCheckBox();
2257 if (hlp[iCol].toInt() == Qt::Checked) {
2258 com->setCheckState(Qt::Checked);
2259 }
2260 _uploadTable->setCellWidget(iRow, iCol, com);
2261 }
2262 else if (iCol == 8) {
2263 bncTableItem* bncIt = new bncTableItem();
2264 bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
2265 _uploadTable->setItem(iRow, iCol, bncIt);
2266 ((bncApp*)qApp)->_uploadTableItems[iRow] = bncIt;
2267 }
2268 else {
2269 _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
2270 }
2271 }
2272 }
2273}
2274
2275//
2276////////////////////////////////////////////////////////////////////////////
2277void bncWindow::slotSetUploadTrafo() {
2278 bncCustomTrafo* dlg = new bncCustomTrafo(this);
2279 dlg->exec();
2280 delete dlg;
2281}
2282
2283// Start Post-Processing
2284////////////////////////////////////////////////////////////////////////////
2285void bncWindow::slotStartPostProcessing() {
2286#ifdef USE_POSTPROCESSING
2287 _actPostProcessing->setEnabled(false);
2288 _actPostProcessing->setText("0 Epochs");
2289
2290 slotSaveOptions();
2291
2292 t_postProcessing* postProcessing = new t_postProcessing(this);
2293 connect(postProcessing, SIGNAL(finished()), this, SLOT(slotFinishedPostProcessing()));
2294 connect(postProcessing, SIGNAL(progress(int)), this, SLOT(slotPostProgress(int)));
2295
2296 postProcessing->start();
2297#else
2298 QMessageBox::information(this, "Information",
2299 "Post-Processing Not Permitted");
2300#endif
2301}
2302
2303// Post-Processing Finished
2304////////////////////////////////////////////////////////////////////////////
2305void bncWindow::slotFinishedPostProcessing() {
2306 QMessageBox::information(this, "Information",
2307 "Post-Processing Thread Finished");
2308 _actPostProcessing->setText("Start Post-Processing");
2309 _actPostProcessing->setEnabled(true);
2310}
2311
2312// Progress Bar Change
2313////////////////////////////////////////////////////////////////////////////
2314void bncWindow::slotPostProgress(int nEpo) {
2315 if (_actPostProcessing) {
2316 _actPostProcessing->setText(QString("%1 Epochs").arg(nEpo));
2317 }
2318}
Note: See TracBrowser for help on using the repository browser.