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