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

Last change on this file since 9538 was 9538, checked in by stuerze, 2 years ago

update regarding PPP: pseudo obs tropo completely removed

File size: 29.8 KB
RevLine 
[5692]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 *
[7488]37 * Changes:
[5692]38 *
39 * -----------------------------------------------------------------------*/
40
41#include <iostream>
42
[8252]43#include <QCheckBox>
44#include <QComboBox>
45#include <QHeaderView>
46#include <QLineEdit>
47#include <QPushButton>
48#include <QRadioButton>
49#include <QSpinBox>
50#include <QTableWidget>
51
[6045]52#include "pppWidgets.h"
[5692]53#include "qtfilechooser.h"
[5694]54#include "bncsettings.h"
[5950]55#include "bnccore.h"
[5692]56
57using namespace std;
58
59// Constructor
60////////////////////////////////////////////////////////////////////////////
61t_pppWidgets::t_pppWidgets() {
[5699]62
[7488]63 _dataSource = new QComboBox(); _dataSource ->setObjectName("PPP/dataSource"); _widgets << _dataSource;
64 _rinexObs = new qtFileChooser(); _rinexObs ->setObjectName("PPP/rinexObs"); _widgets << _rinexObs;
65 _rinexNav = new qtFileChooser(); _rinexNav ->setObjectName("PPP/rinexNav"); _widgets << _rinexNav;
[5701]66 _corrMount = new QLineEdit(); _corrMount ->setObjectName("PPP/corrMount"); _widgets << _corrMount;
[7488]67 _corrFile = new qtFileChooser(); _corrFile ->setObjectName("PPP/corrFile"); _widgets << _corrFile;
68 _crdFile = new qtFileChooser(); _crdFile ->setObjectName("PPP/crdFile"); _widgets << _crdFile;
69 _antexFile = new qtFileChooser(); _antexFile ->setObjectName("PPP/antexFile"); _widgets << _antexFile;
[7961]70 _blqFile = new qtFileChooser(); _blqFile ->setObjectName("PPP/blqFile"); _widgets << _blqFile;
[7506]71 _logPath = new QLineEdit(); _logPath ->setObjectName("PPP/logPath"); _widgets << _logPath;
72 _nmeaPath = new QLineEdit(); _nmeaPath ->setObjectName("PPP/nmeaPath"); _widgets << _nmeaPath;
73 _snxtroPath = new QLineEdit(); _snxtroPath ->setObjectName("PPP/snxtroPath"); _widgets << _snxtroPath;
[8403]74 _snxtroSampl = new QComboBox(); _snxtroSampl->setObjectName("PPP/snxtroSampl"); _widgets << _snxtroSampl;
[7500]75 _snxtroIntr = new QComboBox(); _snxtroIntr ->setObjectName("PPP/snxtroIntr"); _widgets << _snxtroIntr;
[7764]76 _snxtroAc = new QLineEdit(); _snxtroAc ->setObjectName("PPP/snxtroAc"); _widgets << _snxtroAc;
77 _snxtroSol = new QLineEdit(); _snxtroSol ->setObjectName("PPP/snxtroSol"); _widgets << _snxtroSol;
[9158]78 _v2filenames = new QCheckBox(); _v2filenames ->setObjectName("PPP/v2filenames"); _widgets << _v2filenames;
[7488]79 _staTable = new QTableWidget(); _staTable ->setObjectName("PPP/staTable"); _widgets << _staTable;
80 _lcGPS = new QComboBox(); _lcGPS ->setObjectName("PPP/lcGPS"); _widgets << _lcGPS;
81 _lcGLONASS = new QComboBox(); _lcGLONASS ->setObjectName("PPP/lcGLONASS"); _widgets << _lcGLONASS;
82 _lcGalileo = new QComboBox(); _lcGalileo ->setObjectName("PPP/lcGalileo"); _widgets << _lcGalileo;
[6883]83 _lcBDS = new QComboBox(); _lcBDS ->setObjectName("PPP/lcBDS"); _widgets << _lcBDS;
[8905]84 _modelObs = new QComboBox(); _modelObs ->setObjectName("PPP/modelObs"); _widgets << _modelObs;
85 _pseudoObs = new QComboBox(); _pseudoObs ->setObjectName("PPP/pseudoObs"); _widgets << _pseudoObs;
[7488]86 _sigmaC1 = new QLineEdit(); _sigmaC1 ->setObjectName("PPP/sigmaC1"); _widgets << _sigmaC1;
87 _sigmaL1 = new QLineEdit(); _sigmaL1 ->setObjectName("PPP/sigmaL1"); _widgets << _sigmaL1;
[9302]88 _sigmaGIM = new QLineEdit(); _sigmaGIM ->setObjectName("PPP/sigmaGIM"); _widgets << _sigmaGIM;
[7488]89 _maxResC1 = new QLineEdit(); _maxResC1 ->setObjectName("PPP/maxResC1"); _widgets << _maxResC1;
90 _maxResL1 = new QLineEdit(); _maxResL1 ->setObjectName("PPP/maxResL1"); _widgets << _maxResL1;
[5961]91 _minObs = new QSpinBox(); _minObs ->setObjectName("PPP/minObs"); _widgets << _minObs;
92 _minEle = new QSpinBox(); _minEle ->setObjectName("PPP/minEle"); _widgets << _minEle;
93 _eleWgtCode = new QCheckBox(); _eleWgtCode ->setObjectName("PPP/eleWgtCode"); _widgets << _eleWgtCode;
94 _eleWgtPhase = new QCheckBox(); _eleWgtPhase ->setObjectName("PPP/eleWgtPhase"); _widgets << _eleWgtPhase;
95 _seedingTime = new QLineEdit(); _seedingTime ->setObjectName("PPP/seedingTime"); _widgets << _seedingTime;
[5699]96 _corrWaitTime = new QSpinBox(); _corrWaitTime->setObjectName("PPP/corrWaitTime"); _widgets << _corrWaitTime;
[5961]97
98 _addStaButton = new QPushButton("Add Station"); _widgets << _addStaButton;
99 _delStaButton = new QPushButton("Delete Station"); _widgets << _delStaButton;
100
[6718]101 _addStaButton->setWhatsThis(tr("<p>Hit the 'Add Station' button to add a new line to the Station table.</p>"));
102 _delStaButton->setWhatsThis(tr("<p>Hit the 'Delete Station' button to delete a highlighted row from the Station table.</p>"));
103
[5955]104 _plotCoordinates = new QLineEdit; _plotCoordinates ->setObjectName("PPP/plotCoordinates"); _widgets << _plotCoordinates;
105 _mapWinButton = new QPushButton; _mapWinButton ->setObjectName("PPP/mapWinButton"); _widgets << _mapWinButton;
[6729]106 _audioResponse = new QLineEdit; _audioResponse ->setObjectName("PPP/audioResponse"); _widgets << _audioResponse;
[5955]107 _mapWinDotSize = new QLineEdit; _mapWinDotSize ->setObjectName("PPP/mapWinDotSize"); _widgets << _mapWinDotSize;
108 _mapWinDotColor = new QComboBox; _mapWinDotColor ->setObjectName("PPP/mapWinDotColor"); _widgets << _mapWinDotColor;
109 _mapSpeedSlider = new QSlider; _mapSpeedSlider ->setObjectName("PPP/mapSpeedSlider"); _widgets << _mapSpeedSlider;
[5893]110
[5697]111 _dataSource->setEditable(false);
[6710]112 _dataSource->addItems(QString(",Real-Time Streams,RINEX Files").split(","));
[5699]113 connect(_dataSource, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
[8905]114 connect(_modelObs, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
115 connect(_snxtroPath, SIGNAL(textChanged(const QString &)), this, SLOT(slotPPPTextChanged()));
116 connect(_snxtroAc, SIGNAL(textChanged(const QString &)), this, SLOT(slotPPPTextChanged()));
117 connect(_snxtroSol, SIGNAL(textChanged(const QString &)), this, SLOT(slotPPPTextChanged()));
[5697]118
[6659]119 slotEnableWidgets();
[6656]120
[5697]121 _lcGPS->setEditable(false);
[7239]122#ifdef USE_PPP_SSR_I
[7207]123 _lcGPS->addItems(QString("P3,P3&L3").split(","));
[7049]124#else
[9494]125 _lcGPS->addItems(QString("no,Pi,Li,Pi&Li").split(","));
[7049]126#endif
[5697]127
128 _lcGLONASS->setEditable(false);
[7261]129#ifdef USE_PPP_SSR_I
130 _lcGLONASS->addItems(QString("no,P3,L3,P3&L3").split(","));
131#else
[9494]132 _lcGLONASS->addItems(QString("no,Pi,Li,Pi&Li").split(","));
[7261]133#endif
[5697]134
135 _lcGalileo->setEditable(false);
[7261]136#ifdef USE_PPP_SSR_I
[5699]137 _lcGalileo->addItems(QString("no,P3,L3,P3&L3").split(","));
[7261]138#else
[9494]139 _lcGalileo->addItems(QString("no,Pi,Li,Pi&Li").split(","));
[7261]140#endif
[5697]141
[6883]142 _lcBDS->setEditable(false);
[7261]143#ifdef USE_PPP_SSR_I
[6883]144 _lcBDS->addItems(QString("no,P3,L3,P3&L3").split(","));
[7261]145#else
[9494]146 _lcBDS->addItems(QString("no,Pi,Li,Pi&Li").split(","));
[7261]147#endif
[6883]148
[8905]149 _modelObs->setEditable(false);
150 _pseudoObs->setEditable(false);
151#ifdef USE_PPP_SSR_I
152 _modelObs->addItems(QString("Ionosphere-free PPP").split(","));
153 _pseudoObs->addItems(QString("no").split(","));
154#else
155 _modelObs->addItems(QString("Ionosphere-free PPP,Uncombined PPP,PPP-RTK,DCM with Code Biases,DCM with Phase Biases").split(","));
[9538]156 _pseudoObs->addItems(QString("no,Ionosphere").split(","));
[8905]157#endif
158
[8403]159 _snxtroSampl->setEditable(false);
160 _snxtroSampl->addItems(QString("1 sec,5 sec,10 sec,30 sec,60 sec,300 sec").split(","));
[6607]161
[7488]162 _snxtroIntr->setEditable(false);
163 _snxtroIntr->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
[7495]164 _snxtroIntr->setCurrentIndex(6);
[7488]165
[9386]166 _minObs->setMinimum(5);
[5962]167 _minObs->setMaximum(6);
168 _minObs->setSingleStep(1);
169
170 _minEle->setMinimum(0);
171 _minEle->setMaximum(20);
172 _minEle->setSingleStep(1);
173 _minEle->setSuffix(" deg");
174
[5698]175 _corrWaitTime->setMinimum(0);
176 _corrWaitTime->setMaximum(20);
177 _corrWaitTime->setSingleStep(1);
178 _corrWaitTime->setSuffix(" sec");
179
[9443]180 _staTable->setColumnCount(11);
[5703]181 _staTable->setRowCount(0);
[5702]182 _staTable->setHorizontalHeaderLabels(
[9443]183 QString("Station,Sigma N,Sigma E,Sigma H,Noise N,Noise E,Noise H,Tropo Sigma,Tropo Noise, Iono Noise, NMEA Port").split(","));
[5703]184 _staTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
185 _staTable->setSelectionBehavior(QAbstractItemView::SelectRows);
[8252]186#if QT_VERSION >= 0x050000
[8231]187 _staTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
[8252]188#endif
[5703]189 _staTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
[7488]190
[5703]191 connect(_addStaButton, SIGNAL(clicked()), this, SLOT(slotAddStation()));
192 connect(_delStaButton, SIGNAL(clicked()), this, SLOT(slotDelStation()));
[5702]193
[5893]194 _mapWinButton->setText("Open Map");
195
[5955]196 _mapWinDotColor->setEditable(false);
197 _mapWinDotColor->addItems(QString("red,yellow").split(","));
[5893]198
199 _mapSpeedSlider->setOrientation(Qt::Horizontal);
200 _mapSpeedSlider->setRange(1, 100);
201 _mapSpeedSlider->setTickPosition(QSlider::TicksBelow);
202 _mapSpeedSlider->setTickInterval(10);
[5950]203 connect(_mapSpeedSlider, SIGNAL(valueChanged(int)), BNC_CORE, SIGNAL(mapSpeedSliderChanged(int)));
204
[7658]205 // WhatsThis, PPP (2)
206 // ------------------
[9485]207 _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><li>Specify a Noise to describe the expected variation of the ionospheric effect over time. Supposing 1Hz observation data, specifying a value of 6e-4 would mean that the ionospheric effect may vary 1800 * 5.5e-4 = 1.0 meters per half an 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. <i>[key: PPP/staTable]</i></p>"));
[6715]208
[7658]209 // WhatsThis, PPP (3)
210 // ------------------
[8010]211 _corrWaitTime->setWhatsThis(tr("<p>Zero value means that BNC processes each epoch of data immediately after its arrival using satellite clock corrections available at that time.</p><p> Specifying a non-zero value (i.e. 5 sec) means that the epochs of data are buffered and the processing of each epoch is postponed till the satellite clock corrections not older than '5 sec' (example) become available. <i>[key: PPP/corrWaitTime]</i><p>"));
212 _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. <i>[key: PPP/seedingTime]</i></p>"));
[6720]213
[7663]214 // WhatsThis, PPP (4)
215 // ------------------
[8010]216 _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. <i>[key: PPP/plotCoordinates]</i></p>"));
217 _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. <i>[key: PPP/audioResponse]</i></p>"));
[7677]218 _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>"));
[8010]219 _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. <i>[key: PPP/mapWinDotSize]</i></p>"));
220 _mapWinDotColor->setWhatsThis(tr("<p>Specify the color of dots showing the rover track on the map. <i>[key: PPP/mapWinDotColor]</i></p>"));
221 _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. <i>[key: PPP/mapSpeedSlider]</i></p>"));
[6729]222
[5696]223 readOptions();
[5692]224}
225
[7488]226//
[5694]227////////////////////////////////////////////////////////////////////////////
[7640]228t_pppWidgets::~t_pppWidgets() {
229 delete _dataSource;
230 delete _rinexObs;
231 delete _rinexNav;
232 delete _corrMount;
233 delete _corrFile;
234 delete _crdFile;
235 delete _antexFile;
[7961]236 delete _blqFile;
[7640]237 delete _logPath;
238 delete _nmeaPath;
239 delete _snxtroPath;
240 delete _snxtroSampl;
241 delete _snxtroIntr;
[7764]242 delete _snxtroAc;
243 delete _snxtroSol;
[9158]244 delete _v2filenames;
[7640]245 for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
246 _staTable->removeRow(iRow);
247 }
248 delete _staTable;
249 delete _lcGPS;
250 delete _lcGLONASS;
251 delete _lcGalileo;
252 delete _lcBDS;
[8905]253 delete _modelObs;
254 delete _pseudoObs;
[7640]255 delete _sigmaC1;
256 delete _sigmaL1;
[9302]257 delete _sigmaGIM;
[7640]258 delete _maxResC1;
259 delete _maxResL1;
260 delete _minObs;
261 delete _minEle;
262 delete _eleWgtCode;
263 delete _eleWgtPhase;
264 delete _seedingTime;
265 delete _corrWaitTime;
266 delete _addStaButton;
267 delete _delStaButton;
268 delete _plotCoordinates;
269 delete _mapWinButton;
270 delete _audioResponse;
271 delete _mapWinDotSize;
272 delete _mapWinDotColor;
273 delete _mapSpeedSlider;
274}
275
276//
277////////////////////////////////////////////////////////////////////////////
[5696]278void t_pppWidgets::readOptions() {
279
280 bncSettings settings;
281
[5707]282 // ComboBoxes
283 // ----------
[5696]284 int ii = _dataSource->findText(settings.value(_dataSource->objectName()).toString());
285 if (ii != -1) {
286 _dataSource->setCurrentIndex(ii);
287 }
288 ii = _lcGPS->findText(settings.value(_lcGPS->objectName()).toString());
289 if (ii != -1) {
290 _lcGPS->setCurrentIndex(ii);
291 }
292 ii = _lcGLONASS->findText(settings.value(_lcGLONASS->objectName()).toString());
293 if (ii != -1) {
294 _lcGLONASS->setCurrentIndex(ii);
295 }
296 ii = _lcGalileo->findText(settings.value(_lcGalileo->objectName()).toString());
297 if (ii != -1) {
298 _lcGalileo->setCurrentIndex(ii);
299 }
[6883]300 ii = _lcBDS->findText(settings.value(_lcBDS->objectName()).toString());
301 if (ii != -1) {
302 _lcBDS->setCurrentIndex(ii);
303 }
[8905]304 ii = _modelObs->findText(settings.value(_modelObs->objectName()).toString());
305 if (ii != -1) {
306 _modelObs->setCurrentIndex(ii);
307 }
308 ii = _pseudoObs->findText(settings.value(_pseudoObs->objectName()).toString());
309 if (ii != -1) {
310 _pseudoObs->setCurrentIndex(ii);
311 }
[7488]312 ii = _snxtroIntr->findText(settings.value(_snxtroIntr->objectName()).toString());
313 if (ii != -1) {
314 _snxtroIntr->setCurrentIndex(ii);
315 }
[5696]316
[5707]317 // FileChoosers
318 // ------------
[5696]319 _rinexObs ->setFileName(settings.value(_rinexObs ->objectName()).toString());
320 _rinexNav ->setFileName(settings.value(_rinexNav ->objectName()).toString());
321 _corrFile ->setFileName(settings.value(_corrFile ->objectName()).toString());
322 _crdFile ->setFileName(settings.value(_crdFile ->objectName()).toString());
323 _antexFile->setFileName(settings.value(_antexFile->objectName()).toString());
[7966]324 _blqFile->setFileName(settings.value(_blqFile->objectName()).toString());
[5696]325
[5707]326 // LineEdits
327 // ---------
[5969]328 _corrMount ->setText(settings.value(_corrMount ->objectName()).toString());
[7506]329 _logPath ->setText(settings.value(_logPath ->objectName()).toString());
330 _nmeaPath ->setText(settings.value(_nmeaPath ->objectName()).toString());
331 _snxtroPath ->setText(settings.value(_snxtroPath ->objectName()).toString());
[7764]332 _snxtroAc ->setText(settings.value(_snxtroAc ->objectName()).toString());
333 _snxtroSol ->setText(settings.value(_snxtroSol ->objectName()).toString());
[5696]334
[7047]335 if (!settings.value(_sigmaC1->objectName()).toString().isEmpty()) {
336 _sigmaC1->setText(settings.value(_sigmaC1->objectName()).toString());
337 }
338 else {
339 _sigmaC1->setText("2.0");
340 }
341
342 if (!settings.value(_sigmaL1->objectName()).toString().isEmpty()) {
343 _sigmaL1->setText(settings.value(_sigmaL1->objectName()).toString());
344 }
345 else {
346 _sigmaL1->setText("0.01");
347 }
348
[9302]349 if (!settings.value(_sigmaGIM->objectName()).toString().isEmpty()) {
350 _sigmaGIM->setText(settings.value(_sigmaGIM->objectName()).toString());
351 }
352 else {
[9386]353 _sigmaGIM->setText("4.0");
[9302]354 }
355
[7047]356 if (!settings.value(_maxResC1->objectName()).toString().isEmpty()) {
357 _maxResC1->setText(settings.value(_maxResC1->objectName()).toString());
358 }
359 else {
[9386]360 _maxResC1->setText("3.0");
[7047]361 }
362
363 if (!settings.value(_maxResL1->objectName()).toString().isEmpty()) {
364 _maxResL1->setText(settings.value(_maxResL1->objectName()).toString());
365 }
[7488]366 else {
[7047]367 _maxResL1->setText("0.03");
368 }
369
[7069]370 if (!settings.value(_seedingTime->objectName()).toString().isEmpty()) {
371 _seedingTime->setText(settings.value(_seedingTime->objectName()).toString());
372 }
373 else {
[7076]374 _seedingTime->setText("0");
[7069]375 }
376
[5969]377 // CheckBoxes
378 // ----------
379 _eleWgtCode ->setCheckState(Qt::CheckState(settings.value(_eleWgtCode ->objectName()).toInt()));
380 _eleWgtPhase->setCheckState(Qt::CheckState(settings.value(_eleWgtPhase->objectName()).toInt()));
[9158]381 _v2filenames->setCheckState(Qt::CheckState(settings.value(_v2filenames->objectName()).toInt()));
[5969]382
383 // SpinBoxex
384 // ---------
385 _minObs->setValue(settings.value(_minObs->objectName()).toInt());
386 _minEle->setValue(settings.value(_minEle->objectName()).toInt());
[5696]387 _corrWaitTime->setValue(settings.value(_corrWaitTime->objectName()).toInt());
[5707]388
[8403]389
390 ii = _snxtroSampl->findText(settings.value(_snxtroSampl->objectName()).toString());
391 if (ii != -1) {
392 _snxtroSampl->setCurrentIndex(ii);
393 }
394
[5707]395 // Table with stations
396 // -------------------
397 for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
398 _staTable->removeRow(iRow);
399 }
400 int iRow = -1;
401 QListIterator<QString> it(settings.value(_staTable->objectName()).toStringList());
402 while (it.hasNext()) {
403 QStringList hlp = it.next().split(",");
404 ++iRow;
405 _staTable->insertRow(iRow);
406 for (int iCol = 0; iCol < hlp.size(); iCol++) {
407 _staTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
408 }
409 }
[5893]410
411 // Plots and Maps
412 // --------------
[5955]413 _plotCoordinates ->setText(settings.value(_plotCoordinates->objectName()).toString());
[6729]414 _audioResponse ->setText(settings.value(_audioResponse->objectName()).toString());
[5955]415 _mapWinDotSize ->setText(settings.value(_mapWinDotSize->objectName()).toString());
[5893]416
[5955]417 ii = _mapWinDotColor->findText(settings.value(_mapWinDotColor->objectName()).toString());
[5893]418 if (ii != -1) {
[5955]419 _mapWinDotColor->setCurrentIndex(ii);
[5893]420 }
421
422 int speed = settings.value(_mapSpeedSlider->objectName()).toInt();
423 if (speed == 0) speed = _mapSpeedSlider->maximum();
424 _mapSpeedSlider->setSliderPosition(speed);
[5696]425}
426
[7488]427//
[5696]428////////////////////////////////////////////////////////////////////////////
[5694]429void t_pppWidgets::saveOptions() {
430
431 bncSettings settings;
432
[5695]433 settings.setValue(_dataSource ->objectName(), _dataSource ->currentText());
434 settings.setValue(_rinexObs ->objectName(), _rinexObs ->fileName());
435 settings.setValue(_rinexNav ->objectName(), _rinexNav ->fileName());
[5701]436 settings.setValue(_corrMount ->objectName(), _corrMount ->text());
[5695]437 settings.setValue(_corrFile ->objectName(), _corrFile ->fileName());
438 settings.setValue(_crdFile ->objectName(), _crdFile ->fileName());
439 settings.setValue(_antexFile ->objectName(), _antexFile ->fileName());
[7966]440 settings.setValue(_blqFile ->objectName(), _blqFile ->fileName());
[7506]441 settings.setValue(_logPath ->objectName(), _logPath ->text());
442 settings.setValue(_nmeaPath ->objectName(), _nmeaPath ->text());
443 settings.setValue(_snxtroPath ->objectName(), _snxtroPath ->text());
[8403]444 settings.setValue(_snxtroSampl ->objectName(), _snxtroSampl ->currentText());
[7764]445 settings.setValue(_snxtroIntr ->objectName(), _snxtroIntr ->currentText());
446 settings.setValue(_snxtroAc ->objectName(), _snxtroAc ->text());
447 settings.setValue(_snxtroSol ->objectName(), _snxtroSol ->text());
[9158]448 settings.setValue(_v2filenames ->objectName(), _v2filenames ->checkState());
[5695]449 settings.setValue(_lcGPS ->objectName(), _lcGPS ->currentText());
450 settings.setValue(_lcGLONASS ->objectName(), _lcGLONASS ->currentText());
451 settings.setValue(_lcGalileo ->objectName(), _lcGalileo ->currentText());
[6883]452 settings.setValue(_lcBDS ->objectName(), _lcBDS ->currentText());
[8905]453 settings.setValue(_modelObs ->objectName(), _modelObs ->currentText());
454 settings.setValue(_pseudoObs ->objectName(), _pseudoObs ->currentText());
[5695]455 settings.setValue(_sigmaC1 ->objectName(), _sigmaC1 ->text());
456 settings.setValue(_sigmaL1 ->objectName(), _sigmaL1 ->text());
[9302]457 settings.setValue(_sigmaGIM ->objectName(), _sigmaGIM ->text());
[5695]458 settings.setValue(_corrWaitTime->objectName(), _corrWaitTime->value());
[5969]459 settings.setValue(_maxResC1 ->objectName(), _maxResC1 ->text());
460 settings.setValue(_maxResL1 ->objectName(), _maxResL1 ->text());
461 settings.setValue(_seedingTime ->objectName(), _seedingTime ->text());
462 settings.setValue(_minObs ->objectName(), _minObs ->value());
463 settings.setValue(_minEle ->objectName(), _minEle ->value());
464 settings.setValue(_eleWgtCode ->objectName(), _eleWgtCode ->checkState());
465 settings.setValue(_eleWgtPhase ->objectName(), _eleWgtPhase ->checkState());
[5694]466
[5707]467 QStringList staList;
468 for (int iRow = 0; iRow < _staTable->rowCount(); iRow++) {
469 QString hlp;
470 for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
471 if (_staTable->item(iRow, iCol)) {
472 hlp += _staTable->item(iRow, iCol)->text() + ",";
473 }
474 }
475 if (!hlp.isEmpty()) {
476 staList << hlp;
477 }
478 }
479 settings.setValue(_staTable->objectName(), staList);
[5894]480
[5955]481 settings.setValue(_plotCoordinates ->objectName(), _plotCoordinates ->text());
[6729]482 settings.setValue(_audioResponse ->objectName(), _audioResponse ->text());
[5955]483 settings.setValue(_mapWinDotSize ->objectName(), _mapWinDotSize ->text());
484 settings.setValue(_mapWinDotColor ->objectName(), _mapWinDotColor ->currentText());
485 settings.setValue(_mapSpeedSlider ->objectName(), _mapSpeedSlider ->value());
[5694]486}
[5699]487
[7488]488//
[5699]489////////////////////////////////////////////////////////////////////////////
490void t_pppWidgets::slotEnableWidgets() {
491
492 const static QPalette paletteWhite(QColor(255, 255, 255));
493 const static QPalette paletteGray(QColor(230, 230, 230));
494
[6710]495 bool allDisabled = _dataSource->currentText() == "";
[5699]496 bool realTime = _dataSource->currentText() == "Real-Time Streams";
[5701]497 bool rinexFiles = _dataSource->currentText() == "RINEX Files";
[8905]498 bool enablePseudoObs;
499 if (_modelObs->currentText() == "PPP-RTK" ||
[9386]500 _modelObs->currentText() == "Ionosphere-free PPP") {
[8905]501 enablePseudoObs = false;
502 }
503 else {
504 enablePseudoObs = true;
505 }
[5699]506
507 QListIterator<QWidget*> it(_widgets);
508 while (it.hasNext()) {
[5700]509 QWidget* widget = it.next();
510 widget->setEnabled(!allDisabled);
[5699]511 }
512
[5701]513 if (realTime) {
[7488]514 _rinexObs->setEnabled(false);
515 _rinexNav->setEnabled(false);
516 _corrFile->setEnabled(false);
[5701]517 }
518 else if (rinexFiles) {
[8905]519 _corrMount ->setEnabled(false);
520 _audioResponse->setEnabled(false);
[5701]521 }
522
[7506]523 if ( _snxtroPath->text() != "" && !allDisabled) {
[7488]524 _snxtroSampl->setEnabled(true);
525 _snxtroIntr ->setEnabled(true);
[7764]526 _snxtroAc ->setEnabled(true);
527 _snxtroSol ->setEnabled(true);
[6748]528 }
529 else {
[7488]530 _snxtroSampl->setEnabled(false);
531 _snxtroIntr ->setEnabled(false);
[7764]532 _snxtroAc ->setEnabled(false);
533 _snxtroSol ->setEnabled(false);
[6748]534 }
535
[8905]536 if (enablePseudoObs) {
537 _pseudoObs->setEnabled(true);
[9302]538 _sigmaGIM->setEnabled(true);
[8905]539 } else {
540 _pseudoObs->setEnabled(false);
[9302]541 _sigmaGIM->setEnabled(false);
[8905]542 }
543
[5699]544 _dataSource->setEnabled(true);
[5700]545
546 it.toFront();
547 while (it.hasNext()) {
548 QWidget* widget = it.next();
549 if (widget->isEnabled()) {
550 widget->setPalette(paletteWhite);
551 }
552 else {
553 widget->setPalette(paletteGray);
554 }
555 }
[5699]556}
[5703]557
[7488]558//
[5703]559////////////////////////////////////////////////////////////////////////////
560void t_pppWidgets::slotAddStation() {
[5706]561 int iRow = _staTable->rowCount();
562 _staTable->insertRow(iRow);
563 for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
[7045]564 if (iCol == 0) _staTable->setItem(iRow, iCol, new QTableWidgetItem(""));
565 if (iCol == 1) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
566 if (iCol == 2) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
567 if (iCol == 3) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
568 if (iCol == 4) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
569 if (iCol == 5) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
570 if (iCol == 6) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
571 if (iCol == 7) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0.1"));
572 if (iCol == 8) _staTable->setItem(iRow, iCol, new QTableWidgetItem("3e-6"));
[9485]573 if (iCol == 9) _staTable->setItem(iRow, iCol, new QTableWidgetItem("6e-4"));
[9443]574 if (iCol == 10) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0"));
[5706]575 }
[5703]576}
577
[7488]578//
[5703]579////////////////////////////////////////////////////////////////////////////
580void t_pppWidgets::slotDelStation() {
[5706]581 int nRows = _staTable->rowCount();
582 bool flg[nRows];
583 for (int iRow = 0; iRow < nRows; iRow++) {
584 if (_staTable->isItemSelected(_staTable->item(iRow,1))) {
585 flg[iRow] = true;
586 }
587 else {
588 flg[iRow] = false;
589 }
590 }
591 for (int iRow = nRows-1; iRow >= 0; iRow--) {
592 if (flg[iRow]) {
593 _staTable->removeRow(iRow);
594 }
595 }
[5703]596}
[5707]597
[6748]598// PPP Text
599////////////////////////////////////////////////////////////////////////////
600void t_pppWidgets::slotPPPTextChanged(){
601
602 const static QPalette paletteWhite(QColor(255, 255, 255));
603 const static QPalette paletteGray(QColor(230, 230, 230));
604
605 // SNX TRO file sampling
606 // ---------------------
[7506]607 if (sender() == 0 || sender() == _snxtroPath) {
608 if ( _snxtroPath->text() != "" ) {
[7488]609 _snxtroSampl->setEnabled(true);
[7764]610 _snxtroIntr ->setEnabled(true);
611 _snxtroAc ->setEnabled(true);
612 _snxtroSol ->setEnabled(true);
[6748]613 _snxtroSampl->setPalette(paletteWhite);
[7764]614 _snxtroIntr ->setPalette(paletteWhite);
615 _snxtroAc ->setPalette(paletteWhite);
616 _snxtroSol ->setPalette(paletteWhite);
[6748]617 }
618 else {
[7488]619 _snxtroSampl->setEnabled(false);
[7764]620 _snxtroIntr ->setEnabled(false);
621 _snxtroAc ->setEnabled(false);
622 _snxtroSol ->setEnabled(false);
[6748]623 _snxtroSampl->setPalette(paletteGray);
[7764]624 _snxtroIntr ->setPalette(paletteGray);
625 _snxtroAc ->setPalette(paletteGray);
626 _snxtroSol ->setPalette(paletteGray);
[6748]627 }
628 }
[8905]629
630
[6748]631}
Note: See TracBrowser for help on using the repository browser.