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

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