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

Last change on this file since 6274 was 6274, checked in by mervart, 9 years ago
File size: 4.0 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
63 private:
64
65 class t_qcObs {
66 public:
67 t_qcObs() {
68 _hasL1 = false;
69 _hasL2 = false;
70 _slipL1 = false;
71 _slipL2 = false;
72 _gapL1 = false;
73 _gapL2 = false;
74 _slotSet = false;
75 _slotNum = 0;
76 _MP1 = 0.0;
77 _MP2 = 0.0;
78 _SNR1 = 0.0;
79 _SNR2 = 0.0;
80 }
81 t_irc set(const t_satObs& obs);
82 double _eleDeg;
83 double _azDeg;
84 bool _hasL1;
85 bool _hasL2;
86 bool _slipL1;
87 bool _slipL2;
88 bool _gapL1;
89 bool _gapL2;
90 bool _slotSet;
91 int _slotNum;
92 double _MP1;
93 double _MP2;
94 double _SNR1;
95 double _SNR2;
96 };
97
98 class t_qcEpo {
99 public:
100 bncTime _epoTime;
101 double _PDOP;
102 QMap<t_prn, t_qcObs> _qcObs;
103 };
104
105 class t_qcSat {
106 public:
107 t_qcSat() {
108 _numObs = 0;
109 _numSlipsFlagged = 0;
110 _numSlipsFound = 0;
111 _numGaps = 0;
112 }
113 int _numObs;
114 int _numSlipsFlagged;
115 int _numSlipsFound;
116 int _numGaps;
117 };
118
119 class t_qcFile {
120 public:
121 t_qcFile() {clear();}
122 void clear() {_qcSat.clear(); _qcEpo.clear();}
123 bncTime _startTime;
124 bncTime _endTime;
125 QString _antennaName;
126 QString _markerName;
127 QString _receiverType;
128 double _interval;
129 QMap<t_prn, t_qcSat> _qcSat;
130 QVector<t_qcEpo> _qcEpo;
131 QVector<t_qcEpo> _qcEpoSampled;
132 };
133
134 void analyzeFile(t_rnxObsFile* obsFile);
135
136 void updateQcSat(const t_qcObs& qcObs, t_qcSat& qcSat);
137
138 t_irc setQcObs(const t_satObs& satObs, t_qcObs& qcObs);
139
140 void preparePlotData(const t_rnxObsFile* obsFile);
141
142 double cmpDOP(const ColumnVector& xyzSta) const;
143
144 void dspSkyPlot(const QString& fileName, const QByteArray& title1,
145 QVector<t_polarPoint*>* data1, const QByteArray& title2,
146 QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
147
148 void dspAvailPlot(const QString& fileName, const QByteArray& title);
149
150 void printReport();
151
152 QString _logFileName;
153 QFile* _logFile;
154 QTextStream* _log;
155 QStringList _obsFileNames;
156 QVector<t_rnxObsFile*> _rnxObsFiles;
157 QStringList _navFileNames;
158 QVector<t_eph*> _ephs;
159 t_rnxObsFile::t_rnxEpo* _currEpo;
160 t_qcFile _qcFile;
161 QMutex _mutex;
162};
163
164#endif
Note: See TracBrowser for help on using the repository browser.