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

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