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

Last change on this file since 9926 was 9567, checked in by stuerze, 3 years ago

update regarding PPP

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 t_satObs(const t_satObs& old) { // copy constructor (deep copy)
53 _staID = old._staID;
54 _prn = old._prn;
55 _time = old._time;
56 _type = old._type;
57 for (unsigned ii = 0; ii < old._obs.size(); ii++) {
58 _obs.push_back(new t_frqObs(*old._obs[ii]));
59 }
60 }
61 /**
62 * Destructor of satellite measurement storage class
63 */
64 ~t_satObs()
65 {
66 clear();
67 }
68
69 /**
70 * Cleanup function resets all elements to initial state.
71 */
72 inline void clear(void)
73 {
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 static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
146 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
147 std::string _staID;
148 t_prn _prn;
149 bncTime _time;
150 unsigned int _updateInt;
151 std::vector<t_frqCodeBias> _bias;
152};
153
154class t_frqPhaseBias {
155 public:
156 t_frqPhaseBias() {
157 _value = 0.0;
158 _fixIndicator = 0;
159 _fixWideLaneIndicator = 0;
160 _jumpCounter = 0;
161 }
162 std::string _rnxType2ch;
163 double _value;
164 int _fixIndicator;
165 int _fixWideLaneIndicator;
166 int _jumpCounter;
167};
168
169class t_satPhaseBias {
170 public:
171 t_satPhaseBias() {
172 _updateInt = 0;
173 _dispBiasConstistInd = 0;
174 _MWConsistInd = 0;
175 _yaw = 0.0;
176 _yawRate = 0.0;
177 }
178 static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
179 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
180 std::string _staID;
181 t_prn _prn;
182 bncTime _time;
183 unsigned int _updateInt; // not satellite specific
184 unsigned int _dispBiasConstistInd; // not satellite specific
185 unsigned int _MWConsistInd; // not satellite specific
186 double _yaw;
187 double _yawRate;
188 std::vector<t_frqPhaseBias> _bias;
189};
190
191class t_vTecLayer {
192 public:
193 t_vTecLayer() {
194 _height = 0.0;
195 }
196 double _height;
197 Matrix _C;
198 Matrix _S;
199};
200
201class t_vTec {
202 public:
203 static void write(std::ostream* out, const t_vTec& vTec);
204 static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
205 std::string _staID;
206 bncTime _time;
207 unsigned int _updateInt;
208 std::vector<t_vTecLayer> _layers;
209};
210
211class t_corrSSR {
212 public:
213 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
214 static e_type readEpoLine(const std::string& line, bncTime& epoTime,
215 unsigned int& updateInt, int& numEntries, std::string& staID);
216};
217
218#endif
Note: See TracBrowser for help on using the repository browser.