source: ntrip/trunk/BNC/src/PPP/ppp.h@ 5784

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