[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"
|
---|
[3900] | 33 |
|
---|
[4338] | 34 | class t_polarPoint;
|
---|
| 35 |
|
---|
[6272] | 36 | class t_plotData {
|
---|
| 37 | public:
|
---|
| 38 | QVector<double> _mjdX24;
|
---|
[6273] | 39 | QVector<double> _numSat;
|
---|
[6272] | 40 | QVector<double> _PDOP;
|
---|
| 41 | QVector<double> _L1ok;
|
---|
| 42 | QVector<double> _L2ok;
|
---|
| 43 | QVector<double> _L1slip;
|
---|
| 44 | QVector<double> _L2slip;
|
---|
| 45 | QVector<double> _L1gap;
|
---|
| 46 | QVector<double> _L2gap;
|
---|
| 47 | QVector<double> _eleDeg;
|
---|
| 48 | };
|
---|
| 49 |
|
---|
[3900] | 50 | class t_reqcAnalyze : public QThread {
|
---|
| 51 | Q_OBJECT
|
---|
[7628] | 52 |
|
---|
[3900] | 53 | public:
|
---|
| 54 | t_reqcAnalyze(QObject* parent);
|
---|
[6270] | 55 | virtual void run();
|
---|
[3900] | 56 |
|
---|
| 57 | protected:
|
---|
| 58 | ~t_reqcAnalyze();
|
---|
| 59 |
|
---|
| 60 | signals:
|
---|
| 61 | void finished();
|
---|
[6322] | 62 | void dspSkyPlot(const QString&, const QString&, QVector<t_polarPoint*>*,
|
---|
| 63 | const QString&, QVector<t_polarPoint*>*, const QByteArray&, double);
|
---|
[6275] | 64 | void dspAvailPlot(const QString&, const QByteArray&);
|
---|
[4572] | 65 |
|
---|
[6270] | 66 | private:
|
---|
[6274] | 67 |
|
---|
[6285] | 68 | class t_qcFrq {
|
---|
| 69 | public:
|
---|
| 70 | t_qcFrq() {
|
---|
[6293] | 71 | _phaseValid = false;
|
---|
| 72 | _codeValid = false;
|
---|
| 73 | _slip = false;
|
---|
| 74 | _gap = false;
|
---|
| 75 | _setMP = false;
|
---|
| 76 | _rawMP = 0.0;
|
---|
| 77 | _stdMP = 0.0;
|
---|
| 78 | _SNR = 0.0;
|
---|
[6285] | 79 | }
|
---|
| 80 | QString _rnxType2ch;
|
---|
[6293] | 81 | bool _phaseValid;
|
---|
| 82 | bool _codeValid;
|
---|
[6285] | 83 | bool _slip;
|
---|
| 84 | bool _gap;
|
---|
| 85 | bool _setMP;
|
---|
| 86 | double _rawMP;
|
---|
| 87 | double _stdMP;
|
---|
| 88 | double _SNR;
|
---|
| 89 | };
|
---|
| 90 |
|
---|
[6288] | 91 | class t_qcSat {
|
---|
[6274] | 92 | public:
|
---|
[6288] | 93 | t_qcSat() {
|
---|
[6285] | 94 | _slotSet = false;
|
---|
| 95 | _eleSet = false;
|
---|
| 96 | _slotNum = 0;
|
---|
| 97 | _eleDeg = 0.0;
|
---|
| 98 | _azDeg = 0.0;
|
---|
[6274] | 99 | }
|
---|
[6285] | 100 | bool _slotSet;
|
---|
| 101 | bool _eleSet;
|
---|
| 102 | int _slotNum;
|
---|
| 103 | double _eleDeg;
|
---|
| 104 | double _azDeg;
|
---|
| 105 | QVector<t_qcFrq> _qcFrq;
|
---|
[6274] | 106 | };
|
---|
[7628] | 107 |
|
---|
[6274] | 108 | class t_qcEpo {
|
---|
| 109 | public:
|
---|
| 110 | bncTime _epoTime;
|
---|
| 111 | double _PDOP;
|
---|
[6288] | 112 | QMap<t_prn, t_qcSat> _qcSat;
|
---|
[6274] | 113 | };
|
---|
[7628] | 114 |
|
---|
[6285] | 115 | class t_qcFrqSum {
|
---|
[6274] | 116 | public:
|
---|
[6285] | 117 | t_qcFrqSum() {
|
---|
[6274] | 118 | _numObs = 0;
|
---|
| 119 | _numSlipsFlagged = 0;
|
---|
| 120 | _numSlipsFound = 0;
|
---|
| 121 | _numGaps = 0;
|
---|
[6312] | 122 | _numSNR = 0;
|
---|
| 123 | _sumSNR = 0.0;
|
---|
| 124 | _numMP = 0;
|
---|
| 125 | _sumMP = 0.0;
|
---|
[6274] | 126 | }
|
---|
[6312] | 127 | int _numObs;
|
---|
| 128 | int _numSlipsFlagged;
|
---|
| 129 | int _numSlipsFound;
|
---|
| 130 | int _numGaps;
|
---|
| 131 | int _numSNR;
|
---|
| 132 | double _sumSNR;
|
---|
| 133 | int _numMP;
|
---|
| 134 | double _sumMP;
|
---|
[6274] | 135 | };
|
---|
[6285] | 136 |
|
---|
| 137 | class t_qcSatSum {
|
---|
| 138 | public:
|
---|
| 139 | QMap<QString, t_qcFrqSum> _qcFrqSum;
|
---|
| 140 | };
|
---|
[7628] | 141 |
|
---|
[6274] | 142 | class t_qcFile {
|
---|
| 143 | public:
|
---|
[7628] | 144 | t_qcFile() {
|
---|
| 145 | clear();
|
---|
| 146 | _interval = 1.0;
|
---|
| 147 | }
|
---|
[6285] | 148 | void clear() {_qcSatSum.clear(); _qcEpo.clear();}
|
---|
| 149 | bncTime _startTime;
|
---|
| 150 | bncTime _endTime;
|
---|
| 151 | QString _antennaName;
|
---|
| 152 | QString _markerName;
|
---|
| 153 | QString _receiverType;
|
---|
| 154 | double _interval;
|
---|
| 155 | QMap<t_prn, t_qcSatSum> _qcSatSum;
|
---|
| 156 | QVector<t_qcEpo> _qcEpo;
|
---|
[6274] | 157 | };
|
---|
| 158 |
|
---|
[6275] | 159 | private slots:
|
---|
[6322] | 160 | void slotDspSkyPlot(const QString& fileName, const QString& title1,
|
---|
| 161 | QVector<t_polarPoint*>* data1, const QString& title2,
|
---|
[6275] | 162 | QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
|
---|
| 163 |
|
---|
| 164 | void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
|
---|
| 165 |
|
---|
| 166 | private:
|
---|
[6523] | 167 | void checkEphemerides();
|
---|
| 168 |
|
---|
[6539] | 169 | void analyzePlotSignals(QMap<char, QVector<QString> >& signalTypes);
|
---|
| 170 |
|
---|
[6270] | 171 | void analyzeFile(t_rnxObsFile* obsFile);
|
---|
[3900] | 172 |
|
---|
[7918] | 173 | void updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
|
---|
[4572] | 174 |
|
---|
[7918] | 175 | void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
|
---|
| 176 | const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
|
---|
[4266] | 177 |
|
---|
[7917] | 178 | void setExpectedObs(const bncTime& startTime, const bncTime& endTime,
|
---|
| 179 | double interval, const ColumnVector& xyzSta);
|
---|
| 180 |
|
---|
[6281] | 181 | void analyzeMultipath();
|
---|
| 182 |
|
---|
[6270] | 183 | void preparePlotData(const t_rnxObsFile* obsFile);
|
---|
[4263] | 184 |
|
---|
[4679] | 185 | double cmpDOP(const ColumnVector& xyzSta) const;
|
---|
[4254] | 186 |
|
---|
[6284] | 187 | void printReport(const t_rnxObsFile* obsFile);
|
---|
[6270] | 188 |
|
---|
[6539] | 189 | QString _logFileName;
|
---|
| 190 | QFile* _logFile;
|
---|
| 191 | QTextStream* _log;
|
---|
| 192 | QStringList _obsFileNames;
|
---|
| 193 | QVector<t_rnxObsFile*> _rnxObsFiles;
|
---|
| 194 | QStringList _navFileNames;
|
---|
| 195 | QString _reqcPlotSignals;
|
---|
| 196 | QMap<char, QVector<QString> > _signalTypes;
|
---|
[7917] | 197 | QMap<t_prn, int> _numExpObs;
|
---|
| 198 | QVector<char> _navFileIncomplete;
|
---|
[6563] | 199 | QStringList _defaultSignalTypes;
|
---|
[6539] | 200 | QVector<t_eph*> _ephs;
|
---|
| 201 | t_rnxObsFile::t_rnxEpo* _currEpo;
|
---|
| 202 | t_qcFile _qcFile;
|
---|
[3900] | 203 | };
|
---|
| 204 |
|
---|
| 205 | #endif
|
---|