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 "ephemeris.h"
|
---|
32 | #include "satObs.h"
|
---|
33 |
|
---|
34 | class t_polarPoint;
|
---|
35 |
|
---|
36 | class t_plotData {
|
---|
37 | public:
|
---|
38 | QVector<double> _mjdX24;
|
---|
39 | QVector<double> _numSat;
|
---|
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 |
|
---|
50 | class t_reqcAnalyze : public QThread {
|
---|
51 | Q_OBJECT
|
---|
52 |
|
---|
53 | public:
|
---|
54 | t_reqcAnalyze(QObject* parent);
|
---|
55 | virtual void run();
|
---|
56 |
|
---|
57 | protected:
|
---|
58 | ~t_reqcAnalyze();
|
---|
59 |
|
---|
60 | signals:
|
---|
61 | void finished();
|
---|
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&);
|
---|
65 |
|
---|
66 | private:
|
---|
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;
|
---|
78 | _slotNum = 0;
|
---|
79 | _MP1 = 0.0;
|
---|
80 | _MP2 = 0.0;
|
---|
81 | _SNR1 = 0.0;
|
---|
82 | _SNR2 = 0.0;
|
---|
83 | }
|
---|
84 | t_irc set(const t_satObs& obs);
|
---|
85 | double _eleDeg;
|
---|
86 | double _azDeg;
|
---|
87 | bool _hasL1;
|
---|
88 | bool _hasL2;
|
---|
89 | bool _slipL1;
|
---|
90 | bool _slipL2;
|
---|
91 | bool _gapL1;
|
---|
92 | bool _gapL2;
|
---|
93 | bool _slotSet;
|
---|
94 | int _slotNum;
|
---|
95 | double _MP1;
|
---|
96 | double _MP2;
|
---|
97 | double _SNR1;
|
---|
98 | double _SNR2;
|
---|
99 | };
|
---|
100 |
|
---|
101 | class t_qcEpo {
|
---|
102 | public:
|
---|
103 | bncTime _epoTime;
|
---|
104 | double _PDOP;
|
---|
105 | QMap<t_prn, t_qcObs> _qcObs;
|
---|
106 | };
|
---|
107 |
|
---|
108 | class t_qcSat {
|
---|
109 | public:
|
---|
110 | t_qcSat() {
|
---|
111 | _numObs = 0;
|
---|
112 | _numSlipsFlagged = 0;
|
---|
113 | _numSlipsFound = 0;
|
---|
114 | _numGaps = 0;
|
---|
115 | }
|
---|
116 | int _numObs;
|
---|
117 | int _numSlipsFlagged;
|
---|
118 | int _numSlipsFound;
|
---|
119 | int _numGaps;
|
---|
120 | };
|
---|
121 |
|
---|
122 | class t_qcFile {
|
---|
123 | public:
|
---|
124 | t_qcFile() {clear();}
|
---|
125 | void clear() {_qcSat.clear(); _qcEpo.clear();}
|
---|
126 | bncTime _startTime;
|
---|
127 | bncTime _endTime;
|
---|
128 | QString _antennaName;
|
---|
129 | QString _markerName;
|
---|
130 | QString _receiverType;
|
---|
131 | double _interval;
|
---|
132 | QMap<t_prn, t_qcSat> _qcSat;
|
---|
133 | QVector<t_qcEpo> _qcEpo;
|
---|
134 | QVector<t_qcEpo> _qcEpoSampled;
|
---|
135 | };
|
---|
136 |
|
---|
137 | private slots:
|
---|
138 | void slotDspSkyPlot(const QString& fileName, const QByteArray& title1,
|
---|
139 | QVector<t_polarPoint*>* data1, const QByteArray& title2,
|
---|
140 | QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
|
---|
141 |
|
---|
142 | void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
|
---|
143 |
|
---|
144 | private:
|
---|
145 | void analyzeFile(t_rnxObsFile* obsFile);
|
---|
146 |
|
---|
147 | void updateQcSat(const t_qcObs& qcObs, t_qcSat& qcSat);
|
---|
148 |
|
---|
149 | t_irc setQcObs(const t_satObs& satObs, t_qcObs& qcObs);
|
---|
150 |
|
---|
151 | void preparePlotData(const t_rnxObsFile* obsFile);
|
---|
152 |
|
---|
153 | double cmpDOP(const ColumnVector& xyzSta) const;
|
---|
154 |
|
---|
155 | void printReport();
|
---|
156 |
|
---|
157 | QString _logFileName;
|
---|
158 | QFile* _logFile;
|
---|
159 | QTextStream* _log;
|
---|
160 | QStringList _obsFileNames;
|
---|
161 | QVector<t_rnxObsFile*> _rnxObsFiles;
|
---|
162 | QStringList _navFileNames;
|
---|
163 | QVector<t_eph*> _ephs;
|
---|
164 | t_rnxObsFile::t_rnxEpo* _currEpo;
|
---|
165 | t_qcFile _qcFile;
|
---|
166 | QMutex _mutex;
|
---|
167 | };
|
---|
168 |
|
---|
169 | #endif
|
---|