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

Last change on this file since 10995 was 10971, checked in by stuerze, 7 weeks ago

minor changes

File size: 5.9 KB
RevLine 
[3900]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>
[4254]29#include "rnxobsfile.h"
30#include "rnxnavfile.h"
[5738]31#include "ephemeris.h"
[6137]32#include "satObs.h"
[8557]33#include "polarplot.h"
[3900]34
[6272]35class t_plotData {
36 public:
[8555]37 struct t_hlpStatus {
38 QVector<double> _ok;
39 QVector<double> _slip;
40 QVector<double> _gap;
41 };
42 QVector<double> _mjdX24;
43 QVector<double> _numSat;
44 QVector<double> _PDOP;
45 QVector<double> _eleDeg;
46 QMap<char, t_hlpStatus> _status;
[6272]47};
48
[3900]49class t_reqcAnalyze : public QThread {
50Q_OBJECT
[7628]51
[3900]52 public:
53 t_reqcAnalyze(QObject* parent);
[6270]54 virtual void run();
[3900]55
56 protected:
57 ~t_reqcAnalyze();
58
[8557]59 class t_skyPlotData {
60 public:
[8558]61 t_skyPlotData() {
[8566]62 _sys = ' ';
[8558]63 _data = new QVector<t_polarPoint*>;
64 }
[8566]65 t_skyPlotData(char sys) {
66 _sys = sys;
67 _data = new QVector<t_polarPoint*>;
68 }
[10971]69 // _data ownership passes to t_polarData (see t_polarPlot::addCurve); do not free it here,
70 // t_skyPlotData is copied by value (QVector growth, signal/slot) so all copies share this pointer.
71 ~t_skyPlotData() {}
[8566]72 char _sys;
[8558]73 QString _title;
74 QVector<t_polarPoint*>* _data;
[8557]75 };
76
[3900]77 signals:
78 void finished();
[8557]79 void dspSkyPlot(const QString&, QVector<t_skyPlotData> skyPlotData,
80 const QByteArray&, double);
[6275]81 void dspAvailPlot(const QString&, const QByteArray&);
[4572]82
[6270]83 private:
[6274]84
[6285]85 class t_qcFrq {
86 public:
87 t_qcFrq() {
[6293]88 _phaseValid = false;
89 _codeValid = false;
90 _slip = false;
91 _gap = false;
92 _setMP = false;
93 _rawMP = 0.0;
94 _stdMP = 0.0;
95 _SNR = 0.0;
[6285]96 }
97 QString _rnxType2ch;
[6293]98 bool _phaseValid;
99 bool _codeValid;
[6285]100 bool _slip;
101 bool _gap;
102 bool _setMP;
103 double _rawMP;
104 double _stdMP;
105 double _SNR;
106 };
107
[6288]108 class t_qcSat {
[6274]109 public:
[6288]110 t_qcSat() {
[6285]111 _slotSet = false;
112 _eleSet = false;
113 _slotNum = 0;
114 _eleDeg = 0.0;
115 _azDeg = 0.0;
[6274]116 }
[6285]117 bool _slotSet;
118 bool _eleSet;
119 int _slotNum;
120 double _eleDeg;
121 double _azDeg;
122 QVector<t_qcFrq> _qcFrq;
[6274]123 };
[7628]124
[6274]125 class t_qcEpo {
126 public:
127 bncTime _epoTime;
128 double _PDOP;
[6288]129 QMap<t_prn, t_qcSat> _qcSat;
[6274]130 };
[7628]131
[6285]132 class t_qcFrqSum {
[6274]133 public:
[6285]134 t_qcFrqSum() {
[6274]135 _numObs = 0;
136 _numSlipsFlagged = 0;
137 _numSlipsFound = 0;
138 _numGaps = 0;
[6312]139 _numSNR = 0;
140 _sumSNR = 0.0;
141 _numMP = 0;
142 _sumMP = 0.0;
[6274]143 }
[6312]144 int _numObs;
145 int _numSlipsFlagged;
146 int _numSlipsFound;
147 int _numGaps;
148 int _numSNR;
149 double _sumSNR;
150 int _numMP;
151 double _sumMP;
[6274]152 };
[6285]153
154 class t_qcSatSum {
155 public:
156 QMap<QString, t_qcFrqSum> _qcFrqSum;
157 };
[7628]158
[6274]159 class t_qcFile {
160 public:
[7628]161 t_qcFile() {
162 clear();
163 _interval = 1.0;
164 }
[6285]165 void clear() {_qcSatSum.clear(); _qcEpo.clear();}
166 bncTime _startTime;
167 bncTime _endTime;
168 QString _antennaName;
169 QString _markerName;
170 QString _receiverType;
171 double _interval;
[10966]172 double _minEle;
[6285]173 QMap<t_prn, t_qcSatSum> _qcSatSum;
174 QVector<t_qcEpo> _qcEpo;
[6274]175 };
176
[6275]177 private slots:
[8557]178 void slotDspSkyPlot(const QString& fileName, QVector<t_skyPlotData> skyPlotData,
179 const QByteArray& scaleTitle, double maxValue);
[6275]180
181 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
182
183 private:
[6523]184
[8555]185 void analyzePlotSignals();
[6539]186
[6270]187 void analyzeFile(t_rnxObsFile* obsFile);
[3900]188
[7918]189 void updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
[4572]190
[7918]191 void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
192 const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
[4266]193
[7917]194 void setExpectedObs(const bncTime& startTime, const bncTime& endTime,
195 double interval, const ColumnVector& xyzSta);
196
[6281]197 void analyzeMultipath();
198
[6270]199 void preparePlotData(const t_rnxObsFile* obsFile);
[4263]200
[4679]201 double cmpDOP(const ColumnVector& xyzSta) const;
[4254]202
[6284]203 void printReport(const t_rnxObsFile* obsFile);
[6270]204
[8756]205 static bool mpLessThan(const t_polarPoint* p1, const t_polarPoint* p2);
[10614]206
[8555]207 QString _logFileName;
208 QFile* _logFile;
[10630]209 QTextStream* _logStream;
[10614]210 bool _checkEph;
[8555]211 QStringList _obsFileNames;
212 QVector<t_rnxObsFile*> _rnxObsFiles;
213 QStringList _navFileNames;
[10945]214 double _minEle;
[8555]215 QString _reqcPlotSignals;
216 QMap<char, QVector<char> > _signalTypes;
217 QMap<t_prn, int> _numExpObs;
218 QVector<char> _navFileIncomplete;
219 QStringList _defaultSignalTypes;
220 QVector<t_eph*> _ephs;
221 t_rnxObsFile::t_rnxEpo* _currEpo;
222 t_qcFile _qcFile;
[3900]223};
224
225#endif
Note: See TracBrowser for help on using the repository browser.