[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 |
|
---|
| 14 | class 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 |
|
---|
| 49 | class 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 |
|
---|
| 91 | class t_orbCorr {
|
---|
| 92 | public:
|
---|
[6466] | 93 | t_orbCorr();
|
---|
[10038] | 94 | t_orbCorr(const t_orbCorr& old) { // copy constructor (deep copy)
|
---|
| 95 | _staID = old._staID;
|
---|
| 96 | _prn = old._prn;
|
---|
| 97 | _iod = old._iod;
|
---|
| 98 | _time = old._time;
|
---|
| 99 | _updateInt = old._updateInt;
|
---|
| 100 | _system = old._system;
|
---|
| 101 | _xr = old._xr;
|
---|
| 102 | _dotXr = old._dotXr;
|
---|
| 103 | }
|
---|
[6455] | 104 | static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList);
|
---|
[6499] | 105 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_orbCorr>& 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 | char _system;
|
---|
[6157] | 112 | ColumnVector _xr;
|
---|
[7611] | 113 | ColumnVector _dotXr;
|
---|
[6135] | 114 | };
|
---|
| 115 |
|
---|
| 116 | class t_clkCorr {
|
---|
| 117 | public:
|
---|
[6466] | 118 | t_clkCorr();
|
---|
[10038] | 119 | t_clkCorr(const t_clkCorr& old) { // copy constructor (deep copy)
|
---|
| 120 | _staID = old._staID;
|
---|
| 121 | _prn = old._prn;
|
---|
| 122 | _iod = old._iod;
|
---|
| 123 | _time = old._time;
|
---|
| 124 | _updateInt = old._updateInt;
|
---|
| 125 | _dClk = old._dClk;
|
---|
| 126 | _dotDClk = old._dotDClk;
|
---|
| 127 | _dotDotDClk = old._dotDotDClk;
|
---|
| 128 | }
|
---|
[6455] | 129 | static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList);
|
---|
[6499] | 130 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_clkCorr>& corrList);
|
---|
[6141] | 131 | std::string _staID;
|
---|
[6135] | 132 | t_prn _prn;
|
---|
[7169] | 133 | unsigned int _iod;
|
---|
[6135] | 134 | bncTime _time;
|
---|
[6556] | 135 | unsigned int _updateInt;
|
---|
[6135] | 136 | double _dClk;
|
---|
| 137 | double _dotDClk;
|
---|
| 138 | double _dotDotDClk;
|
---|
| 139 | };
|
---|
| 140 |
|
---|
[8483] | 141 | class t_URA {
|
---|
| 142 | public:
|
---|
| 143 | t_URA();
|
---|
| 144 | static void writeEpoch(std::ostream* out, const QList<t_URA>& corrList);
|
---|
| 145 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_URA>& corrList);
|
---|
| 146 | std::string _staID;
|
---|
| 147 | t_prn _prn;
|
---|
| 148 | unsigned int _iod;
|
---|
| 149 | bncTime _time;
|
---|
| 150 | unsigned int _updateInt;
|
---|
| 151 | double _ura;
|
---|
| 152 | };
|
---|
| 153 |
|
---|
[6463] | 154 | class t_frqCodeBias {
|
---|
[6135] | 155 | public:
|
---|
[6463] | 156 | t_frqCodeBias() {
|
---|
[7611] | 157 | _value = 0.0;
|
---|
[6135] | 158 | }
|
---|
| 159 | std::string _rnxType2ch;
|
---|
[6463] | 160 | double _value;
|
---|
[6135] | 161 | };
|
---|
| 162 |
|
---|
[6463] | 163 | class t_satCodeBias {
|
---|
[6135] | 164 | public:
|
---|
[10038] | 165 | t_satCodeBias() {
|
---|
| 166 | _updateInt = 0;
|
---|
| 167 | }
|
---|
| 168 | t_satCodeBias(const t_satCodeBias& old) { // copy constructor (deep copy)
|
---|
| 169 | _staID = old._staID;
|
---|
| 170 | _prn = old._prn;
|
---|
| 171 | _time = old._time;
|
---|
| 172 | _updateInt = old._updateInt;
|
---|
| 173 | for (unsigned ii = 0; ii < old._bias.size(); ii++) {
|
---|
| 174 | _bias.push_back(old._bias[ii]);
|
---|
| 175 | }
|
---|
| 176 | }
|
---|
[6475] | 177 | static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
|
---|
[6499] | 178 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
|
---|
[6463] | 179 | std::string _staID;
|
---|
| 180 | t_prn _prn;
|
---|
| 181 | bncTime _time;
|
---|
[6556] | 182 | unsigned int _updateInt;
|
---|
[6463] | 183 | std::vector<t_frqCodeBias> _bias;
|
---|
[6135] | 184 | };
|
---|
| 185 |
|
---|
[6481] | 186 | class t_frqPhaseBias {
|
---|
| 187 | public:
|
---|
| 188 | t_frqPhaseBias() {
|
---|
[7611] | 189 | _value = 0.0;
|
---|
[6481] | 190 | _fixIndicator = 0;
|
---|
| 191 | _fixWideLaneIndicator = 0;
|
---|
| 192 | _jumpCounter = 0;
|
---|
| 193 | }
|
---|
| 194 | std::string _rnxType2ch;
|
---|
| 195 | double _value;
|
---|
| 196 | int _fixIndicator;
|
---|
| 197 | int _fixWideLaneIndicator;
|
---|
| 198 | int _jumpCounter;
|
---|
| 199 | };
|
---|
| 200 |
|
---|
| 201 | class t_satPhaseBias {
|
---|
| 202 | public:
|
---|
| 203 | t_satPhaseBias() {
|
---|
[6589] | 204 | _updateInt = 0;
|
---|
[6857] | 205 | _dispBiasConstistInd = 0;
|
---|
| 206 | _MWConsistInd = 0;
|
---|
[8617] | 207 | _yaw = 0.0;
|
---|
| 208 | _yawRate = 0.0;
|
---|
[6481] | 209 | }
|
---|
[10038] | 210 | t_satPhaseBias(const t_satPhaseBias& old) { // copy constructor (deep copy)
|
---|
| 211 | _staID = old._staID;
|
---|
| 212 | _prn = old._prn;
|
---|
| 213 | _time = old._time;
|
---|
| 214 | _updateInt = old._updateInt;
|
---|
| 215 | _dispBiasConstistInd = old._dispBiasConstistInd;
|
---|
| 216 | _MWConsistInd = old._MWConsistInd;
|
---|
| 217 | _yaw = old._yaw;
|
---|
| 218 | _yawRate = old._yawRate;
|
---|
| 219 | for (unsigned ii = 0; ii < old._bias.size(); ii++) {
|
---|
| 220 | _bias.push_back(old._bias[ii]);
|
---|
| 221 | }
|
---|
| 222 | }
|
---|
[6481] | 223 | static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
|
---|
[6499] | 224 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
|
---|
[6481] | 225 | std::string _staID;
|
---|
| 226 | t_prn _prn;
|
---|
| 227 | bncTime _time;
|
---|
[6857] | 228 | unsigned int _updateInt; // not satellite specific
|
---|
| 229 | unsigned int _dispBiasConstistInd; // not satellite specific
|
---|
| 230 | unsigned int _MWConsistInd; // not satellite specific
|
---|
[8617] | 231 | double _yaw;
|
---|
| 232 | double _yawRate;
|
---|
[6481] | 233 | std::vector<t_frqPhaseBias> _bias;
|
---|
| 234 | };
|
---|
| 235 |
|
---|
[6482] | 236 | class t_vTecLayer {
|
---|
| 237 | public:
|
---|
[7611] | 238 | t_vTecLayer() {
|
---|
| 239 | _height = 0.0;
|
---|
| 240 | }
|
---|
[6482] | 241 | double _height;
|
---|
| 242 | Matrix _C;
|
---|
| 243 | Matrix _S;
|
---|
| 244 | };
|
---|
| 245 |
|
---|
| 246 | class t_vTec {
|
---|
| 247 | public:
|
---|
[10038] | 248 | t_vTec(){
|
---|
| 249 | _updateInt = 0;
|
---|
| 250 | }
|
---|
| 251 | t_vTec(const t_vTec& old) { // copy constructor (deep copy)
|
---|
| 252 | _staID = old._staID;
|
---|
| 253 | _time = old._time;
|
---|
| 254 | _updateInt = old._updateInt;
|
---|
| 255 | for (unsigned ii = 0; ii < old._layers.size(); ii++) {
|
---|
| 256 | _layers.push_back(old._layers[ii]);
|
---|
| 257 | }
|
---|
| 258 | }
|
---|
[6482] | 259 | static void write(std::ostream* out, const t_vTec& vTec);
|
---|
[6499] | 260 | static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
|
---|
[6482] | 261 | std::string _staID;
|
---|
| 262 | bncTime _time;
|
---|
[6556] | 263 | unsigned int _updateInt;
|
---|
[6482] | 264 | std::vector<t_vTecLayer> _layers;
|
---|
| 265 | };
|
---|
| 266 |
|
---|
[6498] | 267 | class t_corrSSR {
|
---|
| 268 | public:
|
---|
[8483] | 269 | enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
|
---|
[6501] | 270 | static e_type readEpoLine(const std::string& line, bncTime& epoTime,
|
---|
[6556] | 271 | unsigned int& updateInt, int& numEntries, std::string& staID);
|
---|
[6498] | 272 | };
|
---|
| 273 |
|
---|
[6135] | 274 | #endif
|
---|