[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 |
|
---|
[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 |
|
---|
[7488] | 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;
|
---|
[7488] | 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;
|
---|
[7506] | 61 | _logPath = new QLineEdit(); _logPath ->setObjectName("PPP/logPath"); _widgets << _logPath;
|
---|
| 62 | _nmeaPath = new QLineEdit(); _nmeaPath ->setObjectName("PPP/nmeaPath"); _widgets << _nmeaPath;
|
---|
| 63 | _snxtroPath = new QLineEdit(); _snxtroPath ->setObjectName("PPP/snxtroPath"); _widgets << _snxtroPath;
|
---|
[8404] | 64 | _snxtroSampl = new QComboBox(); _snxtroSampl->setObjectName("PPP/snxtroSampl"); _widgets << _snxtroSampl;
|
---|
[7500] | 65 | _snxtroIntr = new QComboBox(); _snxtroIntr ->setObjectName("PPP/snxtroIntr"); _widgets << _snxtroIntr;
|
---|
[7764] | 66 | _snxtroAc = new QLineEdit(); _snxtroAc ->setObjectName("PPP/snxtroAc"); _widgets << _snxtroAc;
|
---|
| 67 | _snxtroSol = new QLineEdit(); _snxtroSol ->setObjectName("PPP/snxtroSol"); _widgets << _snxtroSol;
|
---|
[7506] | 68 | _v3filenames = new QCheckBox(); _v3filenames ->setObjectName("PPP/v3filenames"); _widgets << _v3filenames;
|
---|
[7488] | 69 | _staTable = new QTableWidget(); _staTable ->setObjectName("PPP/staTable"); _widgets << _staTable;
|
---|
| 70 | _lcGPS = new QComboBox(); _lcGPS ->setObjectName("PPP/lcGPS"); _widgets << _lcGPS;
|
---|
| 71 | _lcGLONASS = new QComboBox(); _lcGLONASS ->setObjectName("PPP/lcGLONASS"); _widgets << _lcGLONASS;
|
---|
| 72 | _lcGalileo = new QComboBox(); _lcGalileo ->setObjectName("PPP/lcGalileo"); _widgets << _lcGalileo;
|
---|
[6883] | 73 | _lcBDS = new QComboBox(); _lcBDS ->setObjectName("PPP/lcBDS"); _widgets << _lcBDS;
|
---|
[7488] | 74 | _sigmaC1 = new QLineEdit(); _sigmaC1 ->setObjectName("PPP/sigmaC1"); _widgets << _sigmaC1;
|
---|
| 75 | _sigmaL1 = new QLineEdit(); _sigmaL1 ->setObjectName("PPP/sigmaL1"); _widgets << _sigmaL1;
|
---|
| 76 | _maxResC1 = new QLineEdit(); _maxResC1 ->setObjectName("PPP/maxResC1"); _widgets << _maxResC1;
|
---|
| 77 | _maxResL1 = new QLineEdit(); _maxResL1 ->setObjectName("PPP/maxResL1"); _widgets << _maxResL1;
|
---|
[5961] | 78 | _minObs = new QSpinBox(); _minObs ->setObjectName("PPP/minObs"); _widgets << _minObs;
|
---|
| 79 | _minEle = new QSpinBox(); _minEle ->setObjectName("PPP/minEle"); _widgets << _minEle;
|
---|
| 80 | _eleWgtCode = new QCheckBox(); _eleWgtCode ->setObjectName("PPP/eleWgtCode"); _widgets << _eleWgtCode;
|
---|
| 81 | _eleWgtPhase = new QCheckBox(); _eleWgtPhase ->setObjectName("PPP/eleWgtPhase"); _widgets << _eleWgtPhase;
|
---|
| 82 | _seedingTime = new QLineEdit(); _seedingTime ->setObjectName("PPP/seedingTime"); _widgets << _seedingTime;
|
---|
[5699] | 83 | _corrWaitTime = new QSpinBox(); _corrWaitTime->setObjectName("PPP/corrWaitTime"); _widgets << _corrWaitTime;
|
---|
[5961] | 84 |
|
---|
| 85 | _addStaButton = new QPushButton("Add Station"); _widgets << _addStaButton;
|
---|
| 86 | _delStaButton = new QPushButton("Delete Station"); _widgets << _delStaButton;
|
---|
| 87 |
|
---|
[6718] | 88 | _addStaButton->setWhatsThis(tr("<p>Hit the 'Add Station' button to add a new line to the Station table.</p>"));
|
---|
| 89 | _delStaButton->setWhatsThis(tr("<p>Hit the 'Delete Station' button to delete a highlighted row from the Station table.</p>"));
|
---|
| 90 |
|
---|
[5955] | 91 | _plotCoordinates = new QLineEdit; _plotCoordinates ->setObjectName("PPP/plotCoordinates"); _widgets << _plotCoordinates;
|
---|
| 92 | _mapWinButton = new QPushButton; _mapWinButton ->setObjectName("PPP/mapWinButton"); _widgets << _mapWinButton;
|
---|
[6729] | 93 | _audioResponse = new QLineEdit; _audioResponse ->setObjectName("PPP/audioResponse"); _widgets << _audioResponse;
|
---|
[5955] | 94 | _mapWinDotSize = new QLineEdit; _mapWinDotSize ->setObjectName("PPP/mapWinDotSize"); _widgets << _mapWinDotSize;
|
---|
| 95 | _mapWinDotColor = new QComboBox; _mapWinDotColor ->setObjectName("PPP/mapWinDotColor"); _widgets << _mapWinDotColor;
|
---|
| 96 | _mapSpeedSlider = new QSlider; _mapSpeedSlider ->setObjectName("PPP/mapSpeedSlider"); _widgets << _mapSpeedSlider;
|
---|
[5893] | 97 |
|
---|
[5697] | 98 | _dataSource->setEditable(false);
|
---|
[6710] | 99 | _dataSource->addItems(QString(",Real-Time Streams,RINEX Files").split(","));
|
---|
[5699] | 100 | connect(_dataSource, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
|
---|
[5697] | 101 |
|
---|
[7506] | 102 | connect(_snxtroPath, SIGNAL(textChanged(const QString &)),
|
---|
[6748] | 103 | this, SLOT(slotPPPTextChanged()));
|
---|
| 104 |
|
---|
[7764] | 105 | connect(_snxtroAc, SIGNAL(textChanged(const QString &)),
|
---|
| 106 | this, SLOT(slotPPPTextChanged()));
|
---|
| 107 |
|
---|
| 108 | connect(_snxtroSol, SIGNAL(textChanged(const QString &)),
|
---|
| 109 | this, SLOT(slotPPPTextChanged()));
|
---|
| 110 |
|
---|
[6659] | 111 | slotEnableWidgets();
|
---|
[6656] | 112 |
|
---|
[5697] | 113 | _lcGPS->setEditable(false);
|
---|
[7239] | 114 | #ifdef USE_PPP_SSR_I
|
---|
[7207] | 115 | _lcGPS->addItems(QString("P3,P3&L3").split(","));
|
---|
[7049] | 116 | #else
|
---|
[7261] | 117 | _lcGPS->addItems(QString("no,P1,L1,P1&L1,P2,L2,P2&L2,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
[7049] | 118 | #endif
|
---|
[5697] | 119 |
|
---|
| 120 | _lcGLONASS->setEditable(false);
|
---|
[7261] | 121 | #ifdef USE_PPP_SSR_I
|
---|
| 122 | _lcGLONASS->addItems(QString("no,P3,L3,P3&L3").split(","));
|
---|
| 123 | #else
|
---|
| 124 | _lcGLONASS->addItems(QString("no,P1,L1,P1&L1,P2,L2,P2&L2,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
| 125 | #endif
|
---|
[5697] | 126 |
|
---|
| 127 | _lcGalileo->setEditable(false);
|
---|
[7261] | 128 | #ifdef USE_PPP_SSR_I
|
---|
[5699] | 129 | _lcGalileo->addItems(QString("no,P3,L3,P3&L3").split(","));
|
---|
[7261] | 130 | #else
|
---|
| 131 | _lcGalileo->addItems(QString("no,P1,L1,P1&L1,P5,L5,P5&L5,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
| 132 | #endif
|
---|
[5697] | 133 |
|
---|
[6883] | 134 | _lcBDS->setEditable(false);
|
---|
[7261] | 135 | #ifdef USE_PPP_SSR_I
|
---|
[6883] | 136 | _lcBDS->addItems(QString("no,P3,L3,P3&L3").split(","));
|
---|
[7261] | 137 | #else
|
---|
| 138 | _lcBDS->addItems(QString("no,P2,L2,P2&L2,P7,L7,P7&L7,Pi,Li,Pi&Li,P3,L3,P3&L3").split(","));
|
---|
| 139 | #endif
|
---|
[6883] | 140 |
|
---|
[8404] | 141 | _snxtroSampl->setEditable(false);
|
---|
| 142 | _snxtroSampl->addItems(QString("1 sec,5 sec,10 sec,30 sec,60 sec,300 sec").split(","));
|
---|
[6607] | 143 |
|
---|
[7488] | 144 | _snxtroIntr->setEditable(false);
|
---|
| 145 | _snxtroIntr->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
|
---|
[7495] | 146 | _snxtroIntr->setCurrentIndex(6);
|
---|
[7488] | 147 |
|
---|
[5962] | 148 | _minObs->setMinimum(4);
|
---|
| 149 | _minObs->setMaximum(6);
|
---|
| 150 | _minObs->setSingleStep(1);
|
---|
| 151 |
|
---|
| 152 | _minEle->setMinimum(0);
|
---|
| 153 | _minEle->setMaximum(20);
|
---|
| 154 | _minEle->setSingleStep(1);
|
---|
| 155 | _minEle->setSuffix(" deg");
|
---|
| 156 |
|
---|
[5698] | 157 | _corrWaitTime->setMinimum(0);
|
---|
| 158 | _corrWaitTime->setMaximum(20);
|
---|
| 159 | _corrWaitTime->setSingleStep(1);
|
---|
| 160 | _corrWaitTime->setSuffix(" sec");
|
---|
| 161 |
|
---|
[6883] | 162 | _staTable->setColumnCount(10);
|
---|
[5703] | 163 | _staTable->setRowCount(0);
|
---|
[5702] | 164 | _staTable->setHorizontalHeaderLabels(
|
---|
[6883] | 165 | QString("Station,Sigma N,Sigma E,Sigma H,Noise N,Noise E,Noise H,Tropo Sigma,Tropo Noise, NMEA Port").split(","));
|
---|
[5703] | 166 | _staTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
---|
| 167 | _staTable->setSelectionBehavior(QAbstractItemView::SelectRows);
|
---|
| 168 | _staTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
|
---|
| 169 | _staTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
---|
[7488] | 170 |
|
---|
[5703] | 171 | connect(_addStaButton, SIGNAL(clicked()), this, SLOT(slotAddStation()));
|
---|
| 172 | connect(_delStaButton, SIGNAL(clicked()), this, SLOT(slotDelStation()));
|
---|
[5702] | 173 |
|
---|
[5893] | 174 | _mapWinButton->setText("Open Map");
|
---|
| 175 |
|
---|
[5955] | 176 | _mapWinDotColor->setEditable(false);
|
---|
| 177 | _mapWinDotColor->addItems(QString("red,yellow").split(","));
|
---|
[5893] | 178 |
|
---|
| 179 | _mapSpeedSlider->setOrientation(Qt::Horizontal);
|
---|
| 180 | _mapSpeedSlider->setRange(1, 100);
|
---|
| 181 | _mapSpeedSlider->setTickPosition(QSlider::TicksBelow);
|
---|
| 182 | _mapSpeedSlider->setTickInterval(10);
|
---|
[5950] | 183 | connect(_mapSpeedSlider, SIGNAL(valueChanged(int)), BNC_CORE, SIGNAL(mapSpeedSliderChanged(int)));
|
---|
| 184 |
|
---|
[7658] | 185 | // WhatsThis, PPP (2)
|
---|
| 186 | // ------------------
|
---|
[7677] | 187 | _staTable->setWhatsThis(tr("<p>Specify values for Sigma and white Noise of the Stations North, East and Height coordinate components in meters. Specify also a Sigma in meters for a priori model based Tropospheric delays and a Sigma in meters per second for the delay's Noise.</p><p>Specifying one record per Station is mandatory. BNC will only process data for stations which are listed here. To define a station, specify the 'Mountpoint' when in 'Real-Time Streams' mode or the 4-character station ID when in 'RINEX Files' mode.</p><p>'Sigma' is meant to describe the uncertainty of a single coordinate or tropospheric delay estimated for one epoch. 'Noise' is meant to describe the variation of estimates from epoch to epoch.</p><p><ul><li>A Sigma of 100.0 meters may be an appropriate choice e.g. for the initial N/E/H coordinates. However, this value may be significantly smaller (i.e. 0.01) for stations with well-known a priori coordinates.</li><li>A Noise of 100.0 meters for the estimated N/E/H coordinates may also be appropriate considering the potential movement of a rover position.</li><li>A value of 0.1 meters may be an appropriate Sigma for the a priori model based Tropospheric delay estimation.</li><li>Specify a Noise to describe the expected variation of the tropospheric effect over time. Supposing 1Hz observation data, specifying a value of 3e-6 would mean that the tropospheric effect may vary 3600 * 3e-6 = 0.01 meters per hour.</li></ul></p><p>You can also specify a 'NMEA Port' to output coordinates in NMEA format through an IP port of your local host.</p>"));
|
---|
[6715] | 188 |
|
---|
[7658] | 189 | // WhatsThis, PPP (3)
|
---|
| 190 | // ------------------
|
---|
[7945] | 191 | _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.<p>"));
|
---|
[7677] | 192 | _seedingTime->setWhatsThis(tr("<p>Enter the length of a startup period in seconds for which you want to fix the PPP solutions to known a priori coordinates as introduced through option 'Coordinates file'. Adjust 'Sigma N/E/H' in the PPP Stations table according to the coordinate's precision. Fixing a priori coordinates is done in BNC through setting 'Sigma N/E/H' temporarily to zero.</p><p>This option allows the PPP solution to rapidly converge. It requires that the antenna remains unmoved on the a priori known position throughout the startup period.</p><p>A value of 60 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning that you don't want BNC to fix PPP solutions during startup to an a priori coordinate.</p>"));
|
---|
[6720] | 193 |
|
---|
[7663] | 194 | // WhatsThis, PPP (4)
|
---|
| 195 | // ------------------
|
---|
| 196 | _plotCoordinates->setWhatsThis(tr("<p>For one of your PPP Stations BNC can produce a time series plot of coordinate displacements in the 'PPP Plot' tab below. Specify a 'Mountpoint' (when in 'Real-Time Streams' mode) or the 4-character station ID (when in 'RINEX Files' mode) to define the station whose coordinate displacements you would like to see plotted.</p><p>Note that this option makes only sense for a stationary receiver with known a priori marker coordinates as specified through PPP option 'Coordinates file'.</p><p>Default is an empty option field, meaning that BNC shall not produce a time series plot of PPP coordinate displacements.</p>"));
|
---|
| 197 | _audioResponse->setWhatsThis(tr("<p>Specify an 'Audio response' threshold in meters. A beep is produced by BNC whenever a horizontal PPP coordinate component differs by more than the threshold value from the a priori marker coordinate.</p><p>Default is an empty option field, meaning that you don't want BNC to produce alarm signals.</p>"));
|
---|
[7677] | 198 | _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>"));
|
---|
[7663] | 199 | _mapWinDotSize->setWhatsThis(tr("<p>Specify the size of dots showing rover positions on the track map.</p><p>A dot size of '3' may be appropriate. The maximum possible dot size is '10'. An empty option field or a size of '0' would mean that you don't want BNC to show the rover's track on the map.</p>"));
|
---|
[6643] | 200 | _mapWinDotColor->setWhatsThis(tr("<p>Specify the color of dots showing the rover track on the map.</p>"));
|
---|
[7663] | 201 | _mapSpeedSlider->setWhatsThis(tr("<p>With BNC in 'RINEX files' PPP post processing mode you can specify the speed of computations as appropriate for 'Track map' visualization.</p><p>Note that you can adjust 'Post-processing speed' on-the-fly while BNC is already processing your observations.</p>"));
|
---|
[6729] | 202 |
|
---|
[5696] | 203 | readOptions();
|
---|
[5692] | 204 | }
|
---|
| 205 |
|
---|
[7488] | 206 | //
|
---|
[5694] | 207 | ////////////////////////////////////////////////////////////////////////////
|
---|
[7640] | 208 | t_pppWidgets::~t_pppWidgets() {
|
---|
| 209 | delete _dataSource;
|
---|
| 210 | delete _rinexObs;
|
---|
| 211 | delete _rinexNav;
|
---|
| 212 | delete _corrMount;
|
---|
| 213 | delete _corrFile;
|
---|
| 214 | delete _crdFile;
|
---|
| 215 | delete _antexFile;
|
---|
| 216 | delete _logPath;
|
---|
| 217 | delete _nmeaPath;
|
---|
| 218 | delete _snxtroPath;
|
---|
| 219 | delete _snxtroSampl;
|
---|
| 220 | delete _snxtroIntr;
|
---|
[7764] | 221 | delete _snxtroAc;
|
---|
| 222 | delete _snxtroSol;
|
---|
[7640] | 223 | delete _v3filenames;
|
---|
| 224 | for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
|
---|
| 225 | _staTable->removeRow(iRow);
|
---|
| 226 | }
|
---|
| 227 | delete _staTable;
|
---|
| 228 | delete _lcGPS;
|
---|
| 229 | delete _lcGLONASS;
|
---|
| 230 | delete _lcGalileo;
|
---|
| 231 | delete _lcBDS;
|
---|
| 232 | delete _sigmaC1;
|
---|
| 233 | delete _sigmaL1;
|
---|
| 234 | delete _maxResC1;
|
---|
| 235 | delete _maxResL1;
|
---|
| 236 | delete _minObs;
|
---|
| 237 | delete _minEle;
|
---|
| 238 | delete _eleWgtCode;
|
---|
| 239 | delete _eleWgtPhase;
|
---|
| 240 | delete _seedingTime;
|
---|
| 241 | delete _corrWaitTime;
|
---|
| 242 | delete _addStaButton;
|
---|
| 243 | delete _delStaButton;
|
---|
| 244 | delete _plotCoordinates;
|
---|
| 245 | delete _mapWinButton;
|
---|
| 246 | delete _audioResponse;
|
---|
| 247 | delete _mapWinDotSize;
|
---|
| 248 | delete _mapWinDotColor;
|
---|
| 249 | delete _mapSpeedSlider;
|
---|
| 250 | }
|
---|
| 251 |
|
---|
| 252 | //
|
---|
| 253 | ////////////////////////////////////////////////////////////////////////////
|
---|
[5696] | 254 | void t_pppWidgets::readOptions() {
|
---|
| 255 |
|
---|
| 256 | bncSettings settings;
|
---|
| 257 |
|
---|
[5707] | 258 | // ComboBoxes
|
---|
| 259 | // ----------
|
---|
[5696] | 260 | int ii = _dataSource->findText(settings.value(_dataSource->objectName()).toString());
|
---|
| 261 | if (ii != -1) {
|
---|
| 262 | _dataSource->setCurrentIndex(ii);
|
---|
| 263 | }
|
---|
| 264 | ii = _lcGPS->findText(settings.value(_lcGPS->objectName()).toString());
|
---|
| 265 | if (ii != -1) {
|
---|
| 266 | _lcGPS->setCurrentIndex(ii);
|
---|
| 267 | }
|
---|
| 268 | ii = _lcGLONASS->findText(settings.value(_lcGLONASS->objectName()).toString());
|
---|
| 269 | if (ii != -1) {
|
---|
| 270 | _lcGLONASS->setCurrentIndex(ii);
|
---|
| 271 | }
|
---|
| 272 | ii = _lcGalileo->findText(settings.value(_lcGalileo->objectName()).toString());
|
---|
| 273 | if (ii != -1) {
|
---|
| 274 | _lcGalileo->setCurrentIndex(ii);
|
---|
| 275 | }
|
---|
[6883] | 276 | ii = _lcBDS->findText(settings.value(_lcBDS->objectName()).toString());
|
---|
| 277 | if (ii != -1) {
|
---|
| 278 | _lcBDS->setCurrentIndex(ii);
|
---|
| 279 | }
|
---|
[7488] | 280 | ii = _snxtroIntr->findText(settings.value(_snxtroIntr->objectName()).toString());
|
---|
| 281 | if (ii != -1) {
|
---|
| 282 | _snxtroIntr->setCurrentIndex(ii);
|
---|
| 283 | }
|
---|
[5696] | 284 |
|
---|
[5707] | 285 | // FileChoosers
|
---|
| 286 | // ------------
|
---|
[5696] | 287 | _rinexObs ->setFileName(settings.value(_rinexObs ->objectName()).toString());
|
---|
| 288 | _rinexNav ->setFileName(settings.value(_rinexNav ->objectName()).toString());
|
---|
| 289 | _corrFile ->setFileName(settings.value(_corrFile ->objectName()).toString());
|
---|
| 290 | _crdFile ->setFileName(settings.value(_crdFile ->objectName()).toString());
|
---|
| 291 | _antexFile->setFileName(settings.value(_antexFile->objectName()).toString());
|
---|
| 292 |
|
---|
[5707] | 293 | // LineEdits
|
---|
| 294 | // ---------
|
---|
[5969] | 295 | _corrMount ->setText(settings.value(_corrMount ->objectName()).toString());
|
---|
[7506] | 296 | _logPath ->setText(settings.value(_logPath ->objectName()).toString());
|
---|
| 297 | _nmeaPath ->setText(settings.value(_nmeaPath ->objectName()).toString());
|
---|
| 298 | _snxtroPath ->setText(settings.value(_snxtroPath ->objectName()).toString());
|
---|
[7764] | 299 | _snxtroAc ->setText(settings.value(_snxtroAc ->objectName()).toString());
|
---|
| 300 | _snxtroSol ->setText(settings.value(_snxtroSol ->objectName()).toString());
|
---|
[5696] | 301 |
|
---|
[7047] | 302 | if (!settings.value(_sigmaC1->objectName()).toString().isEmpty()) {
|
---|
| 303 | _sigmaC1->setText(settings.value(_sigmaC1->objectName()).toString());
|
---|
| 304 | }
|
---|
| 305 | else {
|
---|
| 306 | _sigmaC1->setText("2.0");
|
---|
| 307 | }
|
---|
| 308 |
|
---|
| 309 | if (!settings.value(_sigmaL1->objectName()).toString().isEmpty()) {
|
---|
| 310 | _sigmaL1->setText(settings.value(_sigmaL1->objectName()).toString());
|
---|
| 311 | }
|
---|
| 312 | else {
|
---|
| 313 | _sigmaL1->setText("0.01");
|
---|
| 314 | }
|
---|
| 315 |
|
---|
| 316 | if (!settings.value(_maxResC1->objectName()).toString().isEmpty()) {
|
---|
| 317 | _maxResC1->setText(settings.value(_maxResC1->objectName()).toString());
|
---|
| 318 | }
|
---|
| 319 | else {
|
---|
[7069] | 320 | _maxResC1->setText("4.0");
|
---|
[7047] | 321 | }
|
---|
| 322 |
|
---|
| 323 | if (!settings.value(_maxResL1->objectName()).toString().isEmpty()) {
|
---|
| 324 | _maxResL1->setText(settings.value(_maxResL1->objectName()).toString());
|
---|
| 325 | }
|
---|
[7488] | 326 | else {
|
---|
[7047] | 327 | _maxResL1->setText("0.03");
|
---|
| 328 | }
|
---|
| 329 |
|
---|
[7069] | 330 | if (!settings.value(_seedingTime->objectName()).toString().isEmpty()) {
|
---|
| 331 | _seedingTime->setText(settings.value(_seedingTime->objectName()).toString());
|
---|
| 332 | }
|
---|
| 333 | else {
|
---|
[7076] | 334 | _seedingTime->setText("0");
|
---|
[7069] | 335 | }
|
---|
| 336 |
|
---|
[5969] | 337 | // CheckBoxes
|
---|
| 338 | // ----------
|
---|
| 339 | _eleWgtCode ->setCheckState(Qt::CheckState(settings.value(_eleWgtCode ->objectName()).toInt()));
|
---|
| 340 | _eleWgtPhase->setCheckState(Qt::CheckState(settings.value(_eleWgtPhase->objectName()).toInt()));
|
---|
[7506] | 341 | _v3filenames->setCheckState(Qt::CheckState(settings.value(_v3filenames->objectName()).toInt()));
|
---|
[5969] | 342 |
|
---|
| 343 | // SpinBoxex
|
---|
| 344 | // ---------
|
---|
| 345 | _minObs->setValue(settings.value(_minObs->objectName()).toInt());
|
---|
| 346 | _minEle->setValue(settings.value(_minEle->objectName()).toInt());
|
---|
[5696] | 347 | _corrWaitTime->setValue(settings.value(_corrWaitTime->objectName()).toInt());
|
---|
[5707] | 348 |
|
---|
[8413] | 349 | ii = _snxtroSampl->findText(settings.value(_snxtroSampl->objectName()).toString());
|
---|
| 350 | if (ii != -1) {
|
---|
| 351 | _snxtroSampl->setCurrentIndex(ii);
|
---|
| 352 | }
|
---|
| 353 |
|
---|
[5707] | 354 | // Table with stations
|
---|
| 355 | // -------------------
|
---|
| 356 | for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
|
---|
| 357 | _staTable->removeRow(iRow);
|
---|
| 358 | }
|
---|
| 359 | int iRow = -1;
|
---|
| 360 | QListIterator<QString> it(settings.value(_staTable->objectName()).toStringList());
|
---|
| 361 | while (it.hasNext()) {
|
---|
| 362 | QStringList hlp = it.next().split(",");
|
---|
| 363 | ++iRow;
|
---|
| 364 | _staTable->insertRow(iRow);
|
---|
| 365 | for (int iCol = 0; iCol < hlp.size(); iCol++) {
|
---|
| 366 | _staTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
|
---|
| 367 | }
|
---|
| 368 | }
|
---|
[5893] | 369 |
|
---|
| 370 | // Plots and Maps
|
---|
| 371 | // --------------
|
---|
[5955] | 372 | _plotCoordinates ->setText(settings.value(_plotCoordinates->objectName()).toString());
|
---|
[6729] | 373 | _audioResponse ->setText(settings.value(_audioResponse->objectName()).toString());
|
---|
[5955] | 374 | _mapWinDotSize ->setText(settings.value(_mapWinDotSize->objectName()).toString());
|
---|
[5893] | 375 |
|
---|
[5955] | 376 | ii = _mapWinDotColor->findText(settings.value(_mapWinDotColor->objectName()).toString());
|
---|
[5893] | 377 | if (ii != -1) {
|
---|
[5955] | 378 | _mapWinDotColor->setCurrentIndex(ii);
|
---|
[5893] | 379 | }
|
---|
| 380 |
|
---|
| 381 | int speed = settings.value(_mapSpeedSlider->objectName()).toInt();
|
---|
| 382 | if (speed == 0) speed = _mapSpeedSlider->maximum();
|
---|
| 383 | _mapSpeedSlider->setSliderPosition(speed);
|
---|
[5696] | 384 | }
|
---|
| 385 |
|
---|
[7488] | 386 | //
|
---|
[5696] | 387 | ////////////////////////////////////////////////////////////////////////////
|
---|
[5694] | 388 | void t_pppWidgets::saveOptions() {
|
---|
| 389 |
|
---|
| 390 | bncSettings settings;
|
---|
| 391 |
|
---|
[5695] | 392 | settings.setValue(_dataSource ->objectName(), _dataSource ->currentText());
|
---|
| 393 | settings.setValue(_rinexObs ->objectName(), _rinexObs ->fileName());
|
---|
| 394 | settings.setValue(_rinexNav ->objectName(), _rinexNav ->fileName());
|
---|
[5701] | 395 | settings.setValue(_corrMount ->objectName(), _corrMount ->text());
|
---|
[5695] | 396 | settings.setValue(_corrFile ->objectName(), _corrFile ->fileName());
|
---|
| 397 | settings.setValue(_crdFile ->objectName(), _crdFile ->fileName());
|
---|
| 398 | settings.setValue(_antexFile ->objectName(), _antexFile ->fileName());
|
---|
[7506] | 399 | settings.setValue(_logPath ->objectName(), _logPath ->text());
|
---|
| 400 | settings.setValue(_nmeaPath ->objectName(), _nmeaPath ->text());
|
---|
| 401 | settings.setValue(_snxtroPath ->objectName(), _snxtroPath ->text());
|
---|
[8413] | 402 | settings.setValue(_snxtroSampl ->objectName(), _snxtroSampl ->currentText());
|
---|
[7764] | 403 | settings.setValue(_snxtroIntr ->objectName(), _snxtroIntr ->currentText());
|
---|
| 404 | settings.setValue(_snxtroAc ->objectName(), _snxtroAc ->text());
|
---|
| 405 | settings.setValue(_snxtroSol ->objectName(), _snxtroSol ->text());
|
---|
[7506] | 406 | settings.setValue(_v3filenames ->objectName(), _v3filenames ->checkState());
|
---|
[5695] | 407 | settings.setValue(_lcGPS ->objectName(), _lcGPS ->currentText());
|
---|
| 408 | settings.setValue(_lcGLONASS ->objectName(), _lcGLONASS ->currentText());
|
---|
| 409 | settings.setValue(_lcGalileo ->objectName(), _lcGalileo ->currentText());
|
---|
[6883] | 410 | settings.setValue(_lcBDS ->objectName(), _lcBDS ->currentText());
|
---|
[5695] | 411 | settings.setValue(_sigmaC1 ->objectName(), _sigmaC1 ->text());
|
---|
| 412 | settings.setValue(_sigmaL1 ->objectName(), _sigmaL1 ->text());
|
---|
| 413 | settings.setValue(_corrWaitTime->objectName(), _corrWaitTime->value());
|
---|
[5969] | 414 | settings.setValue(_maxResC1 ->objectName(), _maxResC1 ->text());
|
---|
| 415 | settings.setValue(_maxResL1 ->objectName(), _maxResL1 ->text());
|
---|
| 416 | settings.setValue(_seedingTime ->objectName(), _seedingTime ->text());
|
---|
| 417 | settings.setValue(_minObs ->objectName(), _minObs ->value());
|
---|
| 418 | settings.setValue(_minEle ->objectName(), _minEle ->value());
|
---|
| 419 | settings.setValue(_eleWgtCode ->objectName(), _eleWgtCode ->checkState());
|
---|
| 420 | settings.setValue(_eleWgtPhase ->objectName(), _eleWgtPhase ->checkState());
|
---|
[5694] | 421 |
|
---|
[5707] | 422 | QStringList staList;
|
---|
| 423 | for (int iRow = 0; iRow < _staTable->rowCount(); iRow++) {
|
---|
| 424 | QString hlp;
|
---|
| 425 | for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
|
---|
| 426 | if (_staTable->item(iRow, iCol)) {
|
---|
| 427 | hlp += _staTable->item(iRow, iCol)->text() + ",";
|
---|
| 428 | }
|
---|
| 429 | }
|
---|
| 430 | if (!hlp.isEmpty()) {
|
---|
| 431 | staList << hlp;
|
---|
| 432 | }
|
---|
| 433 | }
|
---|
| 434 | settings.setValue(_staTable->objectName(), staList);
|
---|
[5894] | 435 |
|
---|
[5955] | 436 | settings.setValue(_plotCoordinates ->objectName(), _plotCoordinates ->text());
|
---|
[6729] | 437 | settings.setValue(_audioResponse ->objectName(), _audioResponse ->text());
|
---|
[5955] | 438 | settings.setValue(_mapWinDotSize ->objectName(), _mapWinDotSize ->text());
|
---|
| 439 | settings.setValue(_mapWinDotColor ->objectName(), _mapWinDotColor ->currentText());
|
---|
| 440 | settings.setValue(_mapSpeedSlider ->objectName(), _mapSpeedSlider ->value());
|
---|
[5694] | 441 | }
|
---|
[5699] | 442 |
|
---|
[7488] | 443 | //
|
---|
[5699] | 444 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 445 | void t_pppWidgets::slotEnableWidgets() {
|
---|
| 446 |
|
---|
| 447 | const static QPalette paletteWhite(QColor(255, 255, 255));
|
---|
| 448 | const static QPalette paletteGray(QColor(230, 230, 230));
|
---|
| 449 |
|
---|
[6710] | 450 | bool allDisabled = _dataSource->currentText() == "";
|
---|
[5699] | 451 | bool realTime = _dataSource->currentText() == "Real-Time Streams";
|
---|
[5701] | 452 | bool rinexFiles = _dataSource->currentText() == "RINEX Files";
|
---|
[5699] | 453 |
|
---|
| 454 | QListIterator<QWidget*> it(_widgets);
|
---|
| 455 | while (it.hasNext()) {
|
---|
[5700] | 456 | QWidget* widget = it.next();
|
---|
| 457 | widget->setEnabled(!allDisabled);
|
---|
[5699] | 458 | }
|
---|
| 459 |
|
---|
[5701] | 460 | if (realTime) {
|
---|
[7488] | 461 | _rinexObs->setEnabled(false);
|
---|
| 462 | _rinexNav->setEnabled(false);
|
---|
| 463 | _corrFile->setEnabled(false);
|
---|
[5701] | 464 | }
|
---|
| 465 | else if (rinexFiles) {
|
---|
| 466 | _corrMount->setEnabled(false);
|
---|
[6984] | 467 | // _plotCoordinates->setEnabled(false);
|
---|
| 468 | // _audioResponse->setEnabled(false);
|
---|
[5701] | 469 | }
|
---|
| 470 |
|
---|
[7506] | 471 | if ( _snxtroPath->text() != "" && !allDisabled) {
|
---|
[7488] | 472 | _snxtroSampl->setEnabled(true);
|
---|
| 473 | _snxtroIntr ->setEnabled(true);
|
---|
[7764] | 474 | _snxtroAc ->setEnabled(true);
|
---|
| 475 | _snxtroSol ->setEnabled(true);
|
---|
[6748] | 476 | }
|
---|
| 477 | else {
|
---|
[7488] | 478 | _snxtroSampl->setEnabled(false);
|
---|
| 479 | _snxtroIntr ->setEnabled(false);
|
---|
[7764] | 480 | _snxtroAc ->setEnabled(false);
|
---|
| 481 | _snxtroSol ->setEnabled(false);
|
---|
[6748] | 482 | }
|
---|
| 483 |
|
---|
[5699] | 484 | _dataSource->setEnabled(true);
|
---|
[5700] | 485 |
|
---|
| 486 | it.toFront();
|
---|
| 487 | while (it.hasNext()) {
|
---|
| 488 | QWidget* widget = it.next();
|
---|
| 489 | if (widget->isEnabled()) {
|
---|
| 490 | widget->setPalette(paletteWhite);
|
---|
| 491 | }
|
---|
| 492 | else {
|
---|
| 493 | widget->setPalette(paletteGray);
|
---|
| 494 | }
|
---|
| 495 | }
|
---|
[5699] | 496 | }
|
---|
[5703] | 497 |
|
---|
[7488] | 498 | //
|
---|
[5703] | 499 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 500 | void t_pppWidgets::slotAddStation() {
|
---|
[5706] | 501 | int iRow = _staTable->rowCount();
|
---|
| 502 | _staTable->insertRow(iRow);
|
---|
| 503 | for (int iCol = 0; iCol < _staTable->columnCount(); iCol++) {
|
---|
[7045] | 504 | if (iCol == 0) _staTable->setItem(iRow, iCol, new QTableWidgetItem(""));
|
---|
| 505 | if (iCol == 1) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 506 | if (iCol == 2) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 507 | if (iCol == 3) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 508 | if (iCol == 4) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 509 | if (iCol == 5) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 510 | if (iCol == 6) _staTable->setItem(iRow, iCol, new QTableWidgetItem("100.0"));
|
---|
| 511 | if (iCol == 7) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0.1"));
|
---|
| 512 | if (iCol == 8) _staTable->setItem(iRow, iCol, new QTableWidgetItem("3e-6"));
|
---|
[7180] | 513 | if (iCol == 9) _staTable->setItem(iRow, iCol, new QTableWidgetItem("0"));
|
---|
[5706] | 514 | }
|
---|
[5703] | 515 | }
|
---|
| 516 |
|
---|
[7488] | 517 | //
|
---|
[5703] | 518 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 519 | void t_pppWidgets::slotDelStation() {
|
---|
[5706] | 520 | int nRows = _staTable->rowCount();
|
---|
| 521 | bool flg[nRows];
|
---|
| 522 | for (int iRow = 0; iRow < nRows; iRow++) {
|
---|
| 523 | if (_staTable->isItemSelected(_staTable->item(iRow,1))) {
|
---|
| 524 | flg[iRow] = true;
|
---|
| 525 | }
|
---|
| 526 | else {
|
---|
| 527 | flg[iRow] = false;
|
---|
| 528 | }
|
---|
| 529 | }
|
---|
| 530 | for (int iRow = nRows-1; iRow >= 0; iRow--) {
|
---|
| 531 | if (flg[iRow]) {
|
---|
| 532 | _staTable->removeRow(iRow);
|
---|
| 533 | }
|
---|
| 534 | }
|
---|
[5703] | 535 | }
|
---|
[5707] | 536 |
|
---|
[6748] | 537 | // PPP Text
|
---|
| 538 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 539 | void t_pppWidgets::slotPPPTextChanged(){
|
---|
| 540 |
|
---|
| 541 | const static QPalette paletteWhite(QColor(255, 255, 255));
|
---|
| 542 | const static QPalette paletteGray(QColor(230, 230, 230));
|
---|
| 543 |
|
---|
| 544 | // SNX TRO file sampling
|
---|
| 545 | // ---------------------
|
---|
[7506] | 546 | if (sender() == 0 || sender() == _snxtroPath) {
|
---|
| 547 | if ( _snxtroPath->text() != "" ) {
|
---|
[7488] | 548 | _snxtroSampl->setEnabled(true);
|
---|
[7764] | 549 | _snxtroIntr ->setEnabled(true);
|
---|
| 550 | _snxtroAc ->setEnabled(true);
|
---|
| 551 | _snxtroSol ->setEnabled(true);
|
---|
[6748] | 552 | _snxtroSampl->setPalette(paletteWhite);
|
---|
[7764] | 553 | _snxtroIntr ->setPalette(paletteWhite);
|
---|
| 554 | _snxtroAc ->setPalette(paletteWhite);
|
---|
| 555 | _snxtroSol ->setPalette(paletteWhite);
|
---|
[6748] | 556 | }
|
---|
| 557 | else {
|
---|
[7488] | 558 | _snxtroSampl->setEnabled(false);
|
---|
[7764] | 559 | _snxtroIntr ->setEnabled(false);
|
---|
| 560 | _snxtroAc ->setEnabled(false);
|
---|
| 561 | _snxtroSol ->setEnabled(false);
|
---|
[6748] | 562 | _snxtroSampl->setPalette(paletteGray);
|
---|
[7764] | 563 | _snxtroIntr ->setPalette(paletteGray);
|
---|
| 564 | _snxtroAc ->setPalette(paletteGray);
|
---|
| 565 | _snxtroSol ->setPalette(paletteGray);
|
---|
[6748] | 566 | }
|
---|
| 567 | }
|
---|
| 568 | }
|
---|