[5708] | 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 | *
|
---|
[5810] | 29 | * Class: t_pppOptions
|
---|
[5708] | 30 | *
|
---|
| 31 | * Purpose: Options for PPP client
|
---|
| 32 | *
|
---|
| 33 | * Author: L. Mervart
|
---|
| 34 | *
|
---|
| 35 | * Created: 29-Jul-2014
|
---|
| 36 | *
|
---|
| 37 | * Changes:
|
---|
| 38 | *
|
---|
| 39 | * -----------------------------------------------------------------------*/
|
---|
| 40 |
|
---|
| 41 | #include <newmatio.h>
|
---|
[5810] | 42 | #include "pppOptions.h"
|
---|
[5708] | 43 |
|
---|
[5814] | 44 | using namespace BNC_PPP;
|
---|
[5708] | 45 | using namespace std;
|
---|
| 46 |
|
---|
| 47 | // Constructor
|
---|
| 48 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 49 | t_pppOptions::t_pppOptions() {
|
---|
[5790] | 50 | _xyzAprRover.ReSize(3); _xyzAprRover = 0.0;
|
---|
| 51 | _ellAprRover.ReSize(3); _ellAprRover = 0.0;
|
---|
| 52 | _neuEccRover.ReSize(3); _neuEccRover = 0.0;
|
---|
[5708] | 53 | }
|
---|
| 54 |
|
---|
[5736] | 55 | // Destructor
|
---|
| 56 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 57 | t_pppOptions::~t_pppOptions() {
|
---|
[5736] | 58 | }
|
---|
| 59 |
|
---|
[5757] | 60 | //
|
---|
| 61 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 62 | bool t_pppOptions::dualFreqRequired() const {
|
---|
[5757] | 63 | return true;
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | //
|
---|
| 67 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 68 | bool t_pppOptions::biasRequired() const {
|
---|
[5757] | 69 | return false;
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | //
|
---|
| 73 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 74 | bool t_pppOptions::corrRequired() const {
|
---|
[5837] | 75 | if (_corrMount.empty()) {
|
---|
| 76 | return false;
|
---|
| 77 | }
|
---|
| 78 | else {
|
---|
| 79 | return true;
|
---|
| 80 | }
|
---|
[5789] | 81 | }
|
---|
| 82 |
|
---|
| 83 | //
|
---|
| 84 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 85 | bool t_pppOptions::useGlonass() const {
|
---|
[5757] | 86 | return (_lcGLONASS.size() > 0);
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | //
|
---|
| 90 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 91 | bool t_pppOptions::xyzAprRoverSet() const {
|
---|
[5757] | 92 | return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0);
|
---|
| 93 | }
|
---|
| 94 |
|
---|
| 95 | //
|
---|
| 96 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 97 | bool t_pppOptions::estTropo() const {
|
---|
[5757] | 98 | return (_sigTropo > 0.0 || _noiseTropo > 0.0);
|
---|
| 99 | }
|
---|
| 100 |
|
---|
| 101 | //
|
---|
| 102 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5810] | 103 | vector<t_lc::type> t_pppOptions::LCs() const {
|
---|
[5797] | 104 |
|
---|
| 105 | vector<t_lc::type> allLCs = _lcGPS;
|
---|
| 106 |
|
---|
[5757] | 107 | for (unsigned ii = 0; ii < _lcGLONASS.size(); ii++) {
|
---|
[5797] | 108 | bool found = false;
|
---|
| 109 | for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
|
---|
| 110 | if (allLCs[iAll] == _lcGLONASS[ii]) {
|
---|
| 111 | found = true;
|
---|
| 112 | break;
|
---|
| 113 | }
|
---|
| 114 | }
|
---|
| 115 | if (!found) {
|
---|
| 116 | allLCs.push_back(_lcGLONASS[ii]);
|
---|
| 117 | }
|
---|
[5757] | 118 | }
|
---|
[5797] | 119 |
|
---|
[5757] | 120 | for (unsigned ii = 0; ii < _lcGalileo.size(); ii++) {
|
---|
[5797] | 121 | bool found = false;
|
---|
| 122 | for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
|
---|
| 123 | if (allLCs[iAll] == _lcGalileo[ii]) {
|
---|
| 124 | found = true;
|
---|
| 125 | break;
|
---|
| 126 | }
|
---|
| 127 | }
|
---|
| 128 | if (!found) {
|
---|
| 129 | allLCs.push_back(_lcGalileo[ii]);
|
---|
| 130 | }
|
---|
[5757] | 131 | }
|
---|
[5797] | 132 |
|
---|
[5757] | 133 | return allLCs;
|
---|
| 134 | }
|
---|
| 135 |
|
---|
| 136 | //
|
---|
| 137 | //////////////////////////////////////////////////////////////////////////////
|
---|
[5843] | 138 | double t_pppOptions::maxRes(t_lc::type tLC) const {
|
---|
| 139 |
|
---|
| 140 | if (t_lc::includesCode(tLC)) {
|
---|
| 141 | return _maxResC1;
|
---|
| 142 | }
|
---|
| 143 | else {
|
---|
| 144 | return _maxResL1;
|
---|
| 145 | }
|
---|
[5757] | 146 | }
|
---|