source: ntrip/trunk/BNC/src/PPP/options.cpp@ 5797

Last change on this file since 5797 was 5797, checked in by mervart, 10 years ago
File size: 3.7 KB
Line 
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_options
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>
42#include "options.h"
43
44using namespace BNC;
45using namespace std;
46
47// Constructor
48//////////////////////////////////////////////////////////////////////////////
49t_options::t_options() {
50 _xyzAprRover.ReSize(3); _xyzAprRover = 0.0;
51 _ellAprRover.ReSize(3); _ellAprRover = 0.0;
52 _neuEccRover.ReSize(3); _neuEccRover = 0.0;
53}
54
55// Destructor
56//////////////////////////////////////////////////////////////////////////////
57t_options::~t_options() {
58}
59
60//
61//////////////////////////////////////////////////////////////////////////////
62bool t_options::dualFreqRequired() const {
63 return true;
64}
65
66//
67//////////////////////////////////////////////////////////////////////////////
68bool t_options::biasRequired() const {
69 return false;
70}
71
72//
73//////////////////////////////////////////////////////////////////////////////
74bool t_options::corrRequired() const {
75 return false;
76}
77
78//
79//////////////////////////////////////////////////////////////////////////////
80bool t_options::useGlonass() const {
81 return (_lcGLONASS.size() > 0);
82}
83
84//
85//////////////////////////////////////////////////////////////////////////////
86bool t_options::xyzAprRoverSet() const {
87 return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0);
88}
89
90//
91//////////////////////////////////////////////////////////////////////////////
92bool t_options::estTropo() const {
93 return (_sigTropo > 0.0 || _noiseTropo > 0.0);
94}
95
96//
97//////////////////////////////////////////////////////////////////////////////
98vector<t_lc::type> t_options::LCs() const {
99
100 vector<t_lc::type> allLCs = _lcGPS;
101
102 for (unsigned ii = 0; ii < _lcGLONASS.size(); ii++) {
103 bool found = false;
104 for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
105 if (allLCs[iAll] == _lcGLONASS[ii]) {
106 found = true;
107 break;
108 }
109 }
110 if (!found) {
111 allLCs.push_back(_lcGLONASS[ii]);
112 }
113 }
114
115 for (unsigned ii = 0; ii < _lcGalileo.size(); ii++) {
116 bool found = false;
117 for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) {
118 if (allLCs[iAll] == _lcGalileo[ii]) {
119 found = true;
120 break;
121 }
122 }
123 if (!found) {
124 allLCs.push_back(_lcGalileo[ii]);
125 }
126 }
127
128 return allLCs;
129}
130
131//
132//////////////////////////////////////////////////////////////////////////////
133double t_options::maxRes(t_lc::type /* tLC */) const {
134 return _maxResC1;
135}
Note: See TracBrowser for help on using the repository browser.