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

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