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

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