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