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

Last change on this file since 7699 was 7299, checked in by stuerze, 9 years ago

some additions, to allow PPP with the internal combination result

File size: 3.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
10class bncRtnetDecoder;
11class bncSP3;
12class bncAntex;
13
14class bncComb : public QObject {
15 Q_OBJECT
16 public:
17 bncComb();
18 virtual ~bncComb();
19 static bncComb* instance();
20 int nStreams() const {return _ACs.size();}
21
22 public slots:
23 void slotProviderIDChanged(QString mountPoint);
24 void slotNewOrbCorrections(QList<t_orbCorr> orbCorrections);
25 void slotNewClkCorrections(QList<t_clkCorr> clkCorrections);
26
27 signals:
28 void newMessage(QByteArray msg, bool showOnScreen);
29 void newOrbCorrections(QList<t_orbCorr>);
30 void newClkCorrections(QList<t_clkCorr>);
31
32 private:
33 enum e_method{singleEpoch, filter};
34
35 class cmbParam {
36 public:
37 enum parType {offACgps, offACglo, offACSat, clkSat};
38 cmbParam(parType type_, int index_, const QString& ac_, const QString& prn_);
39 ~cmbParam();
40 double partial(const QString& AC_, const QString& prn_);
41 QString toString() const;
42 parType type;
43 int index;
44 QString AC;
45 QString prn;
46 double xx;
47 double sig0;
48 double sigP;
49 bool epoSpec;
50 const t_eph* eph;
51 };
52
53 class cmbAC {
54 public:
55 cmbAC() {
56 weight = 0.0;
57 numObs = 0;
58 }
59 ~cmbAC() {}
60 QString mountPoint;
61 QString name;
62 double weight;
63 unsigned numObs;
64 };
65
66 class cmbCorr {
67 public:
68 cmbCorr() {
69 _eph = 0;
70 _iod = 0;
71 _dClkResult = 0.0;
72 }
73 ~cmbCorr() {}
74 QString _prn;
75 bncTime _time;
76 unsigned long _iod;
77 t_eph* _eph;
78 t_orbCorr _orbCorr;
79 t_clkCorr _clkCorr;
80 QString _acName;
81 double _dClkResult;
82 ColumnVector _diffRao;
83 QString ID() {return _acName + "_" + _prn;}
84 };
85
86 class cmbEpoch {
87 public:
88 cmbEpoch() {}
89 ~cmbEpoch() {
90 QVectorIterator<cmbCorr*> it(corrs);
91 while (it.hasNext()) {
92 delete it.next();
93 }
94 }
95 QVector<cmbCorr*> corrs;
96 };
97
98 void processEpoch();
99 t_irc processEpoch_filter(QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
100 ColumnVector& dx);
101 t_irc processEpoch_singleEpoch(QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
102 ColumnVector& dx);
103 t_irc createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
104 const ColumnVector& x0, QMap<QString, cmbCorr*>& resCorr);
105 void dumpResults(const QMap<QString, cmbCorr*>& resCorr);
106 void printResults(QTextStream& out, const QMap<QString, cmbCorr*>& resCorr);
107 void switchToLastEph(t_eph* lastEph, cmbCorr* corr);
108 t_irc checkOrbits(QTextStream& out);
109 QVector<cmbCorr*>& corrs() {return _buffer[_resTime].corrs;}
110
111 QMutex _mutex;
112 QList<cmbAC*> _ACs;
113 bncTime _resTime;
114 QVector<cmbParam*> _params;
115 QMap<bncTime, cmbEpoch> _buffer;
116 bncRtnetDecoder* _rtnetDecoder;
117 SymmetricMatrix _QQ;
118 QByteArray _log;
119 bncAntex* _antex;
120 double _MAXRES;
121 QString _masterOrbitAC;
122 unsigned _masterMissingEpochs;
123 e_method _method;
124 bool _useGlonass;
125 int _cmbSampl;
126 QMap<QString, QMap<t_prn, t_orbCorr> > _orbCorrections;
127 bncEphUser _ephUser;
128};
129
130#define BNC_CMB (bncComb::instance())
131
132#endif
Note: See TracBrowser for help on using the repository browser.