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

Last change on this file since 9448 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
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() {
[9088]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;
[6135]31 }
[7611]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;
[8617]41 double _lockTime;
[9088]42 bool _lockTimeValid;
43 bool _slip; // RINEX
44 int _slipCounter; // RTCM2 or converted from RTCM3
45 int _lockTimeIndicator; // RTCM3
46 int _biasJumpCounter; // ??
[6135]47};
48
49class t_satObs {
50 public:
51 t_satObs() {}
[6137]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 }
[6812]60 /**
61 * Destructor of satellite measurement storage class
62 */
63 ~t_satObs()
64 {
65 clear();
66 }
[6581]67
[6812]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
[6137]82 std::string _staID;
[6135]83 t_prn _prn;
84 bncTime _time;
85 std::vector<t_frqObs*> _obs;
86};
87
88class t_orbCorr {
89 public:
[6466]90 t_orbCorr();
[6455]91 static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList);
[6499]92 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_orbCorr>& corrList);
[6141]93 std::string _staID;
[6135]94 t_prn _prn;
[7169]95 unsigned int _iod;
[6135]96 bncTime _time;
[6556]97 unsigned int _updateInt;
[6135]98 char _system;
[6157]99 ColumnVector _xr;
[7611]100 ColumnVector _dotXr;
[6135]101};
102
103class t_clkCorr {
104 public:
[6466]105 t_clkCorr();
[6455]106 static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList);
[6499]107 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_clkCorr>& corrList);
[6141]108 std::string _staID;
[6135]109 t_prn _prn;
[7169]110 unsigned int _iod;
[6135]111 bncTime _time;
[6556]112 unsigned int _updateInt;
[6135]113 double _dClk;
114 double _dotDClk;
115 double _dotDotDClk;
116};
117
[8483]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
[6463]131class t_frqCodeBias {
[6135]132 public:
[6463]133 t_frqCodeBias() {
[7611]134 _value = 0.0;
[6135]135 }
136 std::string _rnxType2ch;
[6463]137 double _value;
[6135]138};
139
[6463]140class t_satCodeBias {
[6135]141 public:
[6475]142 static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
[6499]143 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
[6463]144 std::string _staID;
145 t_prn _prn;
146 bncTime _time;
[6556]147 unsigned int _updateInt;
[6463]148 std::vector<t_frqCodeBias> _bias;
[6135]149};
150
[6481]151class t_frqPhaseBias {
152 public:
153 t_frqPhaseBias() {
[7611]154 _value = 0.0;
[6481]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() {
[6589]169 _updateInt = 0;
[6857]170 _dispBiasConstistInd = 0;
171 _MWConsistInd = 0;
[8617]172 _yaw = 0.0;
173 _yawRate = 0.0;
[6481]174 }
175 static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
[6499]176 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
[6481]177 std::string _staID;
178 t_prn _prn;
179 bncTime _time;
[6857]180 unsigned int _updateInt; // not satellite specific
181 unsigned int _dispBiasConstistInd; // not satellite specific
182 unsigned int _MWConsistInd; // not satellite specific
[8617]183 double _yaw;
184 double _yawRate;
[6481]185 std::vector<t_frqPhaseBias> _bias;
186};
187
[6482]188class t_vTecLayer {
189 public:
[7611]190 t_vTecLayer() {
191 _height = 0.0;
192 }
[6482]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);
[6499]201 static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
[6482]202 std::string _staID;
203 bncTime _time;
[6556]204 unsigned int _updateInt;
[6482]205 std::vector<t_vTecLayer> _layers;
206};
207
[6498]208class t_corrSSR {
209 public:
[8483]210 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
[6501]211 static e_type readEpoLine(const std::string& line, bncTime& epoTime,
[6556]212 unsigned int& updateInt, int& numEntries, std::string& staID);
[6498]213};
214
[6135]215#endif
Note: See TracBrowser for help on using the repository browser.