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

Last change on this file was 8756, checked in by mervart, 5 years ago

Sort MP data (make the largest values always visible)

File size: 5.6 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 }
[8557]69 ~t_skyPlotData() {}
[8566]70 char _sys;
[8558]71 QString _title;
72 QVector<t_polarPoint*>* _data;
[8557]73 };
74
[3900]75 signals:
76 void finished();
[8557]77 void dspSkyPlot(const QString&, QVector<t_skyPlotData> skyPlotData,
78 const QByteArray&, double);
[6275]79 void dspAvailPlot(const QString&, const QByteArray&);
[4572]80
[6270]81 private:
[6274]82
[6285]83 class t_qcFrq {
84 public:
85 t_qcFrq() {
[6293]86 _phaseValid = false;
87 _codeValid = false;
88 _slip = false;
89 _gap = false;
90 _setMP = false;
91 _rawMP = 0.0;
92 _stdMP = 0.0;
93 _SNR = 0.0;
[6285]94 }
95 QString _rnxType2ch;
[6293]96 bool _phaseValid;
97 bool _codeValid;
[6285]98 bool _slip;
99 bool _gap;
100 bool _setMP;
101 double _rawMP;
102 double _stdMP;
103 double _SNR;
104 };
105
[6288]106 class t_qcSat {
[6274]107 public:
[6288]108 t_qcSat() {
[6285]109 _slotSet = false;
110 _eleSet = false;
111 _slotNum = 0;
112 _eleDeg = 0.0;
113 _azDeg = 0.0;
[6274]114 }
[6285]115 bool _slotSet;
116 bool _eleSet;
117 int _slotNum;
118 double _eleDeg;
119 double _azDeg;
120 QVector<t_qcFrq> _qcFrq;
[6274]121 };
[7628]122
[6274]123 class t_qcEpo {
124 public:
125 bncTime _epoTime;
126 double _PDOP;
[6288]127 QMap<t_prn, t_qcSat> _qcSat;
[6274]128 };
[7628]129
[6285]130 class t_qcFrqSum {
[6274]131 public:
[6285]132 t_qcFrqSum() {
[6274]133 _numObs = 0;
134 _numSlipsFlagged = 0;
135 _numSlipsFound = 0;
136 _numGaps = 0;
[6312]137 _numSNR = 0;
138 _sumSNR = 0.0;
139 _numMP = 0;
140 _sumMP = 0.0;
[6274]141 }
[6312]142 int _numObs;
143 int _numSlipsFlagged;
144 int _numSlipsFound;
145 int _numGaps;
146 int _numSNR;
147 double _sumSNR;
148 int _numMP;
149 double _sumMP;
[6274]150 };
[6285]151
152 class t_qcSatSum {
153 public:
154 QMap<QString, t_qcFrqSum> _qcFrqSum;
155 };
[7628]156
[6274]157 class t_qcFile {
158 public:
[7628]159 t_qcFile() {
160 clear();
161 _interval = 1.0;
162 }
[6285]163 void clear() {_qcSatSum.clear(); _qcEpo.clear();}
164 bncTime _startTime;
165 bncTime _endTime;
166 QString _antennaName;
167 QString _markerName;
168 QString _receiverType;
169 double _interval;
170 QMap<t_prn, t_qcSatSum> _qcSatSum;
171 QVector<t_qcEpo> _qcEpo;
[6274]172 };
173
[6275]174 private slots:
[8557]175 void slotDspSkyPlot(const QString& fileName, QVector<t_skyPlotData> skyPlotData,
176 const QByteArray& scaleTitle, double maxValue);
[6275]177
178 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
179
180 private:
[6523]181 void checkEphemerides();
182
[8555]183 void analyzePlotSignals();
[6539]184
[6270]185 void analyzeFile(t_rnxObsFile* obsFile);
[3900]186
[7918]187 void updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
[4572]188
[7918]189 void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
190 const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
[4266]191
[7917]192 void setExpectedObs(const bncTime& startTime, const bncTime& endTime,
193 double interval, const ColumnVector& xyzSta);
194
[6281]195 void analyzeMultipath();
196
[6270]197 void preparePlotData(const t_rnxObsFile* obsFile);
[4263]198
[4679]199 double cmpDOP(const ColumnVector& xyzSta) const;
[4254]200
[6284]201 void printReport(const t_rnxObsFile* obsFile);
[6270]202
[8756]203 static bool mpLessThan(const t_polarPoint* p1, const t_polarPoint* p2);
204
[8555]205 QString _logFileName;
206 QFile* _logFile;
207 QTextStream* _log;
208 QStringList _obsFileNames;
209 QVector<t_rnxObsFile*> _rnxObsFiles;
210 QStringList _navFileNames;
211 QString _reqcPlotSignals;
212 QMap<char, QVector<char> > _signalTypes;
213 QMap<t_prn, int> _numExpObs;
214 QVector<char> _navFileIncomplete;
215 QStringList _defaultSignalTypes;
216 QVector<t_eph*> _ephs;
217 t_rnxObsFile::t_rnxEpo* _currEpo;
218 t_qcFile _qcFile;
[3900]219};
220
221#endif
Note: See TracBrowser for help on using the repository browser.