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