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

Last change on this file since 10599 was 10599, checked in by stuerze, 21 hours ago

ADDED: consideration of NAV type in all applications

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