source: ntrip/trunk/BNC/src/PPP/pppInclude.h@ 6021

Last change on this file since 6021 was 6021, checked in by mervart, 10 years ago
File size: 4.5 KB
Line 
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
12namespace BNC_PPP {
13
14class 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
25class t_output {
26 public:
27 bncTime _epoTime;
28 double _xyzRover[3];
29 double _covMatrix[6];
30 double _neu[3];
31 int _numSat;
32 double _pDop;
33 std::string _log;
34 bool _error;
35};
36
37class t_frqObs {
38 public:
39 t_frqObs() {
40 _freqType = t_frequency::dummy;
41 _freq = 0.0;
42 _code = 0.0;
43 _codeValid = false;
44 _phase = 0.0;
45 _phaseValid = false;
46 _doppler = 0.0;
47 _dopplerValid = false;
48 _snr = 0.0;
49 _snrValid = false;
50 _slip = false;
51 _slipCounter = 0;
52 _biasJumpCounter = 0;
53 }
54 std::string _rnxType2ch;
55 t_frequency::type _freqType;
56 double _freq;
57 double _code;
58 bool _codeValid;
59 double _phase;
60 bool _phaseValid;
61 double _doppler;
62 bool _dopplerValid;
63 double _snr;
64 bool _snrValid;
65 bool _slip;
66 int _slipCounter;
67 int _biasJumpCounter;
68};
69
70class t_satObs {
71 public:
72 t_satObs() {}
73 ~t_satObs() {for (unsigned ii = 0; ii < _obs.size(); ii++) delete _obs[ii];}
74 t_prn _prn;
75 bncTime _time;
76 std::vector<t_frqObs*> _obs;
77};
78
79class t_orbCorr {
80 public:
81 t_prn prn() const {return _prn;}
82 unsigned short IOD() const {return _iod;}
83 t_prn _prn;
84 unsigned short _iod;
85 bncTime _time;
86 char _system;
87 double _xr[3];
88 double _dotXr[3];
89};
90
91class t_clkCorr {
92 public:
93 t_prn prn() const {return _prn;}
94 unsigned short IOD() const {return _iod;}
95 t_prn _prn;
96 unsigned short _iod;
97 bncTime _time;
98 double _dClk;
99 double _dotDClk;
100 double _dotDotDClk;
101 double _clkPartial;
102};
103
104class t_frqBias {
105 public:
106 t_frqBias() {
107 _code = 0.0;
108 _codeValid = false;
109 _phase = 0.0;
110 _phaseValid = false;
111 }
112 std::string _rnxType2ch;
113 double _code;
114 bool _codeValid;
115 double _phase;
116 bool _phaseValid;
117};
118
119class t_satBias {
120 public:
121 t_prn _prn;
122 bncTime _time;
123 int _nx;
124 int _jumpCount;
125 std::vector<t_frqBias> _bias;
126};
127
128class t_lc {
129 public:
130 enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
131
132 static bool includesPhase(type tt) {
133 switch (tt) {
134 case l1:
135 case l2:
136 case lIF:
137 case MW:
138 case CL:
139 return true;
140 case c1:
141 case c2:
142 case cIF:
143 return false;
144 case dummy: case maxLc: return false;
145 }
146 return false;
147 }
148
149 static bool includesCode(type tt) {
150 switch (tt) {
151 case c1:
152 case c2:
153 case cIF:
154 case MW:
155 case CL:
156 return true;
157 case l1:
158 case l2:
159 case lIF:
160 return false;
161 case dummy: case maxLc: return false;
162 }
163 return false;
164 }
165
166 static t_frequency::type toFreq(char sys, type tt) {
167 switch (tt) {
168 case l1: case c1:
169 if (sys == 'G') return t_frequency::G1;
170 else if (sys == 'R') return t_frequency::R1;
171 else if (sys == 'E') return t_frequency::E1;
172 else return t_frequency::dummy;
173 case l2: case c2:
174 if (sys == 'G') return t_frequency::G2;
175 else if (sys == 'R') return t_frequency::R2;
176 else return t_frequency::dummy;
177 case lIF: case cIF: case MW: case CL:
178 return t_frequency::dummy;
179 case dummy: case maxLc: return t_frequency::dummy;
180 }
181 return t_frequency::dummy;
182 }
183
184 static std::string toString(type tt) {
185 switch (tt) {
186 case l1: return "l1";
187 case l2: return "l2";
188 case lIF: return "lIF";
189 case MW: return "MW";
190 case CL: return "CL";
191 case c1: return "c1";
192 case c2: return "c2";
193 case cIF: return "cIF";
194 case dummy: case maxLc: return "";
195 }
196 return "";
197 }
198};
199
200} // namespace BNC_PPP
201
202#endif
Note: See TracBrowser for help on using the repository browser.