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

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

update regarding PPP

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