| 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_reqcAnalyze : public QThread {
|
|---|
| 37 | Q_OBJECT
|
|---|
| 38 |
|
|---|
| 39 | public:
|
|---|
| 40 | t_reqcAnalyze(QObject* parent);
|
|---|
| 41 |
|
|---|
| 42 | protected:
|
|---|
| 43 | ~t_reqcAnalyze();
|
|---|
| 44 |
|
|---|
| 45 | signals:
|
|---|
| 46 | void finished();
|
|---|
| 47 | void displayGraph(const QString& fileName,
|
|---|
| 48 | const QByteArray&,
|
|---|
| 49 | QVector<t_polarPoint*>*,
|
|---|
| 50 | const QByteArray&,
|
|---|
| 51 | QVector<t_polarPoint*>*,
|
|---|
| 52 | const QByteArray&, double);
|
|---|
| 53 |
|
|---|
| 54 | private slots:
|
|---|
| 55 | void slotDisplayGraph(const QString& fileName,
|
|---|
| 56 | const QByteArray& title1,
|
|---|
| 57 | QVector<t_polarPoint*>* data1,
|
|---|
| 58 | const QByteArray& title2,
|
|---|
| 59 | QVector<t_polarPoint*>* data2,
|
|---|
| 60 | const QByteArray& scaleTitle, double maxValue);
|
|---|
| 61 |
|
|---|
| 62 | public:
|
|---|
| 63 | virtual void run();
|
|---|
| 64 |
|
|---|
| 65 | private:
|
|---|
| 66 | class t_anaObs {
|
|---|
| 67 | public:
|
|---|
| 68 | t_anaObs(int GPSWeek, double GPSWeeks) {
|
|---|
| 69 | _GPSWeek = GPSWeek;
|
|---|
| 70 | _GPSWeeks = GPSWeeks;
|
|---|
| 71 | _MP1 = 0.0;
|
|---|
| 72 | _MP2 = 0.0;
|
|---|
| 73 | _SNR1 = 0.0;
|
|---|
| 74 | _SNR2 = 0.0;
|
|---|
| 75 | }
|
|---|
| 76 | int _GPSWeek;
|
|---|
| 77 | double _GPSWeeks;
|
|---|
| 78 | double _MP1;
|
|---|
| 79 | double _MP2;
|
|---|
| 80 | double _SNR1;
|
|---|
| 81 | double _SNR2;
|
|---|
| 82 | };
|
|---|
| 83 |
|
|---|
| 84 | class t_satStat {
|
|---|
| 85 | public:
|
|---|
| 86 | t_satStat() {}
|
|---|
| 87 | ~t_satStat() {
|
|---|
| 88 | for (int ii = 0; ii < anaObs.size(); ii++) {
|
|---|
| 89 | delete anaObs[ii];
|
|---|
| 90 | }
|
|---|
| 91 | }
|
|---|
| 92 | void addObs(const t_obs& obs);
|
|---|
| 93 | QVector<t_anaObs*> anaObs;
|
|---|
| 94 | };
|
|---|
| 95 |
|
|---|
| 96 | void analyzeFile(t_rnxObsFile* obsFile);
|
|---|
| 97 | void analyzeMultipathAndSNR(const QString& prn,
|
|---|
| 98 | const t_satStat& satStat,
|
|---|
| 99 | const ColumnVector& xyz,
|
|---|
| 100 | double obsInterval,
|
|---|
| 101 | QVector<t_polarPoint*>* dataMP1,
|
|---|
| 102 | QVector<t_polarPoint*>* dataMP2,
|
|---|
| 103 | QVector<t_polarPoint*>* dataSNR1,
|
|---|
| 104 | QVector<t_polarPoint*>* dataSNR2);
|
|---|
| 105 |
|
|---|
| 106 | QString _logFileName;
|
|---|
| 107 | QFile* _logFile;
|
|---|
| 108 | QTextStream* _log;
|
|---|
| 109 | QStringList _obsFileNames;
|
|---|
| 110 | QVector<t_rnxObsFile*> _rnxObsFiles;
|
|---|
| 111 | QStringList _navFileNames;
|
|---|
| 112 | QVector<t_eph*> _ephs;
|
|---|
| 113 | QMap<QString, t_satStat> _satStat;
|
|---|
| 114 | t_rnxObsFile::t_rnxEpo* _currEpo;
|
|---|
| 115 | };
|
|---|
| 116 |
|
|---|
| 117 | #endif
|
|---|