[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
|
---|
| 52 |
|
---|
| 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();
|
---|
[6275] | 62 | void dspSkyPlot(const QString&, const QByteArray&, QVector<t_polarPoint*>*,
|
---|
| 63 | const QByteArray&, QVector<t_polarPoint*>*, const QByteArray&, double);
|
---|
| 64 | void dspAvailPlot(const QString&, const QByteArray&);
|
---|
[4572] | 65 |
|
---|
[6270] | 66 | private:
|
---|
[6274] | 67 |
|
---|
| 68 | class t_qcObs {
|
---|
| 69 | public:
|
---|
| 70 | t_qcObs() {
|
---|
| 71 | _hasL1 = false;
|
---|
| 72 | _hasL2 = false;
|
---|
| 73 | _slipL1 = false;
|
---|
| 74 | _slipL2 = false;
|
---|
| 75 | _gapL1 = false;
|
---|
| 76 | _gapL2 = false;
|
---|
| 77 | _slotSet = false;
|
---|
[6281] | 78 | _eleSet = false;
|
---|
| 79 | _mpSet = false;
|
---|
[6274] | 80 | _slotNum = 0;
|
---|
[6281] | 81 | _rawMP1 = 0.0;
|
---|
| 82 | _rawMP2 = 0.0;
|
---|
| 83 | _stdMP1 = 0.0;
|
---|
| 84 | _stdMP2 = 0.0;
|
---|
[6274] | 85 | _SNR1 = 0.0;
|
---|
| 86 | _SNR2 = 0.0;
|
---|
[6277] | 87 | _eleDeg = 0.0;
|
---|
| 88 | _azDeg = 0.0;
|
---|
[6274] | 89 | }
|
---|
[6281] | 90 | bncTime _lastObsTime;
|
---|
| 91 | bool _hasL1;
|
---|
| 92 | bool _hasL2;
|
---|
| 93 | bool _slipL1;
|
---|
| 94 | bool _slipL2;
|
---|
| 95 | bool _gapL1;
|
---|
| 96 | bool _gapL2;
|
---|
| 97 | bool _slotSet;
|
---|
| 98 | int _slotNum;
|
---|
| 99 | bool _mpSet;
|
---|
| 100 | double _rawMP1;
|
---|
| 101 | double _rawMP2;
|
---|
| 102 | double _stdMP1;
|
---|
| 103 | double _stdMP2;
|
---|
| 104 | double _SNR1;
|
---|
| 105 | double _SNR2;
|
---|
| 106 | bool _eleSet;
|
---|
| 107 | double _eleDeg;
|
---|
| 108 | double _azDeg;
|
---|
[6274] | 109 | };
|
---|
| 110 |
|
---|
| 111 | class t_qcEpo {
|
---|
| 112 | public:
|
---|
| 113 | bncTime _epoTime;
|
---|
| 114 | double _PDOP;
|
---|
| 115 | QMap<t_prn, t_qcObs> _qcObs;
|
---|
| 116 | };
|
---|
| 117 |
|
---|
| 118 | class t_qcSat {
|
---|
| 119 | public:
|
---|
| 120 | t_qcSat() {
|
---|
| 121 | _numObs = 0;
|
---|
| 122 | _numSlipsFlagged = 0;
|
---|
| 123 | _numSlipsFound = 0;
|
---|
| 124 | _numGaps = 0;
|
---|
| 125 | }
|
---|
| 126 | int _numObs;
|
---|
| 127 | int _numSlipsFlagged;
|
---|
| 128 | int _numSlipsFound;
|
---|
| 129 | int _numGaps;
|
---|
| 130 | };
|
---|
| 131 |
|
---|
| 132 | class t_qcFile {
|
---|
| 133 | public:
|
---|
| 134 | t_qcFile() {clear();}
|
---|
| 135 | void clear() {_qcSat.clear(); _qcEpo.clear();}
|
---|
| 136 | bncTime _startTime;
|
---|
| 137 | bncTime _endTime;
|
---|
| 138 | QString _antennaName;
|
---|
| 139 | QString _markerName;
|
---|
| 140 | QString _receiverType;
|
---|
| 141 | double _interval;
|
---|
| 142 | QMap<t_prn, t_qcSat> _qcSat;
|
---|
| 143 | QVector<t_qcEpo> _qcEpo;
|
---|
| 144 | };
|
---|
| 145 |
|
---|
[6275] | 146 | private slots:
|
---|
| 147 | void slotDspSkyPlot(const QString& fileName, const QByteArray& title1,
|
---|
| 148 | QVector<t_polarPoint*>* data1, const QByteArray& title2,
|
---|
| 149 | QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
|
---|
| 150 |
|
---|
| 151 | void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
|
---|
| 152 |
|
---|
| 153 | private:
|
---|
[6270] | 154 | void analyzeFile(t_rnxObsFile* obsFile);
|
---|
[3900] | 155 |
|
---|
[6270] | 156 | void updateQcSat(const t_qcObs& qcObs, t_qcSat& qcSat);
|
---|
[4572] | 157 |
|
---|
[6281] | 158 | void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
|
---|
| 159 | const t_satObs& satObs, t_qcObs& qcObs);
|
---|
[4266] | 160 |
|
---|
[6281] | 161 | void analyzeMultipath();
|
---|
| 162 |
|
---|
[6270] | 163 | void preparePlotData(const t_rnxObsFile* obsFile);
|
---|
[4263] | 164 |
|
---|
[4679] | 165 | double cmpDOP(const ColumnVector& xyzSta) const;
|
---|
[4254] | 166 |
|
---|
[6270] | 167 | void printReport();
|
---|
| 168 |
|
---|
| 169 | QString _logFileName;
|
---|
| 170 | QFile* _logFile;
|
---|
| 171 | QTextStream* _log;
|
---|
| 172 | QStringList _obsFileNames;
|
---|
| 173 | QVector<t_rnxObsFile*> _rnxObsFiles;
|
---|
| 174 | QStringList _navFileNames;
|
---|
| 175 | QVector<t_eph*> _ephs;
|
---|
| 176 | t_rnxObsFile::t_rnxEpo* _currEpo;
|
---|
| 177 | t_qcFile _qcFile;
|
---|
| 178 | QMutex _mutex;
|
---|
[3900] | 179 | };
|
---|
| 180 |
|
---|
| 181 | #endif
|
---|