[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 | *
|
---|
| 37 | * Changes:
|
---|
| 38 | *
|
---|
| 39 | * -----------------------------------------------------------------------*/
|
---|
| 40 |
|
---|
| 41 | #include <iostream>
|
---|
| 42 |
|
---|
[6045] | 43 | #include "pppWidgets.h"
|
---|
[5692] | 44 | #include "qtfilechooser.h"
|
---|
[5694] | 45 | #include "bncsettings.h"
|
---|
[5950] | 46 | #include "bnccore.h"
|
---|
[5692] | 47 |
|
---|
| 48 | using namespace std;
|
---|
| 49 |
|
---|
| 50 | // Constructor
|
---|
| 51 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 52 | t_pppWidgets::t_pppWidgets() {
|
---|
[5699] | 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;
|
---|
[5701] | 57 | _corrMount = new QLineEdit(); _corrMount ->setObjectName("PPP/corrMount"); _widgets << _corrMount;
|
---|
[5699] | 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;
|
---|
[6826] | 61 | _logFile = new QLineEdit(); _logFile ->setObjectName("PPP/logFilePPP"); _widgets << _logFile;
|
---|
[5699] | 62 | _nmeaFile = new QLineEdit(); _nmeaFile ->setObjectName("PPP/nmeaFile"); _widgets << _nmeaFile;
|
---|
[6607] | 63 | _snxtroFile = new QLineEdit(); _snxtroFile ->setObjectName("PPP/snxtroFile"); _widgets << _snxtroFile;
|
---|
| 64 | _snxtroSampl = new QSpinBox(); _snxtroSampl ->setObjectName("PPP/snxtroSampl"); _widgets << _snxtroSampl;
|
---|
[5699] | 65 | _staTable = new QTableWidget(); _staTable ->setObjectName("PPP/staTable"); _widgets << _staTable;
|
---|
| 66 | _lcGPS = new QComboBox(); _lcGPS ->setObjectName("PPP/lcGPS"); _widgets << _lcGPS;
|
---|
| 67 | _lcGLONASS = new QComboBox(); _lcGLONASS ->setObjectName("PPP/lcGLONASS"); _widgets << _lcGLONASS;
|
---|
| 68 | _lcGalileo = new QComboBox(); _lcGalileo ->setObjectName("PPP/lcGalileo"); _widgets << _lcGalileo;
|
---|
[6883] | 69 | _lcBDS = new QComboBox(); _lcBDS ->setObjectName("PPP/lcBDS"); _widgets << _lcBDS;
|
---|
[5699] | 70 | _sigmaC1 = new QLineEdit(); _sigmaC1 ->setObjectName("PPP/sigmaC1"); _widgets << _sigmaC1;
|
---|
| 71 | _sigmaL1 = new QLineEdit(); _sigmaL1 ->setObjectName("PPP/sigmaL1"); _widgets << _sigmaL1;
|
---|
[5961] | 72 | _maxResC1 = new QLineEdit(); _maxResC1 ->setObjectName("PPP/maxResC1"); _widgets << _maxResC1;
|
---|
| 73 | _maxResL1 = new QLineEdit(); _maxResL1 ->setObjectName("PPP/maxResL1"); _widgets << _maxResL1;
|
---|
| 74 | _minObs = new QSpinBox(); _minObs ->setObjectName("PPP/minObs"); _widgets << _minObs;
|
---|
| 75 | _minEle = new QSpinBox(); _minEle ->setObjectName("PPP/minEle"); _widgets << _minEle;
|
---|
| 76 | _eleWgtCode = new QCheckBox(); _eleWgtCode ->setObjectName("PPP/eleWgtCode"); _widgets << _eleWgtCode;
|
---|
| 77 | _eleWgtPhase = new QCheckBox(); _eleWgtPhase ->setObjectName("PPP/eleWgtPhase"); _widgets << _eleWgtPhase;
|
---|
| 78 | _seedingTime = new QLineEdit(); _seedingTime ->setObjectName("PPP/seedingTime"); _widgets << _seedingTime;
|
---|
[5699] | 79 | _corrWaitTime = new QSpinBox(); _corrWaitTime->setObjectName("PPP/corrWaitTime"); _widgets << _corrWaitTime;
|
---|
[5961] | 80 |
|
---|
| 81 | _addStaButton = new QPushButton("Add Station"); _widgets << _addStaButton;
|
---|
| 82 | _delStaButton = new QPushButton("Delete Station"); _widgets << _delStaButton;
|
---|
| 83 |
|
---|
[6718] | 84 | _addStaButton->setWhatsThis(tr("<p>Hit the 'Add Station' button to add a new line to the Station table.</p>"));
|
---|
| 85 | _delStaButton->setWhatsThis(tr("<p>Hit the 'Delete Station' button to delete a highlighted row from the Station table.</p>"));
|
---|
| 86 |
|
---|
[5955] | 87 | _plotCoordinates = new QLineEdit; _plotCoordinates ->setObjectName("PPP/plotCoordinates"); _widgets << _plotCoordinates;
|
---|
| 88 | _mapWinButton = new QPushButton; _mapWinButton ->setObjectName("PPP/mapWinButton"); _widgets << _mapWinButton;
|
---|
| 89 | _useGoogleMap = new QRadioButton; _useGoogleMap ->setObjectName("PPP/useGoogleMap"); _widgets << _useGoogleMap;
|
---|
| 90 | _useOpenStreetMap = new QRadioButton; _useOpenStreetMap->setObjectName("PPP/useOpenStreetMap"); _widgets << _useOpenStreetMap;
|
---|
[6729] | 91 | _audioResponse = new QLineEdit; _audioResponse ->setObjectName("PPP/audioResponse"); _widgets << _audioResponse;
|
---|
[5955] | 92 | _mapWinDotSize = new QLineEdit; _mapWinDotSize ->setObjectName("PPP/mapWinDotSize"); _widgets << _mapWinDotSize;
|
---|
| 93 | _mapWinDotColor = new QComboBox; _mapWinDotColor ->setObjectName("PPP/mapWinDotColor"); _widgets << _mapWinDotColor;
|
---|
| 94 | _mapSpeedSlider = new QSlider; _mapSpeedSlider ->setObjectName("PPP/mapSpeedSlider"); _widgets << _mapSpeedSlider;
|
---|
[5893] | 95 |
|
---|
[5697] | 96 | _dataSource->setEditable(false);
|
---|
[6710] | 97 | _dataSource->addItems(QString(",Real-Time Streams,RINEX Files").split(","));
|
---|
[5699] | 98 | connect(_dataSource, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
|
---|
[5697] | 99 |
|
---|
[6748] | 100 | connect(_snxtroFile, SIGNAL(textChanged(const QString &)),
|
---|
| 101 | this, SLOT(slotPPPTextChanged()));
|
---|
| 102 |
|
---|
[6659] | 103 | slotEnableWidgets();
|
---|
[6656] | 104 |
|
---|
[5697] | 105 | _lcGPS->setEditable(false);
|
---|
[7239] | 106 | #ifdef USE_PPP_SSR_I
|
---|
[7207] | 107 | _lcGPS->addItems(QString("P3,P3&L3").split(","));
|
---|
[7049] | 108 | #else
|
---|
[7261] | 109 | _lcGPS->addItems(QString("no,P1,L1,P1&L1,P2,L2,P2&L2,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
[7049] | 110 | #endif
|
---|
[5697] | 111 |
|
---|
| 112 | _lcGLONASS->setEditable(false);
|
---|
[7261] | 113 | #ifdef USE_PPP_SSR_I
|
---|
| 114 | _lcGLONASS->addItems(QString("no,P3,L3,P3&L3").split(","));
|
---|
| 115 | #else
|
---|
| 116 | _lcGLONASS->addItems(QString("no,P1,L1,P1&L1,P2,L2,P2&L2,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
| 117 | #endif
|
---|
[5697] | 118 |
|
---|
| 119 | _lcGalileo->setEditable(false);
|
---|
[7261] | 120 | #ifdef USE_PPP_SSR_I
|
---|
[5699] | 121 | _lcGalileo->addItems(QString("no,P3,L3,P3&L3").split(","));
|
---|
[7261] | 122 | #else
|
---|
| 123 | _lcGalileo->addItems(QString("no,P1,L1,P1&L1,P5,L5,P5&L5,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
| 124 | #endif
|
---|
[5697] | 125 |
|
---|
[6883] | 126 | _lcBDS->setEditable(false);
|
---|
[7261] | 127 | #ifdef USE_PPP_SSR_I
|
---|
[6883] | 128 | _lcBDS->addItems(QString("no,P3,L3,P3&L3").split(","));
|
---|
[7261] | 129 | #else
|
---|
| 130 | _lcBDS->addItems(QString("no,P2,L2,P2&L2,P7,L7,P7&L7,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
| 131 | #endif
|
---|
[6883] | 132 |
|
---|
[6607] | 133 | _snxtroSampl->setMinimum(0);
|
---|
| 134 | _snxtroSampl->setMaximum(300);
|
---|
| 135 | _snxtroSampl->setSingleStep(30);
|
---|
| 136 | _snxtroSampl->setSuffix(" sec");
|
---|
| 137 |
|
---|
[5962] | 138 | _minObs->setMinimum(4);
|
---|
| 139 | _minObs->setMaximum(6);
|
---|
| 140 | _minObs->setSingleStep(1);
|
---|
| 141 |
|
---|
| 142 | _minEle->setMinimum(0);
|
---|
| 143 | _minEle->setMaximum(20);
|
---|
| 144 | _minEle->setSingleStep(1);
|
---|
| 145 | _minEle->setSuffix(" deg");
|
---|
| 146 |
|
---|
[5698] | 147 | _corrWaitTime->setMinimum(0);
|
---|
| 148 | _corrWaitTime->setMaximum(20);
|
---|
| 149 | _corrWaitTime->setSingleStep(1);
|
---|
| 150 | _corrWaitTime->setSuffix(" sec");
|
---|
| 151 | _corrWaitTime->setSpecialValueText("no");
|
---|
| 152 |
|
---|
[6883] | 153 | _staTable->setColumnCount(10);
|
---|
[5703] | 154 | _staTable->setRowCount(0);
|
---|
[5702] | 155 | _staTable->setHorizontalHeaderLabels(
|
---|
[6883] | 156 | QString("Station,Sigma N,Sigma E,Sigma H,Noise N,Noise E,Noise H,Tropo Sigma,Tropo Noise, NMEA Port").split(","));
|
---|
[5703] | 157 | _staTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
---|
| 158 | _staTable->setSelectionBehavior(QAbstractItemView::SelectRows);
|
---|
| 159 | _staTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
|
---|
| 160 | _staTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
---|
| 161 |
|
---|
| 162 | connect(_addStaButton, SIGNAL(clicked()), this, SLOT(slotAddStation()));
|
---|
| 163 | connect(_delStaButton, SIGNAL(clicked()), this, SLOT(slotDelStation()));
|
---|
[5702] | 164 |
|
---|
[5893] | 165 | _mapWinButton->setText("Open Map");
|
---|
| 166 |
|
---|
[5955] | 167 | _mapWinDotColor->setEditable(false);
|
---|
| 168 | _mapWinDotColor->addItems(QString("red,yellow").split(","));
|
---|
[5893] | 169 |
|
---|
| 170 | _mapSpeedSlider->setOrientation(Qt::Horizontal);
|
---|
| 171 | _mapSpeedSlider->setRange(1, 100);
|
---|
| 172 | _mapSpeedSlider->setTickPosition(QSlider::TicksBelow);
|
---|
| 173 | _mapSpeedSlider->setTickInterval(10);
|
---|
[5950] | 174 | connect(_mapSpeedSlider, SIGNAL(valueChanged(int)), BNC_CORE, SIGNAL(mapSpeedSliderChanged(int)));
|
---|
| 175 |
|
---|
[7052] | 176 | _staTable->setWhatsThis(tr("<p>Specify values for Sigma and white Noise of the Station's North, East and Height coordinates in meters. Specify also a Sigma in meters for a-priory model based Tropospheric delays and for the delay's Noise in meters per second.</p><p>Specifying one record per station is mandatory. BNC will only process data for stations wich are listed here.</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-priory 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-priory 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 for 3600 * 3e-6 = 0.01 meters per hour.</li></ul></p>"));
|
---|
[6715] | 177 |
|
---|
[6743] | 178 | _seedingTime->setWhatsThis(tr("<p>Enter the lenght of a startup period in seconds for which you want to fix the PPP solutions to known a-priory coordinates as introduced through option 'Coordinates'. Adjust 'Sigma N/E/H' in the PPP Stations table according to the coordinates precision. Fixing a-priory 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-priory 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 the PPP solutions during startup to known a-priory coordinates.</p>"));
|
---|
[6720] | 179 |
|
---|
[6996] | 180 | _corrWaitTime->setWhatsThis(tr("<p>Specifying 'no' means that BNC will not wait for clock corrections and process each epoch of observation data immediately after arrival using the satellite clock corrections available at that time.</p><p>Specifying a non-zero value (i.e. 5 sec) means that data will be buffered and the processing of each buffered epoch is postponed till satellite clock corrections not older than '5 sec' (example) become available.</p>"));
|
---|
[6720] | 181 |
|
---|
[7056] | 182 | _plotCoordinates->setWhatsThis(tr("<p>BNC allows to produce a time series plot of coordinate displacements for one of your PPP stations 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'.</p><p>Default is an empty option field, meaning that BNC shall not produce a time series plot of PPP coordinate displacements.</p>"));
|
---|
[6729] | 183 |
|
---|
[7052] | 184 | _mapWinButton->setWhatsThis(tr("<p>You make like to track your rover position using Google Maps or Open Street Map as a background map. Track maps can be produced with BNC in 'Realtime-PPP', 'Realtime-SPP' and 'Post-Processing' mode.</p><p>The 'Open Map' button opens a windows showing a map according to specified options.</p><p>Even in '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 programm needs to download the map data."));
|
---|
[6729] | 185 |
|
---|
[5955] | 186 | _useGoogleMap->setWhatsThis(tr("<p>Specify Google Maps as the background for your rover positions."));
|
---|
[6729] | 187 |
|
---|
[5955] | 188 | _useOpenStreetMap->setWhatsThis(tr("<p>Specify Open Street Map as the background for your rover positions."));
|
---|
[6729] | 189 |
|
---|
[7052] | 190 | _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-priory marker coordinate.</p><p>Default is an empty option field, meaning that you don't want BNC to produce alarm signals.</p>"));
|
---|
[6729] | 191 |
|
---|
[6643] | 192 | _mapWinDotSize->setWhatsThis(tr("<p>Specify the size of dots showing the 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>"));
|
---|
[6729] | 193 |
|
---|
[6643] | 194 | _mapWinDotColor->setWhatsThis(tr("<p>Specify the color of dots showing the rover track on the map.</p>"));
|
---|
[6729] | 195 |
|
---|
[6646] | 196 | _mapSpeedSlider->setWhatsThis(tr("<p>With BNC in PPP post-processing mode you can specify the speed of computations as appropriate for 'Track map' visualization. Note that you can adjust 'speed' on-the-fly while BNC is already processing your observations."));
|
---|
[5895] | 197 |
|
---|
[5696] | 198 | readOptions();
|
---|
[5692] | 199 | }
|
---|
| 200 |
|
---|
[5694] | 201 | //
|
---|
| 202 | ////////////////////////////////////////////////////////////////////////////
|
---|
[5696] | 203 | void t_pppWidgets::readOptions() {
|
---|
| 204 |
|
---|
| 205 | bncSettings settings;
|
---|
| 206 |
|
---|
[5707] | 207 | // ComboBoxes
|
---|
| 208 | // ----------
|
---|
[5696] | 209 | int ii = _dataSource->findText(settings.value(_dataSource->objectName()).toString());
|
---|
| 210 | if (ii != -1) {
|
---|
| 211 | _dataSource->setCurrentIndex(ii);
|
---|
| 212 | }
|
---|
| 213 | ii = _lcGPS->findText(settings.value(_lcGPS->objectName()).toString());
|
---|
| 214 | if (ii != -1) {
|
---|
| 215 | _lcGPS->setCurrentIndex(ii);
|
---|
| 216 | }
|
---|
| 217 | ii = _lcGLONASS->findText(settings.value(_lcGLONASS->objectName()).toString());
|
---|
| 218 | if (ii != -1) {
|
---|
| 219 | _lcGLONASS->setCurrentIndex(ii);
|
---|
| 220 | }
|
---|
| 221 | ii = _lcGalileo->findText(settings.value(_lcGalileo->objectName()).toString());
|
---|
| 222 | if (ii != -1) {
|
---|
| 223 | _lcGalileo->setCurrentIndex(ii);
|
---|
| 224 | }
|
---|
[6883] | 225 | ii = _lcBDS->findText(settings.value(_lcBDS->objectName()).toString());
|
---|
| 226 | if (ii != -1) {
|
---|
| 227 | _lcBDS->setCurrentIndex(ii);
|
---|
| 228 | }
|
---|
[5696] | 229 |
|
---|
[5707] | 230 | // FileChoosers
|
---|
| 231 | // ------------
|
---|
[5696] | 232 | _rinexObs ->setFileName(settings.value(_rinexObs ->objectName()).toString());
|
---|
| 233 | _rinexNav ->setFileName(settings.value(_rinexNav ->objectName()).toString());
|
---|
| 234 | _corrFile ->setFileName(settings.value(_corrFile ->objectName()).toString());
|
---|
| 235 | _crdFile ->setFileName(settings.value(_crdFile ->objectName()).toString());
|
---|
| 236 | _antexFile->setFileName(settings.value(_antexFile->objectName()).toString());
|
---|
| 237 |
|
---|
[5707] | 238 | // LineEdits
|
---|
| 239 | // ---------
|
---|
[5969] | 240 | _corrMount ->setText(settings.value(_corrMount ->objectName()).toString());
|
---|
| 241 | _logFile ->setText(settings.value(_logFile ->objectName()).toString());
|
---|
| 242 | _nmeaFile ->setText(settings.value(_nmeaFile ->objectName()).toString());
|
---|
[6608] | 243 | _snxtroFile ->setText(settings.value(_snxtroFile ->objectName()).toString());
|
---|
[5696] | 244 |
|
---|
[7047] | 245 | if (!settings.value(_sigmaC1->objectName()).toString().isEmpty()) {
|
---|
| 246 | _sigmaC1->setText(settings.value(_sigmaC1->objectName()).toString());
|
---|
| 247 | }
|
---|
| 248 | else {
|
---|
| 249 | _sigmaC1->setText("2.0");
|
---|
| 250 | }
|
---|
| 251 |
|
---|
| 252 | if (!settings.value(_sigmaL1->objectName()).toString().isEmpty()) {
|
---|
| 253 | _sigmaL1->setText(settings.value(_sigmaL1->objectName()).toString());
|
---|
| 254 | }
|
---|
| 255 | else {
|
---|
| 256 | _sigmaL1->setText("0.01");
|
---|
| 257 | }
|
---|
| 258 |
|
---|
| 259 | if (!settings.value(_maxResC1->objectName()).toString().isEmpty()) {
|
---|
| 260 | _maxResC1->setText(settings.value(_maxResC1->objectName()).toString());
|
---|
| 261 | }
|
---|
| 262 | else {
|
---|
[7069] | 263 | _maxResC1->setText("4.0");
|
---|
[7047] | 264 | }
|
---|
| 265 |
|
---|
| 266 | if (!settings.value(_maxResL1->objectName()).toString().isEmpty()) {
|
---|
| 267 | _maxResL1->setText(settings.value(_maxResL1->objectName()).toString());
|
---|
| 268 | }
|
---|
| 269 | else {
|
---|
| 270 | _maxResL1->setText("0.03");
|
---|
| 271 | }
|
---|
| 272 |
|
---|
[7069] | 273 | if (!settings.value(_seedingTime->objectName()).toString().isEmpty()) {
|
---|
| 274 | _seedingTime->setText(settings.value(_seedingTime->objectName()).toString());
|
---|
| 275 | }
|
---|
| 276 | else {
|
---|
[7076] | 277 | _seedingTime->setText("0");
|
---|
[7069] | 278 | }
|
---|
| 279 |
|
---|
[5969] | 280 | // CheckBoxes
|
---|
| 281 | // ----------
|
---|
| 282 | _eleWgtCode ->setCheckState(Qt::CheckState(settings.value(_eleWgtCode ->objectName()).toInt()));
|
---|
| 283 | _eleWgtPhase->setCheckState(Qt::CheckState(settings.value(_eleWgtPhase->objectName()).toInt()));
|
---|
| 284 |
|
---|
| 285 | // SpinBoxex
|
---|
| 286 | // ---------
|
---|
| 287 | _minObs->setValue(settings.value(_minObs->objectName()).toInt());
|
---|
| 288 | _minEle->setValue(settings.value(_minEle->objectName()).toInt());
|
---|
[5696] | 289 | _corrWaitTime->setValue(settings.value(_corrWaitTime->objectName()).toInt());
|
---|
[6653] | 290 | _snxtroSampl->setValue(settings.value(_snxtroSampl->objectName()).toInt());
|
---|
[5707] | 291 |
|
---|
| 292 | // Table with stations
|
---|
| 293 | // -------------------
|
---|
| 294 | for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
|
---|
| 295 | _staTable->removeRow(iRow);
|
---|
| 296 | }
|
---|
| 297 | int iRow = -1;
|
---|
| 298 | QListIterator<QString> it(settings.value(_staTable->objectName()).toStringList());
|
---|
| 299 | while (it.hasNext()) {
|
---|
| 300 | QStringList hlp = it.next().split(",");
|
---|
| 301 | ++iRow;
|
---|
| 302 | _staTable->insertRow(iRow);
|
---|
| 303 | for (int iCol = 0; iCol < hlp.size(); iCol++) {
|
---|
| 304 | _staTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
|
---|
| 305 | }
|
---|
| 306 | }
|
---|
[5893] | 307 |
|
---|
| 308 | // Plots and Maps
|
---|
| 309 | // --------------
|
---|
[5955] | 310 | _plotCoordinates ->setText(settings.value(_plotCoordinates->objectName()).toString());
|
---|
[6729] | 311 | _audioResponse ->setText(settings.value(_audioResponse->objectName()).toString());
|
---|
[5970] | 312 | _useGoogleMap ->setChecked(settings.value(_useGoogleMap->objectName()).toBool());
|
---|
[5955] | 313 | _useOpenStreetMap->setChecked(settings.value(_useOpenStreetMap->objectName()).toBool());
|
---|
| 314 | _mapWinDotSize ->setText(settings.value(_mapWinDotSize->objectName()).toString());
|
---|
[5893] | 315 |
|
---|
[5955] | 316 | ii = _mapWinDotColor->findText(settings.value(_mapWinDotColor->objectName()).toString());
|
---|
[5893] | 317 | if (ii != -1) {
|
---|
[5955] | 318 | _mapWinDotColor->setCurrentIndex(ii);
|
---|
[5893] | 319 | }
|
---|
| 320 |
|
---|
| 321 | int speed = settings.value(_mapSpeedSlider->objectName()).toInt();
|
---|
| 322 | if (speed == 0) speed = _mapSpeedSlider->maximum();
|
---|
| 323 | _mapSpeedSlider->setSliderPosition(speed);
|
---|
[5696] | 324 | }
|
---|
| 325 |
|
---|
| 326 | //
|
---|
| 327 | ////////////////////////////////////////////////////////////////////////////
|
---|
[5694] | 328 | void t_pppWidgets::saveOptions() {
|
---|
| 329 |
|
---|
| 330 | bncSettings settings;
|
---|
| 331 |
|
---|
[5695] | 332 | settings.setValue(_dataSource ->objectName(), _dataSource ->currentText());
|
---|
| 333 | settings.setValue(_rinexObs ->objectName(), _rinexObs ->fileName());
|
---|
| 334 | settings.setValue(_rinexNav ->objectName(), _rinexNav ->fileName());
|
---|
[5701] | 335 | settings.setValue(_corrMount ->objectName(), _corrMount ->text());
|
---|
[5695] | 336 | settings.setValue(_corrFile ->objectName(), _corrFile ->fileName());
|
---|
| 337 | settings.setValue(_crdFile ->objectName(), _crdFile ->fileName());
|
---|
| 338 | settings.setValue(_antexFile ->objectName(), _antexFile ->fileName());
|
---|
| 339 | settings.setValue(_logFile ->objectName(), _logFile ->text());
|
---|
| 340 | settings.setValue(_nmeaFile ->objectName(), _nmeaFile ->text());
|
---|
[6608] | 341 | settings.setValue(_snxtroFile ->objectName(), _snxtroFile ->text());
|
---|
[6653] | 342 | settings.setValue(_snxtroSampl ->objectName(), _snxtroSampl ->value());
|
---|
[5695] | 343 | settings.setValue(_lcGPS ->objectName(), _lcGPS ->currentText());
|
---|
| 344 | settings.setValue(_lcGLONASS ->objectName(), _lcGLONASS ->currentText());
|
---|
| 345 | settings.setValue(_lcGalileo ->objectName(), _lcGalileo ->currentText());
|
---|
[6883] | 346 | settings.setValue(_lcBDS ->objectName(), _lcBDS ->currentText());
|
---|
[5695] | 347 | settings.setValue(_sigmaC1 ->objectName(), _sigmaC1 ->text());
|
---|
| 348 | settings.setValue(_sigmaL1 ->objectName(), _sigmaL1 ->text());
|
---|
| 349 | settings.setValue(_corrWaitTime->objectName(), _corrWaitTime->value());
|
---|
[5969] | 350 | settings.setValue(_maxResC1 ->objectName(), _maxResC1 ->text());
|
---|
| 351 | settings.setValue(_maxResL1 ->objectName(), _maxResL1 ->text());
|
---|
| 352 | settings.setValue(_seedingTime ->objectName(), _seedingTime ->text());
|
---|
| 353 | settings.setValue(_minObs ->objectName(), _minObs ->value());
|
---|
| 354 | settings.setValue(_minEle ->objectName(), _minEle ->value());
|
---|
| 355 | settings.setValue(_eleWgtCode ->objectName(), _eleWgtCode ->checkState());
|
---|
| 356 | settings.setValue(_eleWgtPhase ->objectName(), _eleWgtPhase ->checkState());
|
---|
[5694] | 357 |
|
---|
[5707] | 358 | QStringList staList;
|
---|
| 359 | for (int iRow = 0; iRow < _staTable->rowCount(); iRow++) {
|
---|
| 360 | QString hlp;
|
---|
| 361 | for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
|
---|
| 362 | if (_staTable->item(iRow, iCol)) {
|
---|
| 363 | hlp += _staTable->item(iRow, iCol)->text() + ",";
|
---|
| 364 | }
|
---|
| 365 | }
|
---|
| 366 | if (!hlp.isEmpty()) {
|
---|
| 367 | staList << hlp;
|
---|
| 368 | }
|
---|
| 369 | }
|
---|
| 370 | settings.setValue(_staTable->objectName(), staList);
|
---|
[5894] | 371 |
|
---|
[5955] | 372 | settings.setValue(_plotCoordinates ->objectName(), _plotCoordinates ->text());
|
---|
[6729] | 373 | settings.setValue(_audioResponse ->objectName(), _audioResponse ->text());
|
---|
[5955] | 374 | settings.setValue(_useGoogleMap ->objectName(), _useGoogleMap ->isChecked());
|
---|
| 375 | settings.setValue(_useOpenStreetMap->objectName(), _useOpenStreetMap->isChecked());
|
---|
| 376 | settings.setValue(_mapWinDotSize ->objectName(), _mapWinDotSize ->text());
|
---|
| 377 | settings.setValue(_mapWinDotColor ->objectName(), _mapWinDotColor ->currentText());
|
---|
| 378 | settings.setValue(_mapSpeedSlider ->objectName(), _mapSpeedSlider ->value());
|
---|
[5694] | 379 | }
|
---|
[5699] | 380 |
|
---|
| 381 | //
|
---|
| 382 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 383 | void t_pppWidgets::slotEnableWidgets() {
|
---|
| 384 |
|
---|
| 385 | const static QPalette paletteWhite(QColor(255, 255, 255));
|
---|
| 386 | const static QPalette paletteGray(QColor(230, 230, 230));
|
---|
| 387 |
|
---|
[6710] | 388 | bool allDisabled = _dataSource->currentText() == "";
|
---|
[5699] | 389 | bool realTime = _dataSource->currentText() == "Real-Time Streams";
|
---|
[5701] | 390 | bool rinexFiles = _dataSource->currentText() == "RINEX Files";
|
---|
[5699] | 391 |
|
---|
| 392 | QListIterator<QWidget*> it(_widgets);
|
---|
| 393 | while (it.hasNext()) {
|
---|
[5700] | 394 | QWidget* widget = it.next();
|
---|
| 395 | widget->setEnabled(!allDisabled);
|
---|
[5699] | 396 | }
|
---|
| 397 |
|
---|
[5701] | 398 | if (realTime) {
|
---|
| 399 | _rinexObs->setEnabled(false);
|
---|
| 400 | _rinexNav->setEnabled(false);
|
---|
| 401 | _corrFile->setEnabled(false);
|
---|
| 402 | }
|
---|
| 403 | else if (rinexFiles) {
|
---|
| 404 | _corrMount->setEnabled(false);
|
---|
[6984] | 405 | // _plotCoordinates->setEnabled(false);
|
---|
| 406 | // _audioResponse->setEnabled(false);
|
---|
[5701] | 407 | }
|
---|
| 408 |
|
---|
[6748] | 409 | if ( _snxtroFile->text() != "" && !allDisabled) {
|
---|
| 410 | _snxtroSampl->setEnabled(true);
|
---|
| 411 | }
|
---|
| 412 | else {
|
---|
| 413 | _snxtroSampl->setEnabled(false);
|
---|
| 414 | }
|
---|
| 415 |
|
---|
[5699] | 416 | _dataSource->setEnabled(true);
|
---|
[5700] | 417 |
|
---|
| 418 | it.toFront();
|
---|
| 419 | while (it.hasNext()) {
|
---|
| 420 | QWidget* widget = it.next();
|
---|
| 421 | if (widget->isEnabled()) {
|
---|
| 422 | widget->setPalette(paletteWhite);
|
---|
| 423 | }
|
---|
| 424 | else {
|
---|
| 425 | widget->setPalette(paletteGray);
|
---|
| 426 | }
|
---|
| 427 | }
|
---|
[5699] | 428 | }
|
---|
[5703] | 429 |
|
---|
| 430 | //
|
---|
| 431 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 432 | void t_pppWidgets::slotAddStation() {
|
---|
[5706] | 433 | int iRow = _staTable->rowCount();
|
---|
| 434 | _staTable->insertRow(iRow);
|
---|
| 435 | for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
|
---|
[7045] | 436 | if (iCol == 0) _staTable->setItem(iRow, iCol, new QTableWidgetItem(""));
|
---|
| 437 | if (iCol == 1) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 438 | if (iCol == 2) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 439 | if (iCol == 3) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 440 | if (iCol == 4) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 441 | if (iCol == 5) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 442 | if (iCol == 6) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 443 | if (iCol == 7) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0.1"));
|
---|
| 444 | if (iCol == 8) _staTable->setItem(iRow, iCol, new QTableWidgetItem("3e-6"));
|
---|
[7180] | 445 | if (iCol == 9) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0"));
|
---|
[5706] | 446 | }
|
---|
[5703] | 447 | }
|
---|
| 448 |
|
---|
| 449 | //
|
---|
| 450 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 451 | void t_pppWidgets::slotDelStation() {
|
---|
[5706] | 452 | int nRows = _staTable->rowCount();
|
---|
| 453 | bool flg[nRows];
|
---|
| 454 | for (int iRow = 0; iRow < nRows; iRow++) {
|
---|
| 455 | if (_staTable->isItemSelected(_staTable->item(iRow,1))) {
|
---|
| 456 | flg[iRow] = true;
|
---|
| 457 | }
|
---|
| 458 | else {
|
---|
| 459 | flg[iRow] = false;
|
---|
| 460 | }
|
---|
| 461 | }
|
---|
| 462 | for (int iRow = nRows-1; iRow >= 0; iRow--) {
|
---|
| 463 | if (flg[iRow]) {
|
---|
| 464 | _staTable->removeRow(iRow);
|
---|
| 465 | }
|
---|
| 466 | }
|
---|
[5703] | 467 | }
|
---|
[5707] | 468 |
|
---|
[6748] | 469 | // PPP Text
|
---|
| 470 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 471 | void t_pppWidgets::slotPPPTextChanged(){
|
---|
| 472 |
|
---|
| 473 | const static QPalette paletteWhite(QColor(255, 255, 255));
|
---|
| 474 | const static QPalette paletteGray(QColor(230, 230, 230));
|
---|
| 475 |
|
---|
| 476 | // SNX TRO file sampling
|
---|
| 477 | // ---------------------
|
---|
| 478 | if (sender() == 0 || sender() == _snxtroFile) {
|
---|
| 479 | if ( _snxtroFile->text() != "" ) {
|
---|
| 480 | _snxtroSampl->setEnabled(true);
|
---|
| 481 | _snxtroSampl->setPalette(paletteWhite);
|
---|
| 482 | }
|
---|
| 483 | else {
|
---|
| 484 | _snxtroSampl->setEnabled(false);
|
---|
| 485 | _snxtroSampl->setPalette(paletteGray);
|
---|
| 486 | }
|
---|
| 487 | }
|
---|
| 488 | }
|
---|