[3900] | 1 | // Part of BNC, a utility for retrieving decoding and
|
---|
| 2 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
| 3 | //
|
---|
| 4 | // Copyright (C) 2007
|
---|
| 5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
| 6 | // http://www.bkg.bund.de
|
---|
| 7 | // Czech Technical University Prague, Department of Geodesy
|
---|
| 8 | // http://www.fsv.cvut.cz
|
---|
| 9 | //
|
---|
| 10 | // Email: euref-ip@bkg.bund.de
|
---|
| 11 | //
|
---|
| 12 | // This program is free software; you can redistribute it and/or
|
---|
| 13 | // modify it under the terms of the GNU General Public License
|
---|
| 14 | // as published by the Free Software Foundation, version 2.
|
---|
| 15 | //
|
---|
| 16 | // This program is distributed in the hope that it will be useful,
|
---|
| 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | // GNU General Public License for more details.
|
---|
| 20 | //
|
---|
| 21 | // You should have received a copy of the GNU General Public License
|
---|
| 22 | // along with this program; if not, write to the Free Software
|
---|
| 23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
| 24 |
|
---|
| 25 | #ifndef REQCANALYZE_H
|
---|
| 26 | #define REQCANALYZE_H
|
---|
| 27 |
|
---|
| 28 | #include <QtCore>
|
---|
[4254] | 29 | #include "rnxobsfile.h"
|
---|
| 30 | #include "rnxnavfile.h"
|
---|
[5738] | 31 | #include "ephemeris.h"
|
---|
[6137] | 32 | #include "satObs.h"
|
---|
[8557] | 33 | #include "polarplot.h"
|
---|
[3900] | 34 |
|
---|
[6272] | 35 | class t_plotData {
|
---|
| 36 | public:
|
---|
[8555] | 37 | struct t_hlpStatus {
|
---|
| 38 | QVector<double> _ok;
|
---|
| 39 | QVector<double> _slip;
|
---|
| 40 | QVector<double> _gap;
|
---|
| 41 | };
|
---|
| 42 | QVector<double> _mjdX24;
|
---|
| 43 | QVector<double> _numSat;
|
---|
| 44 | QVector<double> _PDOP;
|
---|
| 45 | QVector<double> _eleDeg;
|
---|
| 46 | QMap<char, t_hlpStatus> _status;
|
---|
[6272] | 47 | };
|
---|
| 48 |
|
---|
[3900] | 49 | class t_reqcAnalyze : public QThread {
|
---|
| 50 | Q_OBJECT
|
---|
[7628] | 51 |
|
---|
[3900] | 52 | public:
|
---|
| 53 | t_reqcAnalyze(QObject* parent);
|
---|
[6270] | 54 | virtual void run();
|
---|
[3900] | 55 |
|
---|
| 56 | protected:
|
---|
| 57 | ~t_reqcAnalyze();
|
---|
| 58 |
|
---|
[8557] | 59 | class t_skyPlotData {
|
---|
| 60 | public:
|
---|
[8558] | 61 | t_skyPlotData() {
|
---|
| 62 | _data = new QVector<t_polarPoint*>;
|
---|
| 63 | }
|
---|
[8557] | 64 | ~t_skyPlotData() {}
|
---|
[8558] | 65 | QString _title;
|
---|
| 66 | QVector<t_polarPoint*>* _data;
|
---|
[8557] | 67 | };
|
---|
| 68 |
|
---|
[3900] | 69 | signals:
|
---|
| 70 | void finished();
|
---|
[8557] | 71 | void dspSkyPlot(const QString&, QVector<t_skyPlotData> skyPlotData,
|
---|
| 72 | const QByteArray&, double);
|
---|
[6275] | 73 | void dspAvailPlot(const QString&, const QByteArray&);
|
---|
[4572] | 74 |
|
---|
[6270] | 75 | private:
|
---|
[6274] | 76 |
|
---|
[6285] | 77 | class t_qcFrq {
|
---|
| 78 | public:
|
---|
| 79 | t_qcFrq() {
|
---|
[6293] | 80 | _phaseValid = false;
|
---|
| 81 | _codeValid = false;
|
---|
| 82 | _slip = false;
|
---|
| 83 | _gap = false;
|
---|
| 84 | _setMP = false;
|
---|
| 85 | _rawMP = 0.0;
|
---|
| 86 | _stdMP = 0.0;
|
---|
| 87 | _SNR = 0.0;
|
---|
[6285] | 88 | }
|
---|
| 89 | QString _rnxType2ch;
|
---|
[6293] | 90 | bool _phaseValid;
|
---|
| 91 | bool _codeValid;
|
---|
[6285] | 92 | bool _slip;
|
---|
| 93 | bool _gap;
|
---|
| 94 | bool _setMP;
|
---|
| 95 | double _rawMP;
|
---|
| 96 | double _stdMP;
|
---|
| 97 | double _SNR;
|
---|
| 98 | };
|
---|
| 99 |
|
---|
[6288] | 100 | class t_qcSat {
|
---|
[6274] | 101 | public:
|
---|
[6288] | 102 | t_qcSat() {
|
---|
[6285] | 103 | _slotSet = false;
|
---|
| 104 | _eleSet = false;
|
---|
| 105 | _slotNum = 0;
|
---|
| 106 | _eleDeg = 0.0;
|
---|
| 107 | _azDeg = 0.0;
|
---|
[6274] | 108 | }
|
---|
[6285] | 109 | bool _slotSet;
|
---|
| 110 | bool _eleSet;
|
---|
| 111 | int _slotNum;
|
---|
| 112 | double _eleDeg;
|
---|
| 113 | double _azDeg;
|
---|
| 114 | QVector<t_qcFrq> _qcFrq;
|
---|
[6274] | 115 | };
|
---|
[7628] | 116 |
|
---|
[6274] | 117 | class t_qcEpo {
|
---|
| 118 | public:
|
---|
| 119 | bncTime _epoTime;
|
---|
| 120 | double _PDOP;
|
---|
[6288] | 121 | QMap<t_prn, t_qcSat> _qcSat;
|
---|
[6274] | 122 | };
|
---|
[7628] | 123 |
|
---|
[6285] | 124 | class t_qcFrqSum {
|
---|
[6274] | 125 | public:
|
---|
[6285] | 126 | t_qcFrqSum() {
|
---|
[6274] | 127 | _numObs = 0;
|
---|
| 128 | _numSlipsFlagged = 0;
|
---|
| 129 | _numSlipsFound = 0;
|
---|
| 130 | _numGaps = 0;
|
---|
[6312] | 131 | _numSNR = 0;
|
---|
| 132 | _sumSNR = 0.0;
|
---|
| 133 | _numMP = 0;
|
---|
| 134 | _sumMP = 0.0;
|
---|
[6274] | 135 | }
|
---|
[6312] | 136 | int _numObs;
|
---|
| 137 | int _numSlipsFlagged;
|
---|
| 138 | int _numSlipsFound;
|
---|
| 139 | int _numGaps;
|
---|
| 140 | int _numSNR;
|
---|
| 141 | double _sumSNR;
|
---|
| 142 | int _numMP;
|
---|
| 143 | double _sumMP;
|
---|
[6274] | 144 | };
|
---|
[6285] | 145 |
|
---|
| 146 | class t_qcSatSum {
|
---|
| 147 | public:
|
---|
| 148 | QMap<QString, t_qcFrqSum> _qcFrqSum;
|
---|
| 149 | };
|
---|
[7628] | 150 |
|
---|
[6274] | 151 | class t_qcFile {
|
---|
| 152 | public:
|
---|
[7628] | 153 | t_qcFile() {
|
---|
| 154 | clear();
|
---|
| 155 | _interval = 1.0;
|
---|
| 156 | }
|
---|
[6285] | 157 | void clear() {_qcSatSum.clear(); _qcEpo.clear();}
|
---|
| 158 | bncTime _startTime;
|
---|
| 159 | bncTime _endTime;
|
---|
| 160 | QString _antennaName;
|
---|
| 161 | QString _markerName;
|
---|
| 162 | QString _receiverType;
|
---|
| 163 | double _interval;
|
---|
| 164 | QMap<t_prn, t_qcSatSum> _qcSatSum;
|
---|
| 165 | QVector<t_qcEpo> _qcEpo;
|
---|
[6274] | 166 | };
|
---|
| 167 |
|
---|
[6275] | 168 | private slots:
|
---|
[8557] | 169 | void slotDspSkyPlot(const QString& fileName, QVector<t_skyPlotData> skyPlotData,
|
---|
| 170 | const QByteArray& scaleTitle, double maxValue);
|
---|
[6275] | 171 |
|
---|
| 172 | void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
|
---|
| 173 |
|
---|
| 174 | private:
|
---|
[6523] | 175 | void checkEphemerides();
|
---|
| 176 |
|
---|
[8555] | 177 | void analyzePlotSignals();
|
---|
[6539] | 178 |
|
---|
[6270] | 179 | void analyzeFile(t_rnxObsFile* obsFile);
|
---|
[3900] | 180 |
|
---|
[7918] | 181 | void updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
|
---|
[4572] | 182 |
|
---|
[7918] | 183 | void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
|
---|
| 184 | const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
|
---|
[4266] | 185 |
|
---|
[7917] | 186 | void setExpectedObs(const bncTime& startTime, const bncTime& endTime,
|
---|
| 187 | double interval, const ColumnVector& xyzSta);
|
---|
| 188 |
|
---|
[6281] | 189 | void analyzeMultipath();
|
---|
| 190 |
|
---|
[6270] | 191 | void preparePlotData(const t_rnxObsFile* obsFile);
|
---|
[4263] | 192 |
|
---|
[4679] | 193 | double cmpDOP(const ColumnVector& xyzSta) const;
|
---|
[4254] | 194 |
|
---|
[6284] | 195 | void printReport(const t_rnxObsFile* obsFile);
|
---|
[6270] | 196 |
|
---|
[8555] | 197 | QString _logFileName;
|
---|
| 198 | QFile* _logFile;
|
---|
| 199 | QTextStream* _log;
|
---|
| 200 | QStringList _obsFileNames;
|
---|
| 201 | QVector<t_rnxObsFile*> _rnxObsFiles;
|
---|
| 202 | QStringList _navFileNames;
|
---|
| 203 | QString _reqcPlotSignals;
|
---|
| 204 | QMap<char, QVector<char> > _signalTypes;
|
---|
| 205 | QMap<t_prn, int> _numExpObs;
|
---|
| 206 | QVector<char> _navFileIncomplete;
|
---|
| 207 | QStringList _defaultSignalTypes;
|
---|
| 208 | QVector<t_eph*> _ephs;
|
---|
| 209 | t_rnxObsFile::t_rnxEpo* _currEpo;
|
---|
| 210 | t_qcFile _qcFile;
|
---|
[3900] | 211 | };
|
---|
| 212 |
|
---|
| 213 | #endif
|
---|