source: ntrip/branches/BNC_2.12/src/satObs.h@ 8616

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

a computed lock time is added for RTCM3 phase observations as an optional feed engine output

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