| 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>
|
|---|
| 29 | #include "rnxobsfile.h"
|
|---|
| 30 | #include "rnxnavfile.h"
|
|---|
| 31 | #include "RTCM/GPSDecoder.h"
|
|---|
| 32 | #include "RTCM3/ephemeris.h"
|
|---|
| 33 |
|
|---|
| 34 | class t_polarPoint;
|
|---|
| 35 |
|
|---|
| 36 | class t_availData {
|
|---|
| 37 | public:
|
|---|
| 38 | QVector<double> _L1ok;
|
|---|
| 39 | QVector<double> _L2ok;
|
|---|
| 40 | QVector<double> _L1slip;
|
|---|
| 41 | QVector<double> _L2slip;
|
|---|
| 42 | QVector<double> _L1gap;
|
|---|
| 43 | QVector<double> _L2gap;
|
|---|
| 44 | };
|
|---|
| 45 |
|
|---|
| 46 | class t_reqcAnalyze : public QThread {
|
|---|
| 47 | Q_OBJECT
|
|---|
| 48 |
|
|---|
| 49 | public:
|
|---|
| 50 | t_reqcAnalyze(QObject* parent);
|
|---|
| 51 |
|
|---|
| 52 | protected:
|
|---|
| 53 | ~t_reqcAnalyze();
|
|---|
| 54 |
|
|---|
| 55 | signals:
|
|---|
| 56 | void finished();
|
|---|
| 57 | void dspSkyPlot(const QString&,
|
|---|
| 58 | const QByteArray&,
|
|---|
| 59 | QVector<t_polarPoint*>*,
|
|---|
| 60 | const QByteArray&,
|
|---|
| 61 | QVector<t_polarPoint*>*,
|
|---|
| 62 | const QByteArray&, double);
|
|---|
| 63 |
|
|---|
| 64 | void dspAvailPlot(const QString&, const QByteArray&);
|
|---|
| 65 |
|
|---|
| 66 | private slots:
|
|---|
| 67 | void slotDspSkyPlot(const QString& fileName,
|
|---|
| 68 | const QByteArray& title1,
|
|---|
| 69 | QVector<t_polarPoint*>* data1,
|
|---|
| 70 | const QByteArray& title2,
|
|---|
| 71 | QVector<t_polarPoint*>* data2,
|
|---|
| 72 | const QByteArray& scaleTitle, double maxValue);
|
|---|
| 73 |
|
|---|
| 74 | void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
|
|---|
| 75 |
|
|---|
| 76 | public:
|
|---|
| 77 | virtual void run();
|
|---|
| 78 |
|
|---|
| 79 | private:
|
|---|
| 80 | class t_oneObs {
|
|---|
| 81 | public:
|
|---|
| 82 | t_oneObs(int GPSWeek, double GPSWeeks) {
|
|---|
| 83 | _GPSWeek = GPSWeek;
|
|---|
| 84 | _GPSWeeks = GPSWeeks;
|
|---|
| 85 | _hasL1 = false;
|
|---|
| 86 | _hasL2 = false;
|
|---|
| 87 | _slipL1 = false;
|
|---|
| 88 | _slipL2 = false;
|
|---|
| 89 | _MP1 = 0.0;
|
|---|
| 90 | _MP2 = 0.0;
|
|---|
| 91 | _SNR1 = 0.0;
|
|---|
| 92 | _SNR2 = 0.0;
|
|---|
| 93 | }
|
|---|
| 94 | int _GPSWeek;
|
|---|
| 95 | double _GPSWeeks;
|
|---|
| 96 | bool _hasL1;
|
|---|
| 97 | bool _hasL2;
|
|---|
| 98 | bool _slipL1;
|
|---|
| 99 | bool _slipL2;
|
|---|
| 100 | double _MP1;
|
|---|
| 101 | double _MP2;
|
|---|
| 102 | double _SNR1;
|
|---|
| 103 | double _SNR2;
|
|---|
| 104 | };
|
|---|
| 105 |
|
|---|
| 106 | class t_allObs {
|
|---|
| 107 | public:
|
|---|
| 108 | t_allObs() {}
|
|---|
| 109 | ~t_allObs() {
|
|---|
| 110 | for (int ii = 0; ii < _oneObsVec.size(); ii++) {
|
|---|
| 111 | delete _oneObsVec[ii];
|
|---|
| 112 | }
|
|---|
| 113 | }
|
|---|
| 114 | void addObs(const t_obs& obs);
|
|---|
| 115 | QVector<t_oneObs*> _oneObsVec;
|
|---|
| 116 | };
|
|---|
| 117 |
|
|---|
| 118 | void analyzeFile(t_rnxObsFile* obsFile);
|
|---|
| 119 | void preparePlotData(const QString& prn, const ColumnVector& xyz,
|
|---|
| 120 | double obsInterval,
|
|---|
| 121 | QVector<t_polarPoint*>* dataMP1,
|
|---|
| 122 | QVector<t_polarPoint*>* dataMP2,
|
|---|
| 123 | QVector<t_polarPoint*>* dataSNR1,
|
|---|
| 124 | QVector<t_polarPoint*>* dataSNR2);
|
|---|
| 125 |
|
|---|
| 126 | QString _logFileName;
|
|---|
| 127 | QFile* _logFile;
|
|---|
| 128 | QTextStream* _log;
|
|---|
| 129 | QStringList _obsFileNames;
|
|---|
| 130 | QVector<t_rnxObsFile*> _rnxObsFiles;
|
|---|
| 131 | QStringList _navFileNames;
|
|---|
| 132 | QVector<t_eph*> _ephs;
|
|---|
| 133 | t_rnxObsFile::t_rnxEpo* _currEpo;
|
|---|
| 134 | QMap<QString, t_allObs> _allObsMap;
|
|---|
| 135 | QMap<QString, t_availData> _availDataMap;
|
|---|
| 136 | };
|
|---|
| 137 |
|
|---|
| 138 | #endif
|
|---|