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

Last change on this file since 4675 was 4675, checked in by mervart, 12 years ago
File size: 4.2 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 "RTCM/GPSDecoder.h"
32#include "RTCM3/ephemeris.h"
33
34class t_polarPoint;
35
36class t_availData {
37 public:
38 QVector<double> _L1ok;
39 QVector<double> _L2ok;
40 QVector<double> _L1slip;
41 QVector<double> _L2slip;
42 QVector<double> _L1gap;
43 QVector<double> _L2gap;
44 QVector<double> _eleDeg;
45 QVector<double> _eleTim;
46};
47
48class t_obsStat {
49 public:
50 void reset() {
51 _mjdX24.clear();
52 _numSat.clear();
53 _PDOP.clear();
54 _GDOP.clear();
55 }
56 QVector<double> _mjdX24;
57 QVector<double> _numSat;
58 QVector<double> _PDOP;
59 QVector<double> _GDOP;
60};
61
62class t_reqcAnalyze : public QThread {
63Q_OBJECT
64
65 public:
66 t_reqcAnalyze(QObject* parent);
67
68 protected:
69 ~t_reqcAnalyze();
70
71 signals:
72 void finished();
73 void dspSkyPlot(const QString&,
74 const QByteArray&,
75 QVector<t_polarPoint*>*,
76 const QByteArray&,
77 QVector<t_polarPoint*>*,
78 const QByteArray&, double);
79
80 void dspAvailPlot(const QString&, const QByteArray&);
81
82 private slots:
83 void slotDspSkyPlot(const QString& fileName,
84 const QByteArray& title1,
85 QVector<t_polarPoint*>* data1,
86 const QByteArray& title2,
87 QVector<t_polarPoint*>* data2,
88 const QByteArray& scaleTitle, double maxValue);
89
90 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
91
92 public:
93 virtual void run();
94
95 private:
96 class t_oneObs {
97 public:
98 t_oneObs(int GPSWeek, double GPSWeeks) {
99 _GPSWeek = GPSWeek;
100 _GPSWeeks = GPSWeeks;
101 _hasL1 = false;
102 _hasL2 = false;
103 _slipL1 = false;
104 _slipL2 = false;
105 _MP1 = 0.0;
106 _MP2 = 0.0;
107 _SNR1 = 0.0;
108 _SNR2 = 0.0;
109 }
110 int _GPSWeek;
111 double _GPSWeeks;
112 bool _hasL1;
113 bool _hasL2;
114 bool _slipL1;
115 bool _slipL2;
116 double _MP1;
117 double _MP2;
118 double _SNR1;
119 double _SNR2;
120 };
121
122 class t_allObs {
123 public:
124 t_allObs() {}
125 ~t_allObs() {
126 for (int ii = 0; ii < _oneObsVec.size(); ii++) {
127 delete _oneObsVec[ii];
128 }
129 }
130 void addObs(const t_obs& obs);
131 QVector<t_oneObs*> _oneObsVec;
132 };
133
134 void analyzeFile(t_rnxObsFile* obsFile);
135 void preparePlotData(const QString& prn, const ColumnVector& xyz,
136 double obsInterval,
137 QVector<t_polarPoint*>* dataMP1,
138 QVector<t_polarPoint*>* dataMP2,
139 QVector<t_polarPoint*>* dataSNR1,
140 QVector<t_polarPoint*>* dataSNR2);
141 void prepareObsStat(unsigned iEpo, double obsInterval);
142
143 QString _logFileName;
144 QFile* _logFile;
145 QTextStream* _log;
146 QStringList _obsFileNames;
147 QVector<t_rnxObsFile*> _rnxObsFiles;
148 QStringList _navFileNames;
149 QVector<t_eph*> _ephs;
150 t_rnxObsFile::t_rnxEpo* _currEpo;
151 QMap<QString, t_allObs> _allObsMap;
152 QMap<QString, t_availData> _availDataMap;
153 t_obsStat _obsStat;
154};
155
156#endif
Note: See TracBrowser for help on using the repository browser.