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

Last change on this file since 6135 was 6135, checked in by mervart, 10 years ago
File size: 3.8 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 int _numSat;
34 double _pDop;
35 std::string _log;
36 bool _error;
37};
38
39class t_orbCorr {
40 public:
41 t_prn prn() const {return _prn;}
42 unsigned short IOD() const {return _iod;}
43 t_prn _prn;
44 unsigned short _iod;
45 bncTime _time;
46 char _system;
47 double _xr[3];
48 double _dotXr[3];
49};
50
51class t_clkCorr {
52 public:
53 t_prn prn() const {return _prn;}
54 unsigned short IOD() const {return _iod;}
55 t_prn _prn;
56 unsigned short _iod;
57 bncTime _time;
58 double _dClk;
59 double _dotDClk;
60 double _dotDotDClk;
61 double _clkPartial;
62};
63
64class t_frqBias {
65 public:
66 t_frqBias() {
67 _code = 0.0;
68 _codeValid = false;
69 _phase = 0.0;
70 _phaseValid = false;
71 }
72 std::string _rnxType2ch;
73 double _code;
74 bool _codeValid;
75 double _phase;
76 bool _phaseValid;
77};
78
79class t_satBias {
80 public:
81 t_prn _prn;
82 bncTime _time;
83 int _nx;
84 int _jumpCount;
85 std::vector<t_frqBias> _bias;
86};
87
88class t_lc {
89 public:
90 enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
91
92 static bool includesPhase(type tt) {
93 switch (tt) {
94 case l1:
95 case l2:
96 case lIF:
97 case MW:
98 case CL:
99 return true;
100 case c1:
101 case c2:
102 case cIF:
103 return false;
104 case dummy: case maxLc: return false;
105 }
106 return false;
107 }
108
109 static bool includesCode(type tt) {
110 switch (tt) {
111 case c1:
112 case c2:
113 case cIF:
114 case MW:
115 case CL:
116 return true;
117 case l1:
118 case l2:
119 case lIF:
120 return false;
121 case dummy: case maxLc: return false;
122 }
123 return false;
124 }
125
126 static t_frequency::type toFreq(char sys, type tt) {
127 switch (tt) {
128 case l1: case c1:
129 if (sys == 'G') return t_frequency::G1;
130 else if (sys == 'R') return t_frequency::R1;
131 else if (sys == 'E') return t_frequency::E1;
132 else return t_frequency::dummy;
133 case l2: case c2:
134 if (sys == 'G') return t_frequency::G2;
135 else if (sys == 'R') return t_frequency::R2;
136 else return t_frequency::dummy;
137 case lIF: case cIF: case MW: case CL:
138 return t_frequency::dummy;
139 case dummy: case maxLc: return t_frequency::dummy;
140 }
141 return t_frequency::dummy;
142 }
143
144 static std::string toString(type tt) {
145 switch (tt) {
146 case l1: return "l1";
147 case l2: return "l2";
148 case lIF: return "lIF";
149 case MW: return "MW";
150 case CL: return "CL";
151 case c1: return "c1";
152 case c2: return "c2";
153 case cIF: return "cIF";
154 case dummy: case maxLc: return "";
155 }
156 return "";
157 }
158};
159
160class interface_pppClient {
161 public:
162 virtual ~interface_pppClient() {};
163 virtual void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output) = 0;
164 virtual void putEphemeris(const t_eph* eph) = 0;
165 virtual void putOrbCorrections(const std::vector<t_orbCorr*>& corr) = 0;
166 virtual void putClkCorrections(const std::vector<t_clkCorr*>& corr) = 0;
167 virtual void putBiases(const std::vector<t_satBias*>& satBias) = 0;
168};
169
170} // namespace BNC_PPP
171
172#endif
Note: See TracBrowser for help on using the repository browser.