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

Last change on this file since 4689 was 4689, checked in by mervart, 12 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 "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_prnStat {
49 public:
50 t_prnStat() {
51 _numObs = 0;
52 _numSlips = 0;
53 _numGaps = 0;
54 }
55 int _numObs;
56 int _numSlips;
57 int _numGaps;
58};
59
60class t_obsStat {
61 public:
62 void reset() {
63 _mjdX24.clear();
64 _numSat.clear();
65 _PDOP.clear();
66 _prnStat.clear();
67 }
68 QVector<double> _mjdX24;
69 QVector<double> _numSat;
70 QVector<double> _PDOP;
71 bncTime _startTime;
72 bncTime _endTime;
73 QString _antennaName;
74 QString _markerName;
75 QString _receiverType;
76 double _interval;
77 QMap<QString, t_prnStat> _prnStat;
78};
79
80class t_reqcAnalyze : public QThread {
81Q_OBJECT
82
83 public:
84 t_reqcAnalyze(QObject* parent);
85
86 protected:
87 ~t_reqcAnalyze();
88
89 signals:
90 void finished();
91 void dspSkyPlot(const QString&,
92 const QByteArray&,
93 QVector<t_polarPoint*>*,
94 const QByteArray&,
95 QVector<t_polarPoint*>*,
96 const QByteArray&, double);
97
98 void dspAvailPlot(const QString&, const QByteArray&);
99
100 private slots:
101 void slotDspSkyPlot(const QString& fileName,
102 const QByteArray& title1,
103 QVector<t_polarPoint*>* data1,
104 const QByteArray& title2,
105 QVector<t_polarPoint*>* data2,
106 const QByteArray& scaleTitle, double maxValue);
107
108 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
109
110 public:
111 virtual void run();
112
113 private:
114 class t_oneObs {
115 public:
116 t_oneObs(int GPSWeek, double GPSWeeks) {
117 _GPSWeek = GPSWeek;
118 _GPSWeeks = GPSWeeks;
119 _hasL1 = false;
120 _hasL2 = false;
121 _slipL1 = false;
122 _slipL2 = false;
123 _MP1 = 0.0;
124 _MP2 = 0.0;
125 _SNR1 = 0.0;
126 _SNR2 = 0.0;
127 }
128 int _GPSWeek;
129 double _GPSWeeks;
130 bool _hasL1;
131 bool _hasL2;
132 bool _slipL1;
133 bool _slipL2;
134 double _MP1;
135 double _MP2;
136 double _SNR1;
137 double _SNR2;
138 };
139
140 class t_allObs {
141 public:
142 t_allObs() {}
143 ~t_allObs() {
144 for (int ii = 0; ii < _oneObsVec.size(); ii++) {
145 delete _oneObsVec[ii];
146 }
147 }
148 void addObs(const t_obs& obs);
149 QVector<t_oneObs*> _oneObsVec;
150 };
151
152 void analyzeFile(t_rnxObsFile* obsFile);
153 void preparePlotData(const QString& prn, const ColumnVector& xyzSta,
154 double obsInterval,
155 QVector<t_polarPoint*>* dataMP1,
156 QVector<t_polarPoint*>* dataMP2,
157 QVector<t_polarPoint*>* dataSNR1,
158 QVector<t_polarPoint*>* dataSNR2);
159 void prepareObsStat(unsigned iEpo, double obsInterval,
160 const ColumnVector& xyzSta);
161 double cmpDOP(const ColumnVector& xyzSta) const;
162 void printReport();
163
164 QString _logFileName;
165 QFile* _logFile;
166 QTextStream* _log;
167 QStringList _obsFileNames;
168 QVector<t_rnxObsFile*> _rnxObsFiles;
169 QStringList _navFileNames;
170 QVector<t_eph*> _ephs;
171 t_rnxObsFile::t_rnxEpo* _currEpo;
172 QMap<QString, t_allObs> _allObsMap;
173 QMap<QString, t_availData> _availDataMap;
174 t_obsStat _obsStat;
175};
176
177#endif
Note: See TracBrowser for help on using the repository browser.