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