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

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

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

File size: 5.3 KB
RevLine 
[6135]1#ifndef SATOBS_H
2#define SATOBS_H
3
4#include <string>
5#include <vector>
6#include <newmat.h>
7
[6455]8#include <QtCore>
9
[6135]10#include "bncconst.h"
11#include "bnctime.h"
12#include "t_prn.h"
13
14class t_frqObs {
15 public:
16 t_frqObs() {
[7611]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;
[8616]25 _lockTime = 0.0;
26 _lockTimeValid = false;
[7611]27 _slip = false;
28 _slipCounter = 0;
[6135]29 _biasJumpCounter = 0;
30 }
[7611]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;
[8616]40 double _lockTime;
41 bool _lockTimeValid;
[7611]42 bool _slip;
43 int _slipCounter;
[6135]44 int _biasJumpCounter;
45};
46
47class t_satObs {
48 public:
49 t_satObs() {}
[6137]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 }
[6812]58 /**
59 * Destructor of satellite measurement storage class
60 */
61 ~t_satObs()
62 {
63 clear();
64 }
[6581]65
[6812]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
[6137]80 std::string _staID;
[6135]81 t_prn _prn;
82 bncTime _time;
83 std::vector<t_frqObs*> _obs;
84};
85
86class t_orbCorr {
87 public:
[6466]88 t_orbCorr();
[6455]89 static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList);
[6499]90 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_orbCorr>& corrList);
[6141]91 std::string _staID;
[6135]92 t_prn _prn;
[7169]93 unsigned int _iod;
[6135]94 bncTime _time;
[6556]95 unsigned int _updateInt;
[6135]96 char _system;
[6157]97 ColumnVector _xr;
[7611]98 ColumnVector _dotXr;
[6135]99};
100
101class t_clkCorr {
102 public:
[6466]103 t_clkCorr();
[6455]104 static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList);
[6499]105 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_clkCorr>& corrList);
[6141]106 std::string _staID;
[6135]107 t_prn _prn;
[7169]108 unsigned int _iod;
[6135]109 bncTime _time;
[6556]110 unsigned int _updateInt;
[6135]111 double _dClk;
112 double _dotDClk;
113 double _dotDotDClk;
114};
115
[8484]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
[6463]129class t_frqCodeBias {
[6135]130 public:
[6463]131 t_frqCodeBias() {
[7611]132 _value = 0.0;
[6135]133 }
134 std::string _rnxType2ch;
[6463]135 double _value;
[6135]136};
137
[6463]138class t_satCodeBias {
[6135]139 public:
[6475]140 static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
[6499]141 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
[6463]142 std::string _staID;
143 t_prn _prn;
144 bncTime _time;
[6556]145 unsigned int _updateInt;
[6463]146 std::vector<t_frqCodeBias> _bias;
[6135]147};
148
[6481]149class t_frqPhaseBias {
150 public:
151 t_frqPhaseBias() {
[7611]152 _value = 0.0;
[6481]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() {
[6589]167 _updateInt = 0;
[6857]168 _dispBiasConstistInd = 0;
169 _MWConsistInd = 0;
[6481]170 _yawDeg = 0.0;
171 _yawDegRate = 0.0;
172 }
173 static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
[6499]174 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
[6481]175 std::string _staID;
176 t_prn _prn;
177 bncTime _time;
[6857]178 unsigned int _updateInt; // not satellite specific
179 unsigned int _dispBiasConstistInd; // not satellite specific
180 unsigned int _MWConsistInd; // not satellite specific
[6481]181 double _yawDeg;
182 double _yawDegRate;
183 std::vector<t_frqPhaseBias> _bias;
184};
185
[6482]186class t_vTecLayer {
187 public:
[7611]188 t_vTecLayer() {
189 _height = 0.0;
190 }
[6482]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);
[6499]199 static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
[6482]200 std::string _staID;
201 bncTime _time;
[6556]202 unsigned int _updateInt;
[6482]203 std::vector<t_vTecLayer> _layers;
204};
205
[6498]206class t_corrSSR {
207 public:
[8484]208 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
[6501]209 static e_type readEpoLine(const std::string& line, bncTime& epoTime,
[6556]210 unsigned int& updateInt, int& numEntries, std::string& staID);
[6498]211};
212
[6135]213#endif
Note: See TracBrowser for help on using the repository browser.