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_pppOptions
|
---|
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 "pppOptions.h"
|
---|
43 |
|
---|
44 | using namespace BNC_PPP;
|
---|
45 | using namespace std;
|
---|
46 |
|
---|
47 | // Constructor
|
---|
48 | //////////////////////////////////////////////////////////////////////////////
|
---|
49 | t_pppOptions::t_pppOptions() {
|
---|
50 | _xyzAprRover.ReSize(3); _xyzAprRover = 0.0;
|
---|
51 | _neuEccRover.ReSize(3); _neuEccRover = 0.0;
|
---|
52 | _aprSigCrd.ReSize(3); _aprSigCrd = 0.0;
|
---|
53 | _noiseCrd.ReSize(3); _noiseCrd = 0.0;
|
---|
54 | }
|
---|
55 |
|
---|
56 | // Destructor
|
---|
57 | //////////////////////////////////////////////////////////////////////////////
|
---|
58 | t_pppOptions::~t_pppOptions() {
|
---|
59 | }
|
---|
60 |
|
---|
61 | //
|
---|
62 | //////////////////////////////////////////////////////////////////////////////
|
---|
63 | const std::vector<t_lc::type>& t_pppOptions::LCs(char system) const {
|
---|
64 | if (system == 'R') {
|
---|
65 | return _LCsGLONASS;
|
---|
66 | }
|
---|
67 | else if (system == 'E') {
|
---|
68 | return _LCsGalileo;
|
---|
69 | }
|
---|
70 | else {
|
---|
71 | return _LCsGPS;
|
---|
72 | }
|
---|
73 | }
|
---|
74 |
|
---|
75 | //
|
---|
76 | //////////////////////////////////////////////////////////////////////////////
|
---|
77 | bool t_pppOptions::useOrbClkCorr() const {
|
---|
78 | if (_realTime) {
|
---|
79 | return !_corrMount.empty();
|
---|
80 | }
|
---|
81 | else {
|
---|
82 | return !_corrFile.empty();
|
---|
83 | }
|
---|
84 | }
|
---|
85 |
|
---|
86 | // Processed satellite systems
|
---|
87 | /////////////////////////////////////////////////////////////////////////////
|
---|
88 | vector<char> t_pppOptions::systems() const {
|
---|
89 | vector<char> answ;
|
---|
90 | if (_LCsGPS.size() > 0) answ.push_back('G');
|
---|
91 | if (_LCsGLONASS.size() > 0) answ.push_back('R');
|
---|
92 | if (_LCsGalileo.size() > 0) answ.push_back('E');
|
---|
93 | return answ;
|
---|
94 | }
|
---|
95 |
|
---|
96 | //
|
---|
97 | /////////////////////////////////////////////////////////////////////////////
|
---|
98 | vector<t_lc::type> t_pppOptions::ambLCs(char system) const {
|
---|
99 |
|
---|
100 | const vector<t_lc::type>& allLCs = LCs(system);
|
---|
101 | vector<t_lc::type> phaseLCs;
|
---|
102 | for (unsigned ii = 0; ii < allLCs.size(); ii++) {
|
---|
103 | if (t_lc::includesPhase(allLCs[ii])) {
|
---|
104 | phaseLCs.push_back(allLCs[ii]);
|
---|
105 | }
|
---|
106 | }
|
---|
107 |
|
---|
108 | vector<t_lc::type> answ;
|
---|
109 | if (phaseLCs.size() == 1) {
|
---|
110 | answ.push_back(phaseLCs[0]);
|
---|
111 | }
|
---|
112 | else if (phaseLCs.size() > 1) {
|
---|
113 | answ.push_back(t_lc::l1);
|
---|
114 | answ.push_back(t_lc::l2);
|
---|
115 | }
|
---|
116 |
|
---|
117 | return answ;
|
---|
118 | }
|
---|