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

Last change on this file since 10318 was 10228, checked in by stuerze, 13 months ago

minor changes

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:
[10038]51 t_satObs() {
52 _type = 0;
53 }
[6137]54 t_satObs(const t_satObs& old) { // copy constructor (deep copy)
55 _staID = old._staID;
56 _prn = old._prn;
57 _time = old._time;
[9567]58 _type = old._type;
[6137]59 for (unsigned ii = 0; ii < old._obs.size(); ii++) {
60 _obs.push_back(new t_frqObs(*old._obs[ii]));
61 }
62 }
[6812]63 /**
64 * Destructor of satellite measurement storage class
65 */
[10038]66 ~t_satObs() {
[6812]67 clear();
68 }
[6581]69
[6812]70 /**
71 * Cleanup function resets all elements to initial state.
72 */
[10038]73 inline void clear(void) {
[6812]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:
[10038]145 t_satCodeBias() {
146 _updateInt = 0;
147 }
[6475]148 static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
[6499]149 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
[6463]150 std::string _staID;
151 t_prn _prn;
152 bncTime _time;
[6556]153 unsigned int _updateInt;
[6463]154 std::vector<t_frqCodeBias> _bias;
[6135]155};
156
[6481]157class t_frqPhaseBias {
158 public:
159 t_frqPhaseBias() {
[7611]160 _value = 0.0;
[6481]161 _fixIndicator = 0;
162 _fixWideLaneIndicator = 0;
163 _jumpCounter = 0;
164 }
165 std::string _rnxType2ch;
166 double _value;
167 int _fixIndicator;
168 int _fixWideLaneIndicator;
169 int _jumpCounter;
170};
171
172class t_satPhaseBias {
173 public:
174 t_satPhaseBias() {
[6589]175 _updateInt = 0;
[6857]176 _dispBiasConstistInd = 0;
177 _MWConsistInd = 0;
[8617]178 _yaw = 0.0;
179 _yawRate = 0.0;
[6481]180 }
181 static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
[6499]182 static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
[6481]183 std::string _staID;
184 t_prn _prn;
185 bncTime _time;
[6857]186 unsigned int _updateInt; // not satellite specific
187 unsigned int _dispBiasConstistInd; // not satellite specific
188 unsigned int _MWConsistInd; // not satellite specific
[8617]189 double _yaw;
190 double _yawRate;
[6481]191 std::vector<t_frqPhaseBias> _bias;
192};
193
[6482]194class t_vTecLayer {
195 public:
[7611]196 t_vTecLayer() {
197 _height = 0.0;
198 }
[6482]199 double _height;
200 Matrix _C;
201 Matrix _S;
202};
203
204class t_vTec {
205 public:
[10038]206 t_vTec(){
207 _updateInt = 0;
208 }
[6482]209 static void write(std::ostream* out, const t_vTec& vTec);
[6499]210 static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
[6482]211 std::string _staID;
212 bncTime _time;
[6556]213 unsigned int _updateInt;
[6482]214 std::vector<t_vTecLayer> _layers;
215};
216
[6498]217class t_corrSSR {
218 public:
[8483]219 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
[6501]220 static e_type readEpoLine(const std::string& line, bncTime& epoTime,
[6556]221 unsigned int& updateInt, int& numEntries, std::string& staID);
[6498]222};
223
[6135]224#endif
Note: See TracBrowser for help on using the repository browser.