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

Last change on this file since 6017 was 6017, checked in by mervart, 10 years ago
File size: 3.6 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 _freq = 0.0;
41 _code = 0.0;
42 _codeValid = false;
43 _phase = 0.0;
44 _phaseValid = false;
45 _doppler = 0.0;
46 _dopplerValid = false;
47 _snr = 0.0;
48 _snrValid = false;
49 _slip = false;
50 _slipCounter = 0;
51 _biasJumpCounter = 0;
52 }
53 std::string _rnxType2ch;
54 double _freq;
55 double _code;
56 bool _codeValid;
57 double _phase;
58 bool _phaseValid;
59 double _doppler;
60 bool _dopplerValid;
61 double _snr;
62 bool _snrValid;
63 bool _slip;
64 int _slipCounter;
65 int _biasJumpCounter;
66};
67
68class t_satObs {
69 public:
70 t_satObs() {}
71 ~t_satObs() {for (unsigned ii = 0; ii < _obs.size(); ii++) delete _obs[ii];}
72 t_prn _prn;
73 bncTime _time;
74 std::vector<t_frqObs*> _obs;
75};
76
77class t_orbCorr {
78 public:
79 t_prn prn() const {return _prn;}
80 unsigned short IOD() const {return _iod;}
81 t_prn _prn;
82 unsigned short _iod;
83 bncTime _time;
84 char _system;
85 double _xr[3];
86 double _dotXr[3];
87};
88
89class t_clkCorr {
90 public:
91 t_prn prn() const {return _prn;}
92 unsigned short IOD() const {return _iod;}
93 t_prn _prn;
94 unsigned short _iod;
95 bncTime _time;
96 double _dClk;
97 double _dotDClk;
98 double _dotDotDClk;
99 double _clkPartial;
100};
101
102class t_frqBias {
103 public:
104 t_frqBias() {
105 _code = 0.0;
106 _codeValid = false;
107 _phase = 0.0;
108 _phaseValid = false;
109 }
110 std::string _rnxType2ch;
111 double _code;
112 bool _codeValid;
113 double _phase;
114 bool _phaseValid;
115};
116
117class t_satBias {
118 public:
119 t_prn _prn;
120 bncTime _time;
121 int _nx;
122 int _jumpCount;
123 std::vector<t_frqBias> _bias;
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_PPP
159
160#endif
Note: See TracBrowser for help on using the repository browser.