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