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

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