source: ntrip/trunk/BNC/src/combination/bnccomb.h@ 9530

Last change on this file since 9530 was 9530, checked in by stuerze, 8 months ago

minor changes

File size: 4.6 KB
Line 
1
2#ifndef BNCCOMB_H
3#define BNCCOMB_H
4
5#include <fstream>
6#include <newmat.h>
7#include "bncephuser.h"
8#include "satObs.h"
9#include "../RTCM3/clock_and_orbit/clock_orbit_rtcm.h"
10#include "../RTCM3/clock_and_orbit/clock_orbit_igs.h"
11
12class bncRtnetDecoder;
13class bncSP3;
14class bncAntex;
15
16class bncComb : public QObject {
17 Q_OBJECT
18 public:
19 bncComb();
20 virtual ~bncComb();
21 static bncComb* instance();
22 int nStreams() const {return _ACs.size();}
23
24 public slots:
25 void slotProviderIDChanged(QString mountPoint);
26 void slotNewOrbCorrections(QList<t_orbCorr> orbCorrections);
27 void slotNewClkCorrections(QList<t_clkCorr> clkCorrections);
28 void slotNewCodeBiases(QList<t_satCodeBias> satCodeBiases);
29
30 signals:
31 void newMessage(QByteArray msg, bool showOnScreen);
32 void newOrbCorrections(QList<t_orbCorr>);
33 void newClkCorrections(QList<t_clkCorr>);
34 void newCodeBiases(QList<t_satCodeBias>);
35
36 private:
37 enum e_method{singleEpoch, filter};
38
39 class cmbParam {
40 public:
41 enum parType {offACgnss, offACSat, clkSat};
42 cmbParam(parType type_, int index_, const QString& ac_, const QString& prn_);
43 ~cmbParam();
44 double partial(char sys, const QString& AC_, const QString& prn_);
45 QString toString(char sys) const;
46 parType type;
47 int index;
48 QString AC;
49 QString prn;
50 double xx;
51 double sig0;
52 double sigP;
53 bool epoSpec;
54 const t_eph* eph;
55 };
56
57 class cmbAC {
58 public:
59 cmbAC() {
60 weight = 0.0;
61 numObs['G'] = 0;
62 numObs['R'] = 0;
63 numObs['E'] = 0;
64 numObs['C'] = 0;
65 numObs['J'] = 0;
66 numObs['S'] = 0;
67 numObs['I'] = 0;
68 }
69 ~cmbAC() {}
70 QString mountPoint;
71 QString name;
72 double weight;
73 QMap<char, unsigned> numObs;
74 };
75
76 class cmbCorr {
77 public:
78 cmbCorr() {
79 _eph = 0;
80 _iod = 0;
81 _dClkResult = 0.0;
82 }
83 ~cmbCorr() {}
84 QString _prn;
85 bncTime _time;
86 unsigned long _iod;
87 t_eph* _eph;
88 t_orbCorr _orbCorr;
89 t_clkCorr _clkCorr;
90 t_satCodeBias _satCodeBias;
91 QString _acName;
92 double _dClkResult;
93 ColumnVector _diffRao;
94 QString ID() {return _acName + "_" + _prn;}
95 };
96
97 class cmbEpoch {
98 public:
99 cmbEpoch() {}
100 ~cmbEpoch() {
101 QVectorIterator<cmbCorr*> it(corrs);
102 while (it.hasNext()) {
103 delete it.next();
104 }
105 }
106 QVector<cmbCorr*> corrs;
107 };
108
109 void processEpoch(char sys);
110 t_irc processEpoch_filter(char sys, QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
111 ColumnVector& dx);
112 t_irc processEpoch_singleEpoch(char sys, QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
113 ColumnVector& dx);
114 t_irc createAmat(char sys, Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
115 const ColumnVector& x0, QMap<QString, cmbCorr*>& resCorr);
116 void dumpResults(const QMap<QString, cmbCorr*>& resCorr);
117 void printResults(QTextStream& out, const QMap<QString, cmbCorr*>& resCorr);
118 void switchToLastEph(t_eph* lastEph, cmbCorr* corr);
119 t_irc checkOrbits(char sys, QTextStream& out);
120 QVector<cmbCorr*>& corrs(char sys) {return _buffer[sys][_resTime].corrs;}
121
122 QMutex _mutex;
123 QList<cmbAC*> _ACs;
124 bncTime _resTime;
125 QMap<char, QVector<cmbParam*>> _params;
126 QMap<char, QMap<bncTime, cmbEpoch>> _buffer;
127 bncRtnetDecoder* _rtnetDecoder;
128 QMap<char, SymmetricMatrix> _QQ;
129 QByteArray _log;
130 bncAntex* _antex;
131 double _MAXRES;
132 QMap<char, QString> _masterOrbitAC;
133 QMap<char, unsigned> _masterMissingEpochs;
134 e_method _method;
135 int _cmbSampl;
136 QMap<QString, QMap<t_prn, t_orbCorr> > _orbCorrections;
137 QMap<QString, QMap<t_prn, t_satCodeBias> > _satCodeBiases;
138 bncEphUser _ephUser;
139 SsrCorr* _ssrCorr;
140 QMap<char, unsigned> _cmbSysPrn;
141 bool _useGps;
142 bool _useGlo;
143 bool _useGal;
144 bool _useBds;
145 bool _useQzss;
146 bool _useSbas;
147 bool _useIrnss;
148};
149
150#define BNC_CMB (bncComb::instance())
151
152#endif
Note: See TracBrowser for help on using the repository browser.