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