source: ntrip/trunk/BNC/src/pppWidgets.cpp@ 7701

Last change on this file since 7701 was 7677, checked in by weber, 9 years ago

Documentation completed

File size: 26.6 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25/* -------------------------------------------------------------------------
26 * BKG NTRIP Client
27 * -------------------------------------------------------------------------
28 *
29 * Class: t_pppWidgets
30 *
31 * Purpose: This class stores widgets for PPP options
32 *
33 * Author: L. Mervart
34 *
35 * Created: 29-Jul-2014
36 *
37 * Changes:
38 *
39 * -----------------------------------------------------------------------*/
40
41#include <iostream>
42
43#include "pppWidgets.h"
44#include "qtfilechooser.h"
45#include "bncsettings.h"
46#include "bnccore.h"
47
48using namespace std;
49
50// Constructor
51////////////////////////////////////////////////////////////////////////////
52t_pppWidgets::t_pppWidgets() {
53
54 _dataSource = new QComboBox(); _dataSource ->setObjectName("PPP/dataSource"); _widgets << _dataSource;
55 _rinexObs = new qtFileChooser(); _rinexObs ->setObjectName("PPP/rinexObs"); _widgets << _rinexObs;
56 _rinexNav = new qtFileChooser(); _rinexNav ->setObjectName("PPP/rinexNav"); _widgets << _rinexNav;
57 _corrMount = new QLineEdit(); _corrMount ->setObjectName("PPP/corrMount"); _widgets << _corrMount;
58 _corrFile = new qtFileChooser(); _corrFile ->setObjectName("PPP/corrFile"); _widgets << _corrFile;
59 _crdFile = new qtFileChooser(); _crdFile ->setObjectName("PPP/crdFile"); _widgets << _crdFile;
60 _antexFile = new qtFileChooser(); _antexFile ->setObjectName("PPP/antexFile"); _widgets << _antexFile;
61 _logPath = new QLineEdit(); _logPath ->setObjectName("PPP/logPath"); _widgets << _logPath;
62 _nmeaPath = new QLineEdit(); _nmeaPath ->setObjectName("PPP/nmeaPath"); _widgets << _nmeaPath;
63 _snxtroPath = new QLineEdit(); _snxtroPath ->setObjectName("PPP/snxtroPath"); _widgets << _snxtroPath;
64 _snxtroSampl = new QSpinBox(); _snxtroSampl ->setObjectName("PPP/snxtroSampl"); _widgets << _snxtroSampl;
65 _snxtroIntr = new QComboBox(); _snxtroIntr ->setObjectName("PPP/snxtroIntr"); _widgets << _snxtroIntr;
66 _v3filenames = new QCheckBox(); _v3filenames ->setObjectName("PPP/v3filenames"); _widgets << _v3filenames;
67 _staTable = new QTableWidget(); _staTable ->setObjectName("PPP/staTable"); _widgets << _staTable;
68 _lcGPS = new QComboBox(); _lcGPS ->setObjectName("PPP/lcGPS"); _widgets << _lcGPS;
69 _lcGLONASS = new QComboBox(); _lcGLONASS ->setObjectName("PPP/lcGLONASS"); _widgets << _lcGLONASS;
70 _lcGalileo = new QComboBox(); _lcGalileo ->setObjectName("PPP/lcGalileo"); _widgets << _lcGalileo;
71 _lcBDS = new QComboBox(); _lcBDS ->setObjectName("PPP/lcBDS"); _widgets << _lcBDS;
72 _sigmaC1 = new QLineEdit(); _sigmaC1 ->setObjectName("PPP/sigmaC1"); _widgets << _sigmaC1;
73 _sigmaL1 = new QLineEdit(); _sigmaL1 ->setObjectName("PPP/sigmaL1"); _widgets << _sigmaL1;
74 _maxResC1 = new QLineEdit(); _maxResC1 ->setObjectName("PPP/maxResC1"); _widgets << _maxResC1;
75 _maxResL1 = new QLineEdit(); _maxResL1 ->setObjectName("PPP/maxResL1"); _widgets << _maxResL1;
76 _minObs = new QSpinBox(); _minObs ->setObjectName("PPP/minObs"); _widgets << _minObs;
77 _minEle = new QSpinBox(); _minEle ->setObjectName("PPP/minEle"); _widgets << _minEle;
78 _eleWgtCode = new QCheckBox(); _eleWgtCode ->setObjectName("PPP/eleWgtCode"); _widgets << _eleWgtCode;
79 _eleWgtPhase = new QCheckBox(); _eleWgtPhase ->setObjectName("PPP/eleWgtPhase"); _widgets << _eleWgtPhase;
80 _seedingTime = new QLineEdit(); _seedingTime ->setObjectName("PPP/seedingTime"); _widgets << _seedingTime;
81 _corrWaitTime = new QSpinBox(); _corrWaitTime->setObjectName("PPP/corrWaitTime"); _widgets << _corrWaitTime;
82
83 _addStaButton = new QPushButton("Add Station"); _widgets << _addStaButton;
84 _delStaButton = new QPushButton("Delete Station"); _widgets << _delStaButton;
85
86 _addStaButton->setWhatsThis(tr("<p>Hit the 'Add Station' button to add a new line to the Station table.</p>"));
87 _delStaButton->setWhatsThis(tr("<p>Hit the 'Delete Station' button to delete a highlighted row from the Station table.</p>"));
88
89 _plotCoordinates = new QLineEdit; _plotCoordinates ->setObjectName("PPP/plotCoordinates"); _widgets << _plotCoordinates;
90 _mapWinButton = new QPushButton; _mapWinButton ->setObjectName("PPP/mapWinButton"); _widgets << _mapWinButton;
91 _useGoogleMap = new QRadioButton; _useGoogleMap ->setObjectName("PPP/useGoogleMap"); _widgets << _useGoogleMap;
92 _useOpenStreetMap = new QRadioButton; _useOpenStreetMap->setObjectName("PPP/useOpenStreetMap"); _widgets << _useOpenStreetMap;
93 _audioResponse = new QLineEdit; _audioResponse ->setObjectName("PPP/audioResponse"); _widgets << _audioResponse;
94 _mapWinDotSize = new QLineEdit; _mapWinDotSize ->setObjectName("PPP/mapWinDotSize"); _widgets << _mapWinDotSize;
95 _mapWinDotColor = new QComboBox; _mapWinDotColor ->setObjectName("PPP/mapWinDotColor"); _widgets << _mapWinDotColor;
96 _mapSpeedSlider = new QSlider; _mapSpeedSlider ->setObjectName("PPP/mapSpeedSlider"); _widgets << _mapSpeedSlider;
97
98 _dataSource->setEditable(false);
99 _dataSource->addItems(QString(",Real-Time Streams,RINEX Files").split(","));
100 connect(_dataSource, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
101
102 connect(_snxtroPath, SIGNAL(textChanged(const QString &)),
103 this, SLOT(slotPPPTextChanged()));
104
105 slotEnableWidgets();
106
107 _lcGPS->setEditable(false);
108#ifdef USE_PPP_SSR_I
109 _lcGPS->addItems(QString("P3,P3&L3").split(","));
110#else
111 _lcGPS->addItems(QString("no,P1,L1,P1&L1,P2,L2,P2&L2,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
112#endif
113
114 _lcGLONASS->setEditable(false);
115#ifdef USE_PPP_SSR_I
116 _lcGLONASS->addItems(QString("no,P3,L3,P3&L3").split(","));
117#else
118 _lcGLONASS->addItems(QString("no,P1,L1,P1&L1,P2,L2,P2&L2,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
119#endif
120
121 _lcGalileo->setEditable(false);
122#ifdef USE_PPP_SSR_I
123 _lcGalileo->addItems(QString("no,P3,L3,P3&L3").split(","));
124#else
125 _lcGalileo->addItems(QString("no,P1,L1,P1&L1,P5,L5,P5&L5,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
126#endif
127
128 _lcBDS->setEditable(false);
129#ifdef USE_PPP_SSR_I
130 _lcBDS->addItems(QString("no,P3,L3,P3&L3").split(","));
131#else
132 _lcBDS->addItems(QString("no,P2,L2,P2&L2,P7,L7,P7&L7,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
133#endif
134
135 _snxtroSampl->setMinimum(0);
136 _snxtroSampl->setMaximum(300);
137 _snxtroSampl->setSingleStep(30);
138 _snxtroSampl->setSuffix(" sec");
139
140 _snxtroIntr->setEditable(false);
141 _snxtroIntr->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
142 _snxtroIntr->setCurrentIndex(6);
143
144 _minObs->setMinimum(4);
145 _minObs->setMaximum(6);
146 _minObs->setSingleStep(1);
147
148 _minEle->setMinimum(0);
149 _minEle->setMaximum(20);
150 _minEle->setSingleStep(1);
151 _minEle->setSuffix(" deg");
152
153 _corrWaitTime->setMinimum(0);
154 _corrWaitTime->setMaximum(20);
155 _corrWaitTime->setSingleStep(1);
156 _corrWaitTime->setSuffix(" sec");
157 _corrWaitTime->setSpecialValueText("no");
158
159 _staTable->setColumnCount(10);
160 _staTable->setRowCount(0);
161 _staTable->setHorizontalHeaderLabels(
162 QString("Station,Sigma N,Sigma E,Sigma H,Noise N,Noise E,Noise H,Tropo Sigma,Tropo Noise, NMEA Port").split(","));
163 _staTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
164 _staTable->setSelectionBehavior(QAbstractItemView::SelectRows);
165 _staTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
166 _staTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
167
168 connect(_addStaButton, SIGNAL(clicked()), this, SLOT(slotAddStation()));
169 connect(_delStaButton, SIGNAL(clicked()), this, SLOT(slotDelStation()));
170
171 _mapWinButton->setText("Open Map");
172
173 _mapWinDotColor->setEditable(false);
174 _mapWinDotColor->addItems(QString("red,yellow").split(","));
175
176 _mapSpeedSlider->setOrientation(Qt::Horizontal);
177 _mapSpeedSlider->setRange(1, 100);
178 _mapSpeedSlider->setTickPosition(QSlider::TicksBelow);
179 _mapSpeedSlider->setTickInterval(10);
180 connect(_mapSpeedSlider, SIGNAL(valueChanged(int)), BNC_CORE, SIGNAL(mapSpeedSliderChanged(int)));
181
182 // WhatsThis, PPP (2)
183 // ------------------
184 _staTable->setWhatsThis(tr("<p>Specify values for Sigma and white Noise of the Stations North, East and Height coordinate components in meters. Specify also a Sigma in meters for a priori model based Tropospheric delays and a Sigma in meters per second for the delay's Noise.</p><p>Specifying one record per Station is mandatory. BNC will only process data for stations which are listed here. To define a station, specify the 'Mountpoint' when in 'Real-Time Streams' mode or the 4-character station ID when in 'RINEX Files' mode.</p><p>'Sigma' is meant to describe the uncertainty of a single coordinate or tropospheric delay estimated for one epoch. 'Noise' is meant to describe the variation of estimates from epoch to epoch.</p><p><ul><li>A Sigma of 100.0 meters may be an appropriate choice e.g. for the initial N/E/H coordinates. However, this value may be significantly smaller (i.e. 0.01) for stations with well-known a priori coordinates.</li><li>A Noise of 100.0 meters for the estimated N/E/H coordinates may also be appropriate considering the potential movement of a rover position.</li><li>A value of 0.1 meters may be an appropriate Sigma for the a priori model based Tropospheric delay estimation.</li><li>Specify a Noise to describe the expected variation of the tropospheric effect over time. Supposing 1Hz observation data, specifying a value of 3e-6 would mean that the tropospheric effect may vary 3600 * 3e-6 = 0.01 meters per hour.</li></ul></p><p>You can also specify a 'NMEA Port' to output coordinates in NMEA format through an IP port of your local host.</p>"));
185
186 // WhatsThis, PPP (3)
187 // ------------------
188 _corrWaitTime->setWhatsThis(tr("<p>Specifying 'no' means that BNC will not wait for satellite clock corrections and process each epoch of observation data immediately after arrival using the corrections available at that time.</p><p>Specifying a non-zero value (i.e. 5 sec) means that data will be buffered and their processing is postponed till corrections not older than '5 sec' (example) become available.</p>"));
189 _seedingTime->setWhatsThis(tr("<p>Enter the length of a startup period in seconds for which you want to fix the PPP solutions to known a priori coordinates as introduced through option 'Coordinates file'. Adjust 'Sigma N/E/H' in the PPP Stations table according to the coordinate's precision. Fixing a priori coordinates is done in BNC through setting 'Sigma N/E/H' temporarily to zero.</p><p>This option allows the PPP solution to rapidly converge. It requires that the antenna remains unmoved on the a priori known position throughout the startup period.</p><p>A value of 60 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning that you don't want BNC to fix PPP solutions during startup to an a priori coordinate.</p>"));
190
191 // WhatsThis, PPP (4)
192 // ------------------
193 _plotCoordinates->setWhatsThis(tr("<p>For one of your PPP Stations BNC can produce a time series plot of coordinate displacements in the 'PPP Plot' tab below. Specify a 'Mountpoint' (when in 'Real-Time Streams' mode) or the 4-character station ID (when in 'RINEX Files' mode) to define the station whose coordinate displacements you would like to see plotted.</p><p>Note that this option makes only sense for a stationary receiver with known a priori marker coordinates as specified through PPP option 'Coordinates file'.</p><p>Default is an empty option field, meaning that BNC shall not produce a time series plot of PPP coordinate displacements.</p>"));
194 _audioResponse->setWhatsThis(tr("<p>Specify an 'Audio response' threshold in meters. A beep is produced by BNC whenever a horizontal PPP coordinate component differs by more than the threshold value from the a priori marker coordinate.</p><p>Default is an empty option field, meaning that you don't want BNC to produce alarm signals.</p>"));
195 _mapWinButton->setWhatsThis(tr("<p>You may like to track your rover position using Google Maps or Open Street Map as a background map. A 'Track map' can be produced with BNC in 'Real-Time Streams' or 'RINEX files' PPP mode.</p><p>The 'Open Map' button opens a windows showing a map according to specified options.</p><p>Even in 'RINEX files' post processing mode you should not forget to specify a proxy under the 'Network' tab if that is operated in front of BNC because the program needs to download the map data.</p>"));
196 _useGoogleMap->setWhatsThis(tr("<p>Specify Google Maps as the background for your rover positions.</p>"));
197 _useOpenStreetMap->setWhatsThis(tr("<p>Specify Open Street Map as the background for your rover positions.</p>"));
198 _mapWinDotSize->setWhatsThis(tr("<p>Specify the size of dots showing rover positions on the track map.</p><p>A dot size of '3' may be appropriate. The maximum possible dot size is '10'. An empty option field or a size of '0' would mean that you don't want BNC to show the rover's track on the map.</p>"));
199 _mapWinDotColor->setWhatsThis(tr("<p>Specify the color of dots showing the rover track on the map.</p>"));
200 _mapSpeedSlider->setWhatsThis(tr("<p>With BNC in 'RINEX files' PPP post processing mode you can specify the speed of computations as appropriate for 'Track map' visualization.</p><p>Note that you can adjust 'Post-processing speed' on-the-fly while BNC is already processing your observations.</p>"));
201
202 readOptions();
203}
204
205//
206////////////////////////////////////////////////////////////////////////////
207t_pppWidgets::~t_pppWidgets() {
208 delete _dataSource;
209 delete _rinexObs;
210 delete _rinexNav;
211 delete _corrMount;
212 delete _corrFile;
213 delete _crdFile;
214 delete _antexFile;
215 delete _logPath;
216 delete _nmeaPath;
217 delete _snxtroPath;
218 delete _snxtroSampl;
219 delete _snxtroIntr;
220 delete _v3filenames;
221 for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
222 _staTable->removeRow(iRow);
223 }
224 delete _staTable;
225 delete _lcGPS;
226 delete _lcGLONASS;
227 delete _lcGalileo;
228 delete _lcBDS;
229 delete _sigmaC1;
230 delete _sigmaL1;
231 delete _maxResC1;
232 delete _maxResL1;
233 delete _minObs;
234 delete _minEle;
235 delete _eleWgtCode;
236 delete _eleWgtPhase;
237 delete _seedingTime;
238 delete _corrWaitTime;
239 delete _addStaButton;
240 delete _delStaButton;
241 delete _plotCoordinates;
242 delete _mapWinButton;
243 delete _useGoogleMap;
244 delete _useOpenStreetMap;
245 delete _audioResponse;
246 delete _mapWinDotSize;
247 delete _mapWinDotColor;
248 delete _mapSpeedSlider;
249}
250
251//
252////////////////////////////////////////////////////////////////////////////
253void t_pppWidgets::readOptions() {
254
255 bncSettings settings;
256
257 // ComboBoxes
258 // ----------
259 int ii = _dataSource->findText(settings.value(_dataSource->objectName()).toString());
260 if (ii != -1) {
261 _dataSource->setCurrentIndex(ii);
262 }
263 ii = _lcGPS->findText(settings.value(_lcGPS->objectName()).toString());
264 if (ii != -1) {
265 _lcGPS->setCurrentIndex(ii);
266 }
267 ii = _lcGLONASS->findText(settings.value(_lcGLONASS->objectName()).toString());
268 if (ii != -1) {
269 _lcGLONASS->setCurrentIndex(ii);
270 }
271 ii = _lcGalileo->findText(settings.value(_lcGalileo->objectName()).toString());
272 if (ii != -1) {
273 _lcGalileo->setCurrentIndex(ii);
274 }
275 ii = _lcBDS->findText(settings.value(_lcBDS->objectName()).toString());
276 if (ii != -1) {
277 _lcBDS->setCurrentIndex(ii);
278 }
279 ii = _snxtroIntr->findText(settings.value(_snxtroIntr->objectName()).toString());
280 if (ii != -1) {
281 _snxtroIntr->setCurrentIndex(ii);
282 }
283
284 // FileChoosers
285 // ------------
286 _rinexObs ->setFileName(settings.value(_rinexObs ->objectName()).toString());
287 _rinexNav ->setFileName(settings.value(_rinexNav ->objectName()).toString());
288 _corrFile ->setFileName(settings.value(_corrFile ->objectName()).toString());
289 _crdFile ->setFileName(settings.value(_crdFile ->objectName()).toString());
290 _antexFile->setFileName(settings.value(_antexFile->objectName()).toString());
291
292 // LineEdits
293 // ---------
294 _corrMount ->setText(settings.value(_corrMount ->objectName()).toString());
295 _logPath ->setText(settings.value(_logPath ->objectName()).toString());
296 _nmeaPath ->setText(settings.value(_nmeaPath ->objectName()).toString());
297 _snxtroPath ->setText(settings.value(_snxtroPath ->objectName()).toString());
298
299 if (!settings.value(_sigmaC1->objectName()).toString().isEmpty()) {
300 _sigmaC1->setText(settings.value(_sigmaC1->objectName()).toString());
301 }
302 else {
303 _sigmaC1->setText("2.0");
304 }
305
306 if (!settings.value(_sigmaL1->objectName()).toString().isEmpty()) {
307 _sigmaL1->setText(settings.value(_sigmaL1->objectName()).toString());
308 }
309 else {
310 _sigmaL1->setText("0.01");
311 }
312
313 if (!settings.value(_maxResC1->objectName()).toString().isEmpty()) {
314 _maxResC1->setText(settings.value(_maxResC1->objectName()).toString());
315 }
316 else {
317 _maxResC1->setText("4.0");
318 }
319
320 if (!settings.value(_maxResL1->objectName()).toString().isEmpty()) {
321 _maxResL1->setText(settings.value(_maxResL1->objectName()).toString());
322 }
323 else {
324 _maxResL1->setText("0.03");
325 }
326
327 if (!settings.value(_seedingTime->objectName()).toString().isEmpty()) {
328 _seedingTime->setText(settings.value(_seedingTime->objectName()).toString());
329 }
330 else {
331 _seedingTime->setText("0");
332 }
333
334 // CheckBoxes
335 // ----------
336 _eleWgtCode ->setCheckState(Qt::CheckState(settings.value(_eleWgtCode ->objectName()).toInt()));
337 _eleWgtPhase->setCheckState(Qt::CheckState(settings.value(_eleWgtPhase->objectName()).toInt()));
338 _v3filenames->setCheckState(Qt::CheckState(settings.value(_v3filenames->objectName()).toInt()));
339
340 // SpinBoxex
341 // ---------
342 _minObs->setValue(settings.value(_minObs->objectName()).toInt());
343 _minEle->setValue(settings.value(_minEle->objectName()).toInt());
344 _corrWaitTime->setValue(settings.value(_corrWaitTime->objectName()).toInt());
345 _snxtroSampl->setValue(settings.value(_snxtroSampl->objectName()).toInt());
346
347 // Table with stations
348 // -------------------
349 for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
350 _staTable->removeRow(iRow);
351 }
352 int iRow = -1;
353 QListIterator<QString> it(settings.value(_staTable->objectName()).toStringList());
354 while (it.hasNext()) {
355 QStringList hlp = it.next().split(",");
356 ++iRow;
357 _staTable->insertRow(iRow);
358 for (int iCol = 0; iCol < hlp.size(); iCol++) {
359 _staTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
360 }
361 }
362
363 // Plots and Maps
364 // --------------
365 _plotCoordinates ->setText(settings.value(_plotCoordinates->objectName()).toString());
366 _audioResponse ->setText(settings.value(_audioResponse->objectName()).toString());
367 _useGoogleMap ->setChecked(settings.value(_useGoogleMap->objectName()).toBool());
368 _useOpenStreetMap->setChecked(settings.value(_useOpenStreetMap->objectName()).toBool());
369 _mapWinDotSize ->setText(settings.value(_mapWinDotSize->objectName()).toString());
370
371 ii = _mapWinDotColor->findText(settings.value(_mapWinDotColor->objectName()).toString());
372 if (ii != -1) {
373 _mapWinDotColor->setCurrentIndex(ii);
374 }
375
376 int speed = settings.value(_mapSpeedSlider->objectName()).toInt();
377 if (speed == 0) speed = _mapSpeedSlider->maximum();
378 _mapSpeedSlider->setSliderPosition(speed);
379}
380
381//
382////////////////////////////////////////////////////////////////////////////
383void t_pppWidgets::saveOptions() {
384
385 bncSettings settings;
386
387 settings.setValue(_dataSource ->objectName(), _dataSource ->currentText());
388 settings.setValue(_rinexObs ->objectName(), _rinexObs ->fileName());
389 settings.setValue(_rinexNav ->objectName(), _rinexNav ->fileName());
390 settings.setValue(_corrMount ->objectName(), _corrMount ->text());
391 settings.setValue(_corrFile ->objectName(), _corrFile ->fileName());
392 settings.setValue(_crdFile ->objectName(), _crdFile ->fileName());
393 settings.setValue(_antexFile ->objectName(), _antexFile ->fileName());
394 settings.setValue(_logPath ->objectName(), _logPath ->text());
395 settings.setValue(_nmeaPath ->objectName(), _nmeaPath ->text());
396 settings.setValue(_snxtroPath ->objectName(), _snxtroPath ->text());
397 settings.setValue(_snxtroSampl ->objectName(), _snxtroSampl ->value());
398 settings.setValue(_v3filenames ->objectName(), _v3filenames ->checkState());
399 settings.setValue(_snxtroIntr ->objectName(), _snxtroIntr ->currentText());
400 settings.setValue(_lcGPS ->objectName(), _lcGPS ->currentText());
401 settings.setValue(_lcGLONASS ->objectName(), _lcGLONASS ->currentText());
402 settings.setValue(_lcGalileo ->objectName(), _lcGalileo ->currentText());
403 settings.setValue(_lcBDS ->objectName(), _lcBDS ->currentText());
404 settings.setValue(_sigmaC1 ->objectName(), _sigmaC1 ->text());
405 settings.setValue(_sigmaL1 ->objectName(), _sigmaL1 ->text());
406 settings.setValue(_corrWaitTime->objectName(), _corrWaitTime->value());
407 settings.setValue(_maxResC1 ->objectName(), _maxResC1 ->text());
408 settings.setValue(_maxResL1 ->objectName(), _maxResL1 ->text());
409 settings.setValue(_seedingTime ->objectName(), _seedingTime ->text());
410 settings.setValue(_minObs ->objectName(), _minObs ->value());
411 settings.setValue(_minEle ->objectName(), _minEle ->value());
412 settings.setValue(_eleWgtCode ->objectName(), _eleWgtCode ->checkState());
413 settings.setValue(_eleWgtPhase ->objectName(), _eleWgtPhase ->checkState());
414
415 QStringList staList;
416 for (int iRow = 0; iRow < _staTable->rowCount(); iRow++) {
417 QString hlp;
418 for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
419 if (_staTable->item(iRow, iCol)) {
420 hlp += _staTable->item(iRow, iCol)->text() + ",";
421 }
422 }
423 if (!hlp.isEmpty()) {
424 staList << hlp;
425 }
426 }
427 settings.setValue(_staTable->objectName(), staList);
428
429 settings.setValue(_plotCoordinates ->objectName(), _plotCoordinates ->text());
430 settings.setValue(_audioResponse ->objectName(), _audioResponse ->text());
431 settings.setValue(_useGoogleMap ->objectName(), _useGoogleMap ->isChecked());
432 settings.setValue(_useOpenStreetMap->objectName(), _useOpenStreetMap->isChecked());
433 settings.setValue(_mapWinDotSize ->objectName(), _mapWinDotSize ->text());
434 settings.setValue(_mapWinDotColor ->objectName(), _mapWinDotColor ->currentText());
435 settings.setValue(_mapSpeedSlider ->objectName(), _mapSpeedSlider ->value());
436}
437
438//
439////////////////////////////////////////////////////////////////////////////
440void t_pppWidgets::slotEnableWidgets() {
441
442 const static QPalette paletteWhite(QColor(255, 255, 255));
443 const static QPalette paletteGray(QColor(230, 230, 230));
444
445 bool allDisabled = _dataSource->currentText() == "";
446 bool realTime = _dataSource->currentText() == "Real-Time Streams";
447 bool rinexFiles = _dataSource->currentText() == "RINEX Files";
448
449 QListIterator<QWidget*> it(_widgets);
450 while (it.hasNext()) {
451 QWidget* widget = it.next();
452 widget->setEnabled(!allDisabled);
453 }
454
455 if (realTime) {
456 _rinexObs->setEnabled(false);
457 _rinexNav->setEnabled(false);
458 _corrFile->setEnabled(false);
459 }
460 else if (rinexFiles) {
461 _corrMount->setEnabled(false);
462// _plotCoordinates->setEnabled(false);
463// _audioResponse->setEnabled(false);
464 }
465
466 if ( _snxtroPath->text() != "" && !allDisabled) {
467 _snxtroSampl->setEnabled(true);
468 _snxtroIntr ->setEnabled(true);
469 }
470 else {
471 _snxtroSampl->setEnabled(false);
472 _snxtroIntr ->setEnabled(false);
473 }
474
475 _dataSource->setEnabled(true);
476
477 it.toFront();
478 while (it.hasNext()) {
479 QWidget* widget = it.next();
480 if (widget->isEnabled()) {
481 widget->setPalette(paletteWhite);
482 }
483 else {
484 widget->setPalette(paletteGray);
485 }
486 }
487}
488
489//
490////////////////////////////////////////////////////////////////////////////
491void t_pppWidgets::slotAddStation() {
492 int iRow = _staTable->rowCount();
493 _staTable->insertRow(iRow);
494 for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
495 if (iCol == 0) _staTable->setItem(iRow, iCol, new QTableWidgetItem(""));
496 if (iCol == 1) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
497 if (iCol == 2) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
498 if (iCol == 3) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
499 if (iCol == 4) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
500 if (iCol == 5) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
501 if (iCol == 6) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
502 if (iCol == 7) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0.1"));
503 if (iCol == 8) _staTable->setItem(iRow, iCol, new QTableWidgetItem("3e-6"));
504 if (iCol == 9) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0"));
505 }
506}
507
508//
509////////////////////////////////////////////////////////////////////////////
510void t_pppWidgets::slotDelStation() {
511 int nRows = _staTable->rowCount();
512 bool flg[nRows];
513 for (int iRow = 0; iRow < nRows; iRow++) {
514 if (_staTable->isItemSelected(_staTable->item(iRow,1))) {
515 flg[iRow] = true;
516 }
517 else {
518 flg[iRow] = false;
519 }
520 }
521 for (int iRow = nRows-1; iRow >= 0; iRow--) {
522 if (flg[iRow]) {
523 _staTable->removeRow(iRow);
524 }
525 }
526}
527
528// PPP Text
529////////////////////////////////////////////////////////////////////////////
530void t_pppWidgets::slotPPPTextChanged(){
531
532 const static QPalette paletteWhite(QColor(255, 255, 255));
533 const static QPalette paletteGray(QColor(230, 230, 230));
534
535 // SNX TRO file sampling
536 // ---------------------
537 if (sender() == 0 || sender() == _snxtroPath) {
538 if ( _snxtroPath->text() != "" ) {
539 _snxtroSampl->setEnabled(true);
540 _snxtroIntr->setEnabled(true);
541 _snxtroSampl->setPalette(paletteWhite);
542 _snxtroIntr->setPalette(paletteWhite);
543 }
544 else {
545 _snxtroSampl->setEnabled(false);
546 _snxtroIntr->setEnabled(false);
547 _snxtroSampl->setPalette(paletteGray);
548 _snxtroIntr->setPalette(paletteGray);
549 }
550 }
551}
Note: See TracBrowser for help on using the repository browser.