source: ntrip/trunk/BNC/src/satObs.h@ 10539

Last change on this file since 10539 was 10228, checked in by stuerze, 13 months ago

minor changes

File size: 5.6 KB
Line 
1#ifndef SATOBS_H
2#define SATOBS_H
3
4#include <string>
5#include <vector>
6#include <newmat.h>
7
8#include <QtCore>
9
10#include "bncconst.h"
11#include "bnctime.h"
12#include "t_prn.h"
13
14class t_frqObs {
15 public:
16 t_frqObs() {
17 _code = 0.0;
18 _codeValid = false;
19 _phase = 0.0;
20 _phaseValid = false;
21 _doppler = 0.0;
22 _dopplerValid = false;
23 _snr = 0.0;
24 _snrValid = false;
25 _lockTime = -1.0;
26 _lockTimeValid = false;
27 _slip = false;
28 _slipCounter = 0;
29 _biasJumpCounter = 0;
30 _lockTimeIndicator = -1;
31 }
32 std::string _rnxType2ch;
33 double _code;
34 bool _codeValid;
35 double _phase;
36 bool _phaseValid;
37 double _doppler;
38 bool _dopplerValid;
39 double _snr;
40 bool _snrValid;
41 double _lockTime;
42 bool _lockTimeValid;
43 bool _slip; // RINEX
44 int _slipCounter; // RTCM2 or converted from RTCM3
45 int _lockTimeIndicator; // RTCM3
46 int _biasJumpCounter; // ??
47};
48
49class t_satObs {
50 public:
51 t_satObs() {
52 _type = 0;
53 }
54 t_satObs(const t_satObs& old) { // copy constructor (deep copy)
55 _staID = old._staID;
56 _prn = old._prn;
57 _time = old._time;
58 _type = old._type;
59 for (unsigned ii = 0; ii < old._obs.size(); ii++) {
60 _obs.push_back(new t_frqObs(*old._obs[ii]));
61 }
62 }
63 /**
64 * Destructor of satellite measurement storage class
65 */
66 ~t_satObs() {
67 clear();
68 }
69
70 /**
71 * Cleanup function resets all elements to initial state.
72 */
73 inline void clear(void) {
74 for (unsigned ii = 0; ii < _obs.size(); ii++)
75 delete _obs[ii];
76 _obs.clear();
77 _obs.resize(0);
78 _time.reset();
79 _prn.clear();
80 _staID.clear();
81 _type = 0;
82 }
83
84 std::string _staID;
85 t_prn _prn;
86 bncTime _time;
87 int _type;
88 std::vector<t_frqObs*> _obs;
89};
90
91class t_orbCorr {
92 public:
93 t_orbCorr();
94 static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList);
95 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_orbCorr>& corrList);
96 std::string _staID;
97 t_prn _prn;
98 unsigned int _iod;
99 bncTime _time;
100 unsigned int _updateInt;
101 char _system;
102 ColumnVector _xr;
103 ColumnVector _dotXr;
104};
105
106class t_clkCorr {
107 public:
108 t_clkCorr();
109 static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList);
110 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_clkCorr>& corrList);
111 std::string _staID;
112 t_prn _prn;
113 unsigned int _iod;
114 bncTime _time;
115 unsigned int _updateInt;
116 double _dClk;
117 double _dotDClk;
118 double _dotDotDClk;
119};
120
121class t_URA {
122 public:
123 t_URA();
124 static void writeEpoch(std::ostream* out, const QList<t_URA>& corrList);
125 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_URA>& corrList);
126 std::string _staID;
127 t_prn _prn;
128 unsigned int _iod;
129 bncTime _time;
130 unsigned int _updateInt;
131 double _ura;
132};
133
134class t_frqCodeBias {
135 public:
136 t_frqCodeBias() {
137 _value = 0.0;
138 }
139 std::string _rnxType2ch;
140 double _value;
141};
142
143class t_satCodeBias {
144 public:
145 t_satCodeBias() {
146 _updateInt = 0;
147 }
148 static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
149 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
150 std::string _staID;
151 t_prn _prn;
152 bncTime _time;
153 unsigned int _updateInt;
154 std::vector<t_frqCodeBias> _bias;
155};
156
157class t_frqPhaseBias {
158 public:
159 t_frqPhaseBias() {
160 _value = 0.0;
161 _fixIndicator = 0;
162 _fixWideLaneIndicator = 0;
163 _jumpCounter = 0;
164 }
165 std::string _rnxType2ch;
166 double _value;
167 int _fixIndicator;
168 int _fixWideLaneIndicator;
169 int _jumpCounter;
170};
171
172class t_satPhaseBias {
173 public:
174 t_satPhaseBias() {
175 _updateInt = 0;
176 _dispBiasConstistInd = 0;
177 _MWConsistInd = 0;
178 _yaw = 0.0;
179 _yawRate = 0.0;
180 }
181 static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
182 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
183 std::string _staID;
184 t_prn _prn;
185 bncTime _time;
186 unsigned int _updateInt; // not satellite specific
187 unsigned int _dispBiasConstistInd; // not satellite specific
188 unsigned int _MWConsistInd; // not satellite specific
189 double _yaw;
190 double _yawRate;
191 std::vector<t_frqPhaseBias> _bias;
192};
193
194class t_vTecLayer {
195 public:
196 t_vTecLayer() {
197 _height = 0.0;
198 }
199 double _height;
200 Matrix _C;
201 Matrix _S;
202};
203
204class t_vTec {
205 public:
206 t_vTec(){
207 _updateInt = 0;
208 }
209 static void write(std::ostream* out, const t_vTec& vTec);
210 static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
211 std::string _staID;
212 bncTime _time;
213 unsigned int _updateInt;
214 std::vector<t_vTecLayer> _layers;
215};
216
217class t_corrSSR {
218 public:
219 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
220 static e_type readEpoLine(const std::string& line, bncTime& epoTime,
221 unsigned int& updateInt, int& numEntries, std::string& staID);
222};
223
224#endif
Note: See TracBrowser for help on using the repository browser.