1 |
|
---|
2 | #ifndef BNCCOMB_H
|
---|
3 | #define BNCCOMB_H
|
---|
4 |
|
---|
5 | #include <newmat.h>
|
---|
6 | #include "bncephuser.h"
|
---|
7 |
|
---|
8 | class cmbCaster;
|
---|
9 |
|
---|
10 | class cmbParam {
|
---|
11 | public:
|
---|
12 | enum parType {AC_offset, Sat_offset, clk};
|
---|
13 | cmbParam(parType typeIn, int indexIn,
|
---|
14 | const QString& acIn, const QString& prnIn);
|
---|
15 | ~cmbParam();
|
---|
16 | double partial(const QString& acIn, t_corr* corr);
|
---|
17 | parType type;
|
---|
18 | int index;
|
---|
19 | QString AC;
|
---|
20 | QString prn;
|
---|
21 | double xx;
|
---|
22 | };
|
---|
23 |
|
---|
24 | class bncComb : public bncEphUser {
|
---|
25 | Q_OBJECT
|
---|
26 |
|
---|
27 | public:
|
---|
28 | bncComb();
|
---|
29 | ~bncComb();
|
---|
30 | void processCorrLine(const QString& staID, const QString& line);
|
---|
31 | int nStreams() const {return _ACs.size();}
|
---|
32 |
|
---|
33 | signals:
|
---|
34 | void newMessage(QByteArray msg, bool showOnScreen);
|
---|
35 |
|
---|
36 | private slots:
|
---|
37 | void slotMessage(const QByteArray msg);
|
---|
38 | void slotError(const QByteArray msg);
|
---|
39 |
|
---|
40 | private:
|
---|
41 |
|
---|
42 | class cmbEpoch {
|
---|
43 | public:
|
---|
44 | cmbEpoch(const QString& name) {acName = name;}
|
---|
45 | ~cmbEpoch() {
|
---|
46 | QMapIterator<QString, t_corr*> it(corr);
|
---|
47 | while (it.hasNext()) {
|
---|
48 | it.next();
|
---|
49 | delete it.value();
|
---|
50 | }
|
---|
51 | }
|
---|
52 | QString acName;
|
---|
53 | bncTime time;
|
---|
54 | QMap<QString, t_corr*> corr; // Corrections (key is PRN)
|
---|
55 | };
|
---|
56 |
|
---|
57 | class cmbAC {
|
---|
58 | public:
|
---|
59 | cmbAC() {}
|
---|
60 | ~cmbAC() {
|
---|
61 | QListIterator<cmbEpoch*> it(epochs);
|
---|
62 | while (it.hasNext()) {
|
---|
63 | delete it.next();
|
---|
64 | }
|
---|
65 | }
|
---|
66 | QString mountPoint;
|
---|
67 | QString name;
|
---|
68 | double weight;
|
---|
69 | QQueue<cmbEpoch*> epochs; // List of Epochs with Corrections
|
---|
70 | };
|
---|
71 |
|
---|
72 | void processEpochs(const QList<cmbEpoch*>& epochs);
|
---|
73 | void printSingleCorr(const QString& acName, const t_corr* corr);
|
---|
74 | void dumpResults(const bncTime& resTime,
|
---|
75 | const QMap<QString, t_corr*>& resCorr);
|
---|
76 | void switchToLastEph(const t_eph* lastEph, const t_eph* prevEph,
|
---|
77 | t_corr* newCorr);
|
---|
78 |
|
---|
79 | QMap<QString, cmbAC*> _ACs; // Analytical Centers (key is mountpoint)
|
---|
80 | bncTime _processedBeforeTime;
|
---|
81 | cmbCaster* _caster;
|
---|
82 | QVector<cmbParam*> _params;
|
---|
83 | double _sigACOff;
|
---|
84 | double _sigSatOff;
|
---|
85 | double _sigClk;
|
---|
86 | SymmetricMatrix _QQ;
|
---|
87 | };
|
---|
88 |
|
---|
89 | #endif
|
---|