source: ntrip/trunk/BNC/src/pppInclude.h@ 10539

Last change on this file since 10539 was 10409, checked in by stuerze, 8 months ago

minor changes

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 "ephemeris.h"
11#include "t_prn.h"
12#include "satObs.h"
13
14namespace BNC_PPP {
15
16class t_except {
17 public:
18 t_except(const char* msg) {
19 _msg = msg;
20 }
21 ~t_except() {}
22 std::string what() {return _msg;}
23 private:
24 std::string _msg;
25};
26
27class t_output {
28 public:
29 bncTime _epoTime;
30 double _xyzRover[3];
31 double _covMatrix[6];
32 double _neu[3];
33 double _trp0;
34 double _trp;
35 double _trpStdev;
36 int _numSat;
37 double _hDop;
38 std::string _log;
39 bool _error;
40};
41
42
43class t_frqBand {
44public:
45 static t_frequency::type toFreq(char sys, char bb) {
46 switch (bb) {
47 case '1':
48 if (sys == 'G') return t_frequency::G1;
49 else if (sys == 'R') return t_frequency::R1;
50 else if (sys == 'E') return t_frequency::E1;
51 else if (sys == 'C') return t_frequency::C1;
52 else return t_frequency::dummy;
53 case '2':
54 if (sys == 'G') return t_frequency::G2;
55 else if (sys == 'R') return t_frequency::R2;
56 else if (sys == 'C') return t_frequency::C2;
57 else return t_frequency::dummy;
58 case '5':
59 if (sys == 'G') return t_frequency::G5;
60 else if (sys == 'E') return t_frequency::E5;
61 else if (sys == 'C') return t_frequency::C5;
62 else return t_frequency::dummy;
63 case '6':
64 if (sys == 'E') return t_frequency::E6;
65 else if (sys == 'C') return t_frequency::C6;
66 else return t_frequency::dummy;
67 case '7':
68 if (sys == 'E') return t_frequency::E7;
69 else if (sys == 'C') return t_frequency::C7;
70 else return t_frequency::dummy;
71 case '8':
72 if (sys == 'E') return t_frequency::E8;
73 else if (sys == 'C') return t_frequency::C8;
74 else return t_frequency::dummy;
75 }
76 return t_frequency::dummy;
77 }
78};
79
80class t_lc {
81 public:
82 enum type {dummy = 0, c1, c2, cIF, l1, l2, lIF, MW, CL, GIM, maxLc};
83
84 static bool includesPhase(type tt) {
85 switch (tt) {
86 case l1:
87 case l2:
88 case lIF:
89 case MW:
90 case CL:
91 return true;
92 case c1:
93 case c2:
94 case cIF:
95 return false;
96 case dummy:
97 case maxLc:
98 case GIM:
99 return false;
100 }
101 return false;
102 }
103
104 static bool includesCode(type tt) {
105 switch (tt) {
106 case c1:
107 case c2:
108 case cIF:
109 case MW:
110 case CL:
111 return true;
112 case l1:
113 case l2:
114 case lIF:
115 return false;
116 case dummy:
117 case maxLc:
118 case GIM:
119 return false;
120 }
121 return false;
122 }
123
124 static t_frequency::type toFreq(char sys, type tt) {
125 switch (tt) {
126 case l1: case c1:
127 if (sys == 'G') return t_frequency::G1;
128 else if (sys == 'R') return t_frequency::R1;
129 else if (sys == 'E') return t_frequency::E1;
130 else if (sys == 'C') return t_frequency::C2;
131 else return t_frequency::dummy;
132 case l2: case c2:
133 if (sys == 'G') return t_frequency::G2;
134 else if (sys == 'R') return t_frequency::R2;
135 else if (sys == 'E') return t_frequency::E5;
136 else if (sys == 'C') return t_frequency::C6;
137 else return t_frequency::dummy;
138 case lIF: case cIF: case MW: case CL:
139 return t_frequency::dummy;
140 case dummy:
141 case maxLc:
142 case GIM:
143 return t_frequency::dummy;
144 }
145 return t_frequency::dummy;
146 }
147
148 static std::string toString(type tt) {
149 switch (tt) {
150 case l1: return "l1";
151 case l2: return "l2";
152 case lIF: return "lIF";
153 case MW: return "MW";
154 case CL: return "CL";
155 case c1: return "c1";
156 case c2: return "c2";
157 case cIF: return "cIF";
158 case GIM: return "GIM";
159 case dummy:
160 case maxLc:
161 return "";
162 }
163 return "";
164 }
165};
166
167class interface_pppClient {
168 public:
169 virtual ~interface_pppClient() {};
170 virtual void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output) = 0;
171 virtual void putEphemeris(const t_eph* eph) = 0;
172 virtual void putOrbCorrections(const std::vector<t_orbCorr*>& corr) = 0;
173 virtual void putClkCorrections(const std::vector<t_clkCorr*>& corr) = 0;
174 virtual void putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) = 0;
175};
176
177} // namespace BNC_PPP
178
179#endif
Note: See TracBrowser for help on using the repository browser.