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