1 | #ifndef PPP_H
|
---|
2 | #define PPP_H
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 | #include <vector>
|
---|
6 |
|
---|
7 | #include "bncconst.h"
|
---|
8 | #include "bnctime.h"
|
---|
9 | #include "t_prn.h"
|
---|
10 |
|
---|
11 | namespace BNC {
|
---|
12 |
|
---|
13 | class pppExcept {
|
---|
14 | public:
|
---|
15 | pppExcept(const char* msg) {
|
---|
16 | _msg = msg;
|
---|
17 | }
|
---|
18 | ~pppExcept() {}
|
---|
19 | std::string what() {return _msg;}
|
---|
20 | private:
|
---|
21 | std::string _msg;
|
---|
22 | };
|
---|
23 |
|
---|
24 | enum e_pppMode {
|
---|
25 | mode_PPP_DF,
|
---|
26 | mode_SPP_DF,
|
---|
27 | mode_PPP_SF,
|
---|
28 | mode_SPP_SF,
|
---|
29 | };
|
---|
30 |
|
---|
31 | class t_output {
|
---|
32 | public:
|
---|
33 | bncTime _epoTime;
|
---|
34 | double _xyzRover[3];
|
---|
35 | double _covMatrix[6];
|
---|
36 | int _numSat;
|
---|
37 | double _pDop;
|
---|
38 | std::string _log;
|
---|
39 | bool _error;
|
---|
40 | };
|
---|
41 |
|
---|
42 | class t_obs {
|
---|
43 | public:
|
---|
44 | t_obs() {
|
---|
45 | _code = 0.0;
|
---|
46 | _codeValid = false;
|
---|
47 | _phase = 0.0;
|
---|
48 | _phaseValid = false;
|
---|
49 | _doppler = 0.0;
|
---|
50 | _dopplerValid = false;
|
---|
51 | _snr = 0.0;
|
---|
52 | _snrValid = false;
|
---|
53 | _slip = false;
|
---|
54 | _slipCounter = 0;
|
---|
55 | _biasJumpCounter = 0;
|
---|
56 | }
|
---|
57 | std::string _rnxType2ch;
|
---|
58 | double _code;
|
---|
59 | bool _codeValid;
|
---|
60 | double _phase;
|
---|
61 | bool _phaseValid;
|
---|
62 | double _doppler;
|
---|
63 | bool _dopplerValid;
|
---|
64 | double _snr;
|
---|
65 | bool _snrValid;
|
---|
66 | bool _slip;
|
---|
67 | int _slipCounter;
|
---|
68 | int _biasJumpCounter;
|
---|
69 | };
|
---|
70 |
|
---|
71 | class t_pppSatObs {
|
---|
72 | public:
|
---|
73 | t_prn _prn;
|
---|
74 | bncTime _time;
|
---|
75 | std::vector<t_obs> _obs;
|
---|
76 | };
|
---|
77 |
|
---|
78 | class t_orbCorr {
|
---|
79 | public:
|
---|
80 | t_prn prn() const {return _prn;}
|
---|
81 | unsigned short IOD() const {return _iod;}
|
---|
82 | t_prn _prn;
|
---|
83 | unsigned short _iod;
|
---|
84 | bncTime _time;
|
---|
85 | char _system;
|
---|
86 | double _xr[3];
|
---|
87 | double _dotXr[3];
|
---|
88 | };
|
---|
89 |
|
---|
90 | class t_clkCorr {
|
---|
91 | public:
|
---|
92 | t_prn prn() const {return _prn;}
|
---|
93 | unsigned short IOD() const {return _iod;}
|
---|
94 | t_prn _prn;
|
---|
95 | unsigned short _iod;
|
---|
96 | bncTime _time;
|
---|
97 | double _dClk;
|
---|
98 | double _dotDClk;
|
---|
99 | double _dotDotDClk;
|
---|
100 | double _clkPartial;
|
---|
101 | };
|
---|
102 |
|
---|
103 | class t_bias {
|
---|
104 | public:
|
---|
105 | std::string _rnxType3ch;
|
---|
106 | double _value;
|
---|
107 | };
|
---|
108 |
|
---|
109 | class t_satBiases {
|
---|
110 | public:
|
---|
111 | t_prn _prn;
|
---|
112 | bncTime _time;
|
---|
113 | int _nx;
|
---|
114 | int _jumpCount;
|
---|
115 | std::vector<t_bias> _biases;
|
---|
116 | };
|
---|
117 |
|
---|
118 | enum e_tropoModel{tropoModel_NO, tropoModel_SAAST, tropoModel_MARINI,
|
---|
119 | tropoModel_HOPF, tropoModel_UNB3M};
|
---|
120 |
|
---|
121 | enum e_tropoMF{tropoMF_INTRINSIC, tropoMF_COSZ, tropoMF_NIELL_DRY,
|
---|
122 | tropoMF_NIELL_WET, tropoMF_HOPF, tropoMF_GMF_DRY,
|
---|
123 | tropoMF_GMF_WET, tropoMF_GMF_COMB};
|
---|
124 |
|
---|
125 | class t_frequency {
|
---|
126 | public:
|
---|
127 | enum type {dummy = 0, G1, G2, R1, R2, maxFr};
|
---|
128 |
|
---|
129 | static std::string toString(type tt) {
|
---|
130 | if (tt == G1) return "G1";
|
---|
131 | else if (tt == G2) return "G2";
|
---|
132 | else if (tt == R1) return "R1";
|
---|
133 | else if (tt == R2) return "R2";
|
---|
134 | return std::string();
|
---|
135 | }
|
---|
136 | };
|
---|
137 |
|
---|
138 | class t_lc {
|
---|
139 | public:
|
---|
140 | enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
|
---|
141 |
|
---|
142 | static bool need2ndFreq(type tt) {
|
---|
143 | if (tt == l2 || tt == c2 || tt == lIF || tt == cIF || tt == MW) return true;
|
---|
144 | return false;
|
---|
145 | }
|
---|
146 |
|
---|
147 | static bool includesPhase(type tt) {
|
---|
148 | if (tt == l1 || tt == l2 || tt == lIF || tt == MW || tt == CL) return true;
|
---|
149 | return false;
|
---|
150 | }
|
---|
151 |
|
---|
152 | static bool includesCode(type tt) {
|
---|
153 | if (tt == c1 || tt == c2 || tt == cIF || tt == MW || tt == CL) return true;
|
---|
154 | return false;
|
---|
155 | }
|
---|
156 |
|
---|
157 | static std::string toString(type tt) {
|
---|
158 | if (tt == l1) return "l1";
|
---|
159 | else if (tt == l2) return "l2";
|
---|
160 | else if (tt == c1) return "c1";
|
---|
161 | else if (tt == c2) return "c2";
|
---|
162 | else if (tt == lIF) return "lIF";
|
---|
163 | else if (tt == cIF) return "cIF";
|
---|
164 | else if (tt == MW) return "MW";
|
---|
165 | else if (tt == CL) return "CL";
|
---|
166 | return std::string();
|
---|
167 | }
|
---|
168 | };
|
---|
169 |
|
---|
170 | } // namespace BNC
|
---|
171 |
|
---|
172 | #endif
|
---|