[5714] | 1 |
|
---|
| 2 | // Part of BNC, a utility for retrieving decoding and
|
---|
| 3 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
| 4 | //
|
---|
| 5 | // Copyright (C) 2007
|
---|
| 6 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
| 7 | // http://www.bkg.bund.de
|
---|
| 8 | // Czech Technical University Prague, Department of Geodesy
|
---|
| 9 | // http://www.fsv.cvut.cz
|
---|
| 10 | //
|
---|
| 11 | // Email: euref-ip@bkg.bund.de
|
---|
| 12 | //
|
---|
| 13 | // This program is free software; you can redistribute it and/or
|
---|
| 14 | // modify it under the terms of the GNU General Public License
|
---|
| 15 | // as published by the Free Software Foundation, version 2.
|
---|
| 16 | //
|
---|
| 17 | // This program is distributed in the hope that it will be useful,
|
---|
| 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 20 | // GNU General Public License for more details.
|
---|
| 21 | //
|
---|
| 22 | // You should have received a copy of the GNU General Public License
|
---|
| 23 | // along with this program; if not, write to the Free Software
|
---|
| 24 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
| 25 |
|
---|
| 26 | /* -------------------------------------------------------------------------
|
---|
| 27 | * BKG NTRIP Client
|
---|
| 28 | * -------------------------------------------------------------------------
|
---|
| 29 | *
|
---|
| 30 | * Class: t_pppMain
|
---|
| 31 | *
|
---|
| 32 | * Purpose: Start of the PPP client(s)
|
---|
| 33 | *
|
---|
| 34 | * Author: L. Mervart
|
---|
| 35 | *
|
---|
| 36 | * Created: 29-Jul-2014
|
---|
| 37 | *
|
---|
| 38 | * Changes:
|
---|
| 39 | *
|
---|
| 40 | * -----------------------------------------------------------------------*/
|
---|
| 41 |
|
---|
| 42 | #include "pppMain.h"
|
---|
| 43 | #include "bncsettings.h"
|
---|
| 44 |
|
---|
| 45 | using namespace BNC;
|
---|
| 46 | using namespace std;
|
---|
| 47 |
|
---|
| 48 | // Constructor
|
---|
| 49 | //////////////////////////////////////////////////////////////////////////////
|
---|
| 50 | t_pppMain::t_pppMain() {
|
---|
| 51 | readOptions();
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | // Destructor
|
---|
| 55 | //////////////////////////////////////////////////////////////////////////////
|
---|
| 56 | t_pppMain::~t_pppMain() {
|
---|
| 57 | }
|
---|
| 58 |
|
---|
| 59 | //
|
---|
| 60 | //////////////////////////////////////////////////////////////////////////////
|
---|
| 61 | void t_pppMain::readOptions() {
|
---|
| 62 |
|
---|
| 63 | _options.clear();
|
---|
| 64 |
|
---|
| 65 | bncSettings settings;
|
---|
| 66 |
|
---|
| 67 | _logFile = settings.value("PPP/logFile").toString();
|
---|
| 68 | _nmeaFile = settings.value("PPP/nmeaFile").toString();
|
---|
| 69 | _nmeaPort = settings.value("PPP/nmeaPort").toInt();
|
---|
| 70 |
|
---|
| 71 | bool realTime = false;
|
---|
| 72 | if (settings.value("PPP/dataSource").toString() == "Real-Time Streams") {
|
---|
| 73 | realTime = true;
|
---|
| 74 | }
|
---|
| 75 | else if (settings.value("PPP/dataSource").toString() == "RINEX Files") {
|
---|
| 76 | realTime = false;
|
---|
| 77 | }
|
---|
| 78 | else {
|
---|
| 79 | return;
|
---|
| 80 | }
|
---|
| 81 |
|
---|
| 82 | QListIterator<QString> it(settings.value("PPP/staTable").toStringList());
|
---|
| 83 | while (it.hasNext()) {
|
---|
| 84 | QStringList hlp = it.next().split(",");
|
---|
| 85 |
|
---|
| 86 | if (hlp.size() < 9) {
|
---|
| 87 | throw "pppMain: wrong option staTable";
|
---|
| 88 | }
|
---|
| 89 |
|
---|
| 90 | QSharedPointer<t_options> opt(new t_options());
|
---|
| 91 |
|
---|
| 92 | opt->_realTime = realTime;
|
---|
| 93 | opt->_roverName = hlp[0].toAscii().data();
|
---|
| 94 | opt->_sigCrd[0] = hlp[1].toDouble();
|
---|
| 95 | opt->_sigCrd[1] = hlp[2].toDouble();
|
---|
| 96 | opt->_sigCrd[2] = hlp[3].toDouble();
|
---|
| 97 | opt->_noiseCrd[0] = hlp[4].toDouble();
|
---|
| 98 | opt->_noiseCrd[1] = hlp[5].toDouble();
|
---|
| 99 | opt->_noiseCrd[2] = hlp[6].toDouble();
|
---|
| 100 | opt->_sigTropo = hlp[7].toDouble();
|
---|
| 101 | opt->_noiseTropo = hlp[8].toDouble();
|
---|
| 102 |
|
---|
| 103 | if (realTime) {
|
---|
| 104 | opt->_corrMount = settings.value("PPP/corrMount").toString().toAscii().data();
|
---|
| 105 | }
|
---|
| 106 | else {
|
---|
| 107 | opt->_rinexObs = settings.value("PPP/rinexObs").toString().toAscii().data();
|
---|
| 108 | opt->_rinexNav = settings.value("PPP/rinexNav").toString().toAscii().data();
|
---|
| 109 | opt->_corrFile = settings.value("PPP/corrFile").toString().toAscii().data();
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | opt->_crdFile = settings.value("PPP/crdFile").toString().toAscii().data();
|
---|
| 113 | opt->_antexFile = settings.value("PPP/antexFile").toString().toAscii().data();
|
---|
| 114 |
|
---|
| 115 | opt->_sigmaC1 = settings.value("PPP/sigmaC1").toDouble();
|
---|
| 116 | opt->_sigmaL1 = settings.value("PPP/sigmaL1").toDouble();
|
---|
| 117 | opt->_corrWaitTime = settings.value("PPP/corrWaitTime").toDouble();
|
---|
| 118 |
|
---|
| 119 | _options << opt;
|
---|
| 120 | }
|
---|
| 121 | }
|
---|
| 122 |
|
---|