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

Last change on this file since 6293 was 6293, checked in by mervart, 9 years ago
File size: 4.6 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 <QtCore>
29#include "rnxobsfile.h"
30#include "rnxnavfile.h"
31#include "ephemeris.h"
32#include "satObs.h"
33
34class t_polarPoint;
35
36class 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
50class t_reqcAnalyze : public QThread {
51Q_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_qcFrq {
69 public:
70 t_qcFrq() {
71 _phaseValid = false;
72 _codeValid = false;
73 _slip = false;
74 _gap = false;
75 _setMP = false;
76 _rawMP = 0.0;
77 _stdMP = 0.0;
78 _SNR = 0.0;
79 }
80 QString _rnxType2ch;
81 bncTime _lastObsTime;
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 }
124 int _numObs;
125 int _numSlipsFlagged;
126 int _numSlipsFound;
127 int _numGaps;
128 };
129
130 class t_qcSatSum {
131 public:
132 QMap<QString, t_qcFrqSum> _qcFrqSum;
133 };
134
135 class t_qcFile {
136 public:
137 t_qcFile() {clear();}
138 void clear() {_qcSatSum.clear(); _qcEpo.clear();}
139 bncTime _startTime;
140 bncTime _endTime;
141 QString _antennaName;
142 QString _markerName;
143 QString _receiverType;
144 double _interval;
145 QMap<t_prn, t_qcSatSum> _qcSatSum;
146 QVector<t_qcEpo> _qcEpo;
147 };
148
149 private slots:
150 void slotDspSkyPlot(const QString& fileName, const QByteArray& title1,
151 QVector<t_polarPoint*>* data1, const QByteArray& title2,
152 QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
153
154 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
155
156 private:
157 void analyzeFile(t_rnxObsFile* obsFile);
158
159 void updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
160
161 void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
162 const t_satObs& satObs, t_qcSat& qcSat);
163
164 void analyzeMultipath();
165
166 void preparePlotData(const t_rnxObsFile* obsFile);
167
168 double cmpDOP(const ColumnVector& xyzSta) const;
169
170 void printReport(const t_rnxObsFile* obsFile);
171
172 QString _logFileName;
173 QFile* _logFile;
174 QTextStream* _log;
175 QStringList _obsFileNames;
176 QVector<t_rnxObsFile*> _rnxObsFiles;
177 QStringList _navFileNames;
178 QVector<t_eph*> _ephs;
179 t_rnxObsFile::t_rnxEpo* _currEpo;
180 t_qcFile _qcFile;
181};
182
183#endif
Note: See TracBrowser for help on using the repository browser.