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

Last change on this file since 6277 was 6277, checked in by mervart, 8 years ago
File size: 4.3 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_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 _eleDeg = 0.0;
84 _azDeg = 0.0;
85 }
86 t_irc set(const t_satObs& obs);
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 double _eleDeg;
100 double _azDeg;
101 };
102
103 class t_qcEpo {
104 public:
105 bncTime _epoTime;
106 double _PDOP;
107 QMap<t_prn, t_qcObs> _qcObs;
108 };
109
110 class t_qcSat {
111 public:
112 t_qcSat() {
113 _numObs = 0;
114 _numSlipsFlagged = 0;
115 _numSlipsFound = 0;
116 _numGaps = 0;
117 }
118 int _numObs;
119 int _numSlipsFlagged;
120 int _numSlipsFound;
121 int _numGaps;
122 };
123
124 class t_qcFile {
125 public:
126 t_qcFile() {clear();}
127 void clear() {_qcSat.clear(); _qcEpo.clear();}
128 bncTime _startTime;
129 bncTime _endTime;
130 QString _antennaName;
131 QString _markerName;
132 QString _receiverType;
133 double _interval;
134 QMap<t_prn, t_qcSat> _qcSat;
135 QVector<t_qcEpo> _qcEpo;
136 QVector<t_qcEpo> _qcEpoSampled;
137 };
138
139 private slots:
140 void slotDspSkyPlot(const QString& fileName, const QByteArray& title1,
141 QVector<t_polarPoint*>* data1, const QByteArray& title2,
142 QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
143
144 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
145
146 private:
147 void analyzeFile(t_rnxObsFile* obsFile);
148
149 void updateQcSat(const t_qcObs& qcObs, t_qcSat& qcSat);
150
151 t_irc setQcObs(const t_satObs& satObs, t_qcObs& qcObs);
152
153 void preparePlotData(const t_rnxObsFile* obsFile);
154
155 double cmpDOP(const ColumnVector& xyzSta) const;
156
157 void printReport();
158
159 QString _logFileName;
160 QFile* _logFile;
161 QTextStream* _log;
162 QStringList _obsFileNames;
163 QVector<t_rnxObsFile*> _rnxObsFiles;
164 QStringList _navFileNames;
165 QVector<t_eph*> _ephs;
166 t_rnxObsFile::t_rnxEpo* _currEpo;
167 t_qcFile _qcFile;
168 QMutex _mutex;
169};
170
171#endif
Note: See TracBrowser for help on using the repository browser.