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

Last change on this file since 6527 was 6527, checked in by mervart, 9 years ago
File size: 4.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
[6527]28#include <string>
[3900]29#include <QtCore>
[4254]30#include "rnxobsfile.h"
31#include "rnxnavfile.h"
[5738]32#include "ephemeris.h"
[6137]33#include "satObs.h"
[3900]34
[4338]35class t_polarPoint;
36
[6272]37class t_plotData {
38 public:
39 QVector<double> _mjdX24;
[6273]40 QVector<double> _numSat;
[6272]41 QVector<double> _PDOP;
42 QVector<double> _L1ok;
43 QVector<double> _L2ok;
44 QVector<double> _L1slip;
45 QVector<double> _L2slip;
46 QVector<double> _L1gap;
47 QVector<double> _L2gap;
48 QVector<double> _eleDeg;
49};
50
[3900]51class t_reqcAnalyze : public QThread {
52Q_OBJECT
53
54 public:
55 t_reqcAnalyze(QObject* parent);
[6270]56 virtual void run();
[3900]57
58 protected:
59 ~t_reqcAnalyze();
60
61 signals:
62 void finished();
[6322]63 void dspSkyPlot(const QString&, const QString&, QVector<t_polarPoint*>*,
64 const QString&, QVector<t_polarPoint*>*, const QByteArray&, double);
[6275]65 void dspAvailPlot(const QString&, const QByteArray&);
[4572]66
[6270]67 private:
[6274]68
[6285]69 class t_qcFrq {
70 public:
71 t_qcFrq() {
[6293]72 _phaseValid = false;
73 _codeValid = false;
74 _slip = false;
75 _gap = false;
76 _setMP = false;
77 _rawMP = 0.0;
78 _stdMP = 0.0;
79 _SNR = 0.0;
[6285]80 }
81 QString _rnxType2ch;
[6293]82 bool _phaseValid;
83 bool _codeValid;
[6285]84 bool _slip;
85 bool _gap;
86 bool _setMP;
87 double _rawMP;
88 double _stdMP;
89 double _SNR;
90 };
91
[6288]92 class t_qcSat {
[6274]93 public:
[6288]94 t_qcSat() {
[6285]95 _slotSet = false;
96 _eleSet = false;
97 _slotNum = 0;
98 _eleDeg = 0.0;
99 _azDeg = 0.0;
[6274]100 }
[6285]101 bool _slotSet;
102 bool _eleSet;
103 int _slotNum;
104 double _eleDeg;
105 double _azDeg;
106 QVector<t_qcFrq> _qcFrq;
[6274]107 };
108
109 class t_qcEpo {
110 public:
111 bncTime _epoTime;
112 double _PDOP;
[6288]113 QMap<t_prn, t_qcSat> _qcSat;
[6274]114 };
115
[6285]116 class t_qcFrqSum {
[6274]117 public:
[6285]118 t_qcFrqSum() {
[6274]119 _numObs = 0;
120 _numSlipsFlagged = 0;
121 _numSlipsFound = 0;
122 _numGaps = 0;
[6312]123 _numSNR = 0;
124 _sumSNR = 0.0;
125 _numMP = 0;
126 _sumMP = 0.0;
[6274]127 }
[6312]128 int _numObs;
129 int _numSlipsFlagged;
130 int _numSlipsFound;
131 int _numGaps;
132 int _numSNR;
133 double _sumSNR;
134 int _numMP;
135 double _sumMP;
[6274]136 };
[6285]137
138 class t_qcSatSum {
139 public:
140 QMap<QString, t_qcFrqSum> _qcFrqSum;
141 };
[6274]142
143 class t_qcFile {
144 public:
145 t_qcFile() {clear();}
[6285]146 void clear() {_qcSatSum.clear(); _qcEpo.clear();}
147 bncTime _startTime;
148 bncTime _endTime;
149 QString _antennaName;
150 QString _markerName;
151 QString _receiverType;
152 double _interval;
153 QMap<t_prn, t_qcSatSum> _qcSatSum;
154 QVector<t_qcEpo> _qcEpo;
[6274]155 };
156
[6275]157 private slots:
[6322]158 void slotDspSkyPlot(const QString& fileName, const QString& title1,
159 QVector<t_polarPoint*>* data1, const QString& title2,
[6275]160 QVector<t_polarPoint*>* data2, const QByteArray& scaleTitle, double maxValue);
161
162 void slotDspAvailPlot(const QString& fileName, const QByteArray& title);
163
164 private:
[6523]165 void checkEphemerides();
166
[6270]167 void analyzeFile(t_rnxObsFile* obsFile);
[3900]168
[6288]169 void updateQcSat(const t_qcSat& qcSat, t_qcSatSum& qcSatSum);
[4572]170
[6281]171 void setQcObs(const bncTime& epoTime, const ColumnVector& xyzSta,
[6296]172 const t_satObs& satObs, QMap<QString, bncTime>& lastObsTime, t_qcSat& qcSat);
[4266]173
[6281]174 void analyzeMultipath();
175
[6270]176 void preparePlotData(const t_rnxObsFile* obsFile);
[4263]177
[4679]178 double cmpDOP(const ColumnVector& xyzSta) const;
[4254]179
[6284]180 void printReport(const t_rnxObsFile* obsFile);
[6270]181
182 QString _logFileName;
183 QFile* _logFile;
184 QTextStream* _log;
185 QStringList _obsFileNames;
186 QVector<t_rnxObsFile*> _rnxObsFiles;
187 QStringList _navFileNames;
188 QVector<t_eph*> _ephs;
189 t_rnxObsFile::t_rnxEpo* _currEpo;
190 t_qcFile _qcFile;
[6527]191 std::string _ephMsg;
[3900]192};
193
194#endif
Note: See TracBrowser for help on using the repository browser.