source: ntrip/trunk/BNC/src/rinex/reqcanalyze.h@ 6527

Last change on this file since 6527 was 6527, checked in by mervart, 9 years ago
File size: 4.9 KB
Line 
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 <string>
29#include <QtCore>
30#include "rnxobsfile.h"
31#include "rnxnavfile.h"
32#include "ephemeris.h"
33#include "satObs.h"
34
35class t_polarPoint;
36
37class t_plotData {
38 public:
39 QVector<double> _mjdX24;
40 QVector<double> _numSat;
41 QVector<double> _PDOP;
42 QVector<double> _L1ok;
43 QVector<double> _L2ok;
44 QVector<double> _L1slip;
45 QVector<double> _L2slip;
46 QVector<double> _L1gap;
47 QVector<double> _L2gap;
48 QVector<double> _eleDeg;
49};
50
51class t_reqcAnalyze : public QThread {
52Q_OBJECT
53
54 public:
55 t_reqcAnalyze(QObject* parent);
56 virtual void run();
57
58 protected:
59 ~t_reqcAnalyze();
60
61 signals:
62 void finished();
63 void dspSkyPlot(const QString&, const QString&, QVector<t_polarPoint*>*,
64 const QString&, QVector<t_polarPoint*>*, const QByteArray&, double);
65 void dspAvailPlot(const QString&, const QByteArray&);
66
67 private:
68
69 class t_qcFrq {
70 public:
71 t_qcFrq() {
72 _phaseValid = false;
73 _codeValid = false;
74 _slip = false;
75 _gap = false;
76 _setMP = false;
77 _rawMP = 0.0;
78 _stdMP = 0.0;
79 _SNR = 0.0;
80 }
81 QString _rnxType2ch;
82 bool _phaseValid;
83 bool _codeValid;
84 bool _slip;
85 bool _gap;
86 bool _setMP;
87 double _rawMP;
88 double _stdMP;
89 double _SNR;
90 };
91
92 class t_qcSat {
93 public:
94 t_qcSat() {
95 _slotSet = false;
96 _eleSet = false;
97 _slotNum = 0;
98 _eleDeg = 0.0;
99 _azDeg = 0.0;
100 }
101 bool _slotSet;
102 bool _eleSet;
103 int _slotNum;
104 double _eleDeg;
105 double _azDeg;
106 QVector<t_qcFrq> _qcFrq;
107 };
108
109 class t_qcEpo {
110 public:
111 bncTime _epoTime;
112 double _PDOP;
113 QMap<t_prn, t_qcSat> _qcSat;
114 };
115
116 class t_qcFrqSum {
117 public:
118 t_qcFrqSum() {
119 _numObs = 0;
120 _numSlipsFlagged = 0;
121 _numSlipsFound = 0;
122 _numGaps = 0;
123 _numSNR = 0;
124 _sumSNR = 0.0;
125 _numMP = 0;
126 _sumMP = 0.0;
127 }
128 int _numObs;
129 int _numSlipsFlagged;
130 int _numSlipsFound;
131 int _numGaps;
132 int _numSNR;
133 double _sumSNR;
134 int _numMP;
135 double _sumMP;
136 };
137
138 class t_qcSatSum {
139 public:
140 QMap<QString, t_qcFrqSum> _qcFrqSum;
141 };
142
143 class t_qcFile {
144 public:
145 t_qcFile() {clear();}
146 void clear() {_qcSatSum.clear(); _qcEpo.clear();}
147 bncTime _startTime;
148 bncTime _endTime;
149 QString _antennaName;
150 QString _markerName;
151 QString _receiverType;
152 double _interval;
153 QMap<t_prn, t_qcSatSum> _qcSatSum;
154 QVector<t_qcEpo> _qcEpo;
155 };
156
157 private slots:
158 void slotDspSkyPlot(const QString& fileName, const QString& title1,
159 QVector<t_polarPoint*>* data1, const QString& title2,
160 QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
161
162 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
163
164 private:
165 void checkEphemerides();
166
167 void analyzeFile(t_rnxObsFile* obsFile);
168
169 void updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
170
171 void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
172 const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
173
174 void analyzeMultipath();
175
176 void preparePlotData(const t_rnxObsFile* obsFile);
177
178 double cmpDOP(const ColumnVector& xyzSta) const;
179
180 void printReport(const t_rnxObsFile* obsFile);
181
182 QString _logFileName;
183 QFile* _logFile;
184 QTextStream* _log;
185 QStringList _obsFileNames;
186 QVector<t_rnxObsFile*> _rnxObsFiles;
187 QStringList _navFileNames;
188 QVector<t_eph*> _ephs;
189 t_rnxObsFile::t_rnxEpo* _currEpo;
190 t_qcFile _qcFile;
191 std::string _ephMsg;
192};
193
194#endif
Note: See TracBrowser for help on using the repository browser.