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