[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"
|
---|
[10599] | 13 | #include "ephemeris.h"
|
---|
[6135] | 14 |
|
---|
| 15 | class t_frqObs {
|
---|
| 16 | public:
|
---|
| 17 | t_frqObs() {
|
---|
[9088] | 18 | _code = 0.0;
|
---|
| 19 | _codeValid = false;
|
---|
| 20 | _phase = 0.0;
|
---|
| 21 | _phaseValid = false;
|
---|
| 22 | _doppler = 0.0;
|
---|
| 23 | _dopplerValid = false;
|
---|
| 24 | _snr = 0.0;
|
---|
| 25 | _snrValid = false;
|
---|
| 26 | _lockTime = -1.0;
|
---|
| 27 | _lockTimeValid = false;
|
---|
| 28 | _slip = false;
|
---|
| 29 | _slipCounter = 0;
|
---|
| 30 | _biasJumpCounter = 0;
|
---|
| 31 | _lockTimeIndicator = -1;
|
---|
[6135] | 32 | }
|
---|
[7611] | 33 | std::string _rnxType2ch;
|
---|
| 34 | double _code;
|
---|
| 35 | bool _codeValid;
|
---|
| 36 | double _phase;
|
---|
| 37 | bool _phaseValid;
|
---|
| 38 | double _doppler;
|
---|
| 39 | bool _dopplerValid;
|
---|
| 40 | double _snr;
|
---|
| 41 | bool _snrValid;
|
---|
[8617] | 42 | double _lockTime;
|
---|
[9088] | 43 | bool _lockTimeValid;
|
---|
| 44 | bool _slip; // RINEX
|
---|
| 45 | int _slipCounter; // RTCM2 or converted from RTCM3
|
---|
| 46 | int _lockTimeIndicator; // RTCM3
|
---|
| 47 | int _biasJumpCounter; // ??
|
---|
[6135] | 48 | };
|
---|
| 49 |
|
---|
| 50 | class t_satObs {
|
---|
| 51 | public:
|
---|
[10038] | 52 | t_satObs() {
|
---|
| 53 | _type = 0;
|
---|
| 54 | }
|
---|
[6137] | 55 | t_satObs(const t_satObs& old) { // copy constructor (deep copy)
|
---|
| 56 | _staID = old._staID;
|
---|
| 57 | _prn = old._prn;
|
---|
| 58 | _time = old._time;
|
---|
[9567] | 59 | _type = old._type;
|
---|
[6137] | 60 | for (unsigned ii = 0; ii < old._obs.size(); ii++) {
|
---|
| 61 | _obs.push_back(new t_frqObs(*old._obs[ii]));
|
---|
| 62 | }
|
---|
| 63 | }
|
---|
[6812] | 64 | /**
|
---|
| 65 | * Destructor of satellite measurement storage class
|
---|
| 66 | */
|
---|
[10038] | 67 | ~t_satObs() {
|
---|
[6812] | 68 | clear();
|
---|
| 69 | }
|
---|
[6581] | 70 |
|
---|
[6812] | 71 | /**
|
---|
| 72 | * Cleanup function resets all elements to initial state.
|
---|
| 73 | */
|
---|
[10038] | 74 | inline void clear(void) {
|
---|
[6812] | 75 | for (unsigned ii = 0; ii < _obs.size(); ii++)
|
---|
| 76 | delete _obs[ii];
|
---|
| 77 | _obs.clear();
|
---|
| 78 | _obs.resize(0);
|
---|
| 79 | _time.reset();
|
---|
| 80 | _prn.clear();
|
---|
| 81 | _staID.clear();
|
---|
[9544] | 82 | _type = 0;
|
---|
[6812] | 83 | }
|
---|
| 84 |
|
---|
[6137] | 85 | std::string _staID;
|
---|
[6135] | 86 | t_prn _prn;
|
---|
| 87 | bncTime _time;
|
---|
[10599] | 88 | int _type; // MT
|
---|
[6135] | 89 | std::vector<t_frqObs*> _obs;
|
---|
| 90 | };
|
---|
| 91 |
|
---|
| 92 | class t_orbCorr {
|
---|
| 93 | public:
|
---|
[6466] | 94 | t_orbCorr();
|
---|
[6455] | 95 | static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList);
|
---|
[6499] | 96 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_orbCorr>& corrList);
|
---|
[6141] | 97 | std::string _staID;
|
---|
[6135] | 98 | t_prn _prn;
|
---|
[7169] | 99 | unsigned int _iod;
|
---|
[6135] | 100 | bncTime _time;
|
---|
[6556] | 101 | unsigned int _updateInt;
|
---|
[6135] | 102 | char _system;
|
---|
[6157] | 103 | ColumnVector _xr;
|
---|
[7611] | 104 | ColumnVector _dotXr;
|
---|
[6135] | 105 | };
|
---|
| 106 |
|
---|
| 107 | class t_clkCorr {
|
---|
| 108 | public:
|
---|
[6466] | 109 | t_clkCorr();
|
---|
[6455] | 110 | static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList);
|
---|
[6499] | 111 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_clkCorr>& corrList);
|
---|
[6141] | 112 | std::string _staID;
|
---|
[6135] | 113 | t_prn _prn;
|
---|
[7169] | 114 | unsigned int _iod;
|
---|
[6135] | 115 | bncTime _time;
|
---|
[6556] | 116 | unsigned int _updateInt;
|
---|
[6135] | 117 | double _dClk;
|
---|
| 118 | double _dotDClk;
|
---|
| 119 | double _dotDotDClk;
|
---|
| 120 | };
|
---|
| 121 |
|
---|
[8483] | 122 | class t_URA {
|
---|
| 123 | public:
|
---|
| 124 | t_URA();
|
---|
| 125 | static void writeEpoch(std::ostream* out, const QList<t_URA>& corrList);
|
---|
| 126 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_URA>& corrList);
|
---|
| 127 | std::string _staID;
|
---|
| 128 | t_prn _prn;
|
---|
| 129 | unsigned int _iod;
|
---|
| 130 | bncTime _time;
|
---|
| 131 | unsigned int _updateInt;
|
---|
| 132 | double _ura;
|
---|
| 133 | };
|
---|
| 134 |
|
---|
[6463] | 135 | class t_frqCodeBias {
|
---|
[6135] | 136 | public:
|
---|
[6463] | 137 | t_frqCodeBias() {
|
---|
[7611] | 138 | _value = 0.0;
|
---|
[6135] | 139 | }
|
---|
| 140 | std::string _rnxType2ch;
|
---|
[6463] | 141 | double _value;
|
---|
[6135] | 142 | };
|
---|
| 143 |
|
---|
[6463] | 144 | class t_satCodeBias {
|
---|
[6135] | 145 | public:
|
---|
[10038] | 146 | t_satCodeBias() {
|
---|
| 147 | _updateInt = 0;
|
---|
| 148 | }
|
---|
[6475] | 149 | static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList);
|
---|
[6499] | 150 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satCodeBias>& biasList);
|
---|
[6463] | 151 | std::string _staID;
|
---|
| 152 | t_prn _prn;
|
---|
| 153 | bncTime _time;
|
---|
[6556] | 154 | unsigned int _updateInt;
|
---|
[6463] | 155 | std::vector<t_frqCodeBias> _bias;
|
---|
[6135] | 156 | };
|
---|
| 157 |
|
---|
[6481] | 158 | class t_frqPhaseBias {
|
---|
| 159 | public:
|
---|
| 160 | t_frqPhaseBias() {
|
---|
[7611] | 161 | _value = 0.0;
|
---|
[6481] | 162 | _fixIndicator = 0;
|
---|
| 163 | _fixWideLaneIndicator = 0;
|
---|
| 164 | _jumpCounter = 0;
|
---|
| 165 | }
|
---|
| 166 | std::string _rnxType2ch;
|
---|
| 167 | double _value;
|
---|
| 168 | int _fixIndicator;
|
---|
| 169 | int _fixWideLaneIndicator;
|
---|
| 170 | int _jumpCounter;
|
---|
| 171 | };
|
---|
| 172 |
|
---|
| 173 | class t_satPhaseBias {
|
---|
| 174 | public:
|
---|
| 175 | t_satPhaseBias() {
|
---|
[6589] | 176 | _updateInt = 0;
|
---|
[6857] | 177 | _dispBiasConstistInd = 0;
|
---|
| 178 | _MWConsistInd = 0;
|
---|
[8617] | 179 | _yaw = 0.0;
|
---|
| 180 | _yawRate = 0.0;
|
---|
[6481] | 181 | }
|
---|
| 182 | static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList);
|
---|
[6499] | 183 | static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_satPhaseBias>& biasList);
|
---|
[6481] | 184 | std::string _staID;
|
---|
| 185 | t_prn _prn;
|
---|
| 186 | bncTime _time;
|
---|
[6857] | 187 | unsigned int _updateInt; // not satellite specific
|
---|
| 188 | unsigned int _dispBiasConstistInd; // not satellite specific
|
---|
| 189 | unsigned int _MWConsistInd; // not satellite specific
|
---|
[8617] | 190 | double _yaw;
|
---|
| 191 | double _yawRate;
|
---|
[6481] | 192 | std::vector<t_frqPhaseBias> _bias;
|
---|
| 193 | };
|
---|
| 194 |
|
---|
[6482] | 195 | class t_vTecLayer {
|
---|
| 196 | public:
|
---|
[7611] | 197 | t_vTecLayer() {
|
---|
| 198 | _height = 0.0;
|
---|
| 199 | }
|
---|
[6482] | 200 | double _height;
|
---|
| 201 | Matrix _C;
|
---|
| 202 | Matrix _S;
|
---|
| 203 | };
|
---|
| 204 |
|
---|
| 205 | class t_vTec {
|
---|
| 206 | public:
|
---|
[10038] | 207 | t_vTec(){
|
---|
| 208 | _updateInt = 0;
|
---|
| 209 | }
|
---|
[6482] | 210 | static void write(std::ostream* out, const t_vTec& vTec);
|
---|
[6499] | 211 | static void read(const std::string& epoLine, std::istream& in, t_vTec& vTec);
|
---|
[6482] | 212 | std::string _staID;
|
---|
| 213 | bncTime _time;
|
---|
[6556] | 214 | unsigned int _updateInt;
|
---|
[6482] | 215 | std::vector<t_vTecLayer> _layers;
|
---|
| 216 | };
|
---|
| 217 |
|
---|
[6498] | 218 | class t_corrSSR {
|
---|
| 219 | public:
|
---|
[8483] | 220 | enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
|
---|
[6501] | 221 | static e_type readEpoLine(const std::string& line, bncTime& epoTime,
|
---|
[6556] | 222 | unsigned int& updateInt, int& numEntries, std::string& staID);
|
---|
[10599] | 223 | static t_eph::e_type getSsrNavTypeFlag(char sys, int num);
|
---|
[6498] | 224 | };
|
---|
[6135] | 225 | #endif
|
---|