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

Last change on this file since 5796 was 5796, checked in by mervart, 10 years ago
File size: 3.5 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
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_pppObs {
36 public:
37 t_pppObs() {
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_pppSatObs {
65 public:
66 t_pppSatObs() {}
67 ~t_pppSatObs() {for (unsigned ii = 0; ii < _obs.size(); ii++) delete _obs[ii];}
68 t_prn _prn;
69 bncTime _time;
70 std::vector<t_pppObs*> _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_bias {
99 public:
100 std::string _rnxType3ch;
101 double _value;
102};
103
104class t_satBiases {
105 public:
106 t_prn _prn;
107 bncTime _time;
108 int _nx;
109 int _jumpCount;
110 std::vector<t_bias> _biases;
111};
112
113class t_frequency {
114 public:
115 enum type {dummy = 0, G1, G2, R1, R2, maxFr};
116
117 static std::string toString(type tt) {
118 if (tt == G1) return "G1";
119 else if (tt == G2) return "G2";
120 else if (tt == R1) return "R1";
121 else if (tt == R2) return "R2";
122 return std::string();
123 }
124};
125
126class t_lc {
127 public:
128 enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
129
130 static bool need2ndFreq(type tt) {
131 if (tt == l2 || tt == c2 || tt == lIF || tt == cIF || tt == MW) return true;
132 return false;
133 }
134
135 static bool includesPhase(type tt) {
136 if (tt == l1 || tt == l2 || tt == lIF || tt == MW || tt == CL) return true;
137 return false;
138 }
139
140 static bool includesCode(type tt) {
141 if (tt == c1 || tt == c2 || tt == cIF || tt == MW || tt == CL) return true;
142 return false;
143 }
144
145 static std::string toString(type tt) {
146 if (tt == l1) return "l1";
147 else if (tt == l2) return "l2";
148 else if (tt == c1) return "c1";
149 else if (tt == c2) return "c2";
150 else if (tt == lIF) return "lIF";
151 else if (tt == cIF) return "cIF";
152 else if (tt == MW) return "MW";
153 else if (tt == CL) return "CL";
154 return std::string();
155 }
156};
157
158} // namespace BNC
159
160#endif
Note: See TracBrowser for help on using the repository browser.