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

Last change on this file since 9313 was 9088, checked in by stuerze, 4 years ago

adjusted allocation of slip and LTI according to the respective RTCM version

File size: 5.5 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 for (unsigned ii = 0; ii < old._obs.size(); ii++) {
57 _obs.push_back(new t_frqObs(*old._obs[ii]));
58 }
59 }
60 /**
61 * Destructor of satellite measurement storage class
62 */
63 ~t_satObs()
64 {
65 clear();
66 }
67
68 /**
69 * Cleanup function resets all elements to initial state.
70 */
71 inline void clear(void)
72 {
73 for (unsigned ii = 0; ii < _obs.size(); ii++)
74 delete _obs[ii];
75 _obs.clear();
76 _obs.resize(0);
77 _time.reset();
78 _prn.clear();
79 _staID.clear();
80 }
81
82 std::string _staID;
83 t_prn _prn;
84 bncTime _time;
85 std::vector<t_frqObs*> _obs;
86};
87
88class t_orbCorr {
89 public:
90 t_orbCorr();
91 static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList);
92 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_orbCorr>& corrList);
93 std::string _staID;
94 t_prn _prn;
95 unsigned int _iod;
96 bncTime _time;
97 unsigned int _updateInt;
98 char _system;
99 ColumnVector _xr;
100 ColumnVector _dotXr;
101};
102
103class t_clkCorr {
104 public:
105 t_clkCorr();
106 static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList);
107 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_clkCorr>& corrList);
108 std::string _staID;
109 t_prn _prn;
110 unsigned int _iod;
111 bncTime _time;
112 unsigned int _updateInt;
113 double _dClk;
114 double _dotDClk;
115 double _dotDotDClk;
116};
117
118class t_URA {
119 public:
120 t_URA();
121 static void writeEpoch(std::ostream* out, const QList<t_URA>& corrList);
122 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_URA>& corrList);
123 std::string _staID;
124 t_prn _prn;
125 unsigned int _iod;
126 bncTime _time;
127 unsigned int _updateInt;
128 double _ura;
129};
130
131class t_frqCodeBias {
132 public:
133 t_frqCodeBias() {
134 _value = 0.0;
135 }
136 std::string _rnxType2ch;
137 double _value;
138};
139
140class t_satCodeBias {
141 public:
142 static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
143 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
144 std::string _staID;
145 t_prn _prn;
146 bncTime _time;
147 unsigned int _updateInt;
148 std::vector<t_frqCodeBias> _bias;
149};
150
151class t_frqPhaseBias {
152 public:
153 t_frqPhaseBias() {
154 _value = 0.0;
155 _fixIndicator = 0;
156 _fixWideLaneIndicator = 0;
157 _jumpCounter = 0;
158 }
159 std::string _rnxType2ch;
160 double _value;
161 int _fixIndicator;
162 int _fixWideLaneIndicator;
163 int _jumpCounter;
164};
165
166class t_satPhaseBias {
167 public:
168 t_satPhaseBias() {
169 _updateInt = 0;
170 _dispBiasConstistInd = 0;
171 _MWConsistInd = 0;
172 _yaw = 0.0;
173 _yawRate = 0.0;
174 }
175 static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
176 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
177 std::string _staID;
178 t_prn _prn;
179 bncTime _time;
180 unsigned int _updateInt; // not satellite specific
181 unsigned int _dispBiasConstistInd; // not satellite specific
182 unsigned int _MWConsistInd; // not satellite specific
183 double _yaw;
184 double _yawRate;
185 std::vector<t_frqPhaseBias> _bias;
186};
187
188class t_vTecLayer {
189 public:
190 t_vTecLayer() {
191 _height = 0.0;
192 }
193 double _height;
194 Matrix _C;
195 Matrix _S;
196};
197
198class t_vTec {
199 public:
200 static void write(std::ostream* out, const t_vTec& vTec);
201 static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
202 std::string _staID;
203 bncTime _time;
204 unsigned int _updateInt;
205 std::vector<t_vTecLayer> _layers;
206};
207
208class t_corrSSR {
209 public:
210 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
211 static e_type readEpoLine(const std::string& line, bncTime& epoTime,
212 unsigned int& updateInt, int& numEntries, std::string& staID);
213};
214
215#endif
Note: See TracBrowser for help on using the repository browser.