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

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