[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};
|
---|
[2933] | 13 | cmbParam(parType typeIn, int indexIn,
|
---|
| 14 | const QString& acIn, const QString& prnIn);
|
---|
| 15 | ~cmbParam();
|
---|
| 16 | double partial(const QString& acIn, t_corr* corr);
|
---|
[2990] | 17 | QString toString() const;
|
---|
[2933] | 18 | parType type;
|
---|
| 19 | int index;
|
---|
| 20 | QString AC;
|
---|
| 21 | QString prn;
|
---|
| 22 | double xx;
|
---|
| 23 | };
|
---|
| 24 |
|
---|
[2906] | 25 | class bncComb : public bncEphUser {
|
---|
[2898] | 26 | Q_OBJECT
|
---|
| 27 |
|
---|
| 28 | public:
|
---|
| 29 | bncComb();
|
---|
| 30 | ~bncComb();
|
---|
| 31 | void processCorrLine(const QString& staID, const QString& line);
|
---|
[2918] | 32 | int nStreams() const {return _ACs.size();}
|
---|
[2898] | 33 |
|
---|
| 34 | signals:
|
---|
| 35 | void newMessage(QByteArray msg, bool showOnScreen);
|
---|
| 36 |
|
---|
| 37 | private:
|
---|
[2918] | 38 | class cmbEpoch {
|
---|
| 39 | public:
|
---|
[2927] | 40 | cmbEpoch(const QString& name) {acName = name;}
|
---|
[2918] | 41 | ~cmbEpoch() {
|
---|
| 42 | QMapIterator<QString, t_corr*> it(corr);
|
---|
| 43 | while (it.hasNext()) {
|
---|
| 44 | it.next();
|
---|
| 45 | delete it.value();
|
---|
| 46 | }
|
---|
| 47 | }
|
---|
[2927] | 48 | QString acName;
|
---|
[2918] | 49 | bncTime time;
|
---|
| 50 | QMap<QString, t_corr*> corr; // Corrections (key is PRN)
|
---|
| 51 | };
|
---|
| 52 |
|
---|
| 53 | class cmbAC {
|
---|
| 54 | public:
|
---|
| 55 | cmbAC() {}
|
---|
| 56 | ~cmbAC() {
|
---|
| 57 | QListIterator<cmbEpoch*> it(epochs);
|
---|
| 58 | while (it.hasNext()) {
|
---|
| 59 | delete it.next();
|
---|
| 60 | }
|
---|
| 61 | }
|
---|
| 62 | QString mountPoint;
|
---|
| 63 | QString name;
|
---|
| 64 | double weight;
|
---|
| 65 | QQueue<cmbEpoch*> epochs; // List of Epochs with Corrections
|
---|
| 66 | };
|
---|
| 67 |
|
---|
[2927] | 68 | void processEpochs(const QList<cmbEpoch*>& epochs);
|
---|
[2928] | 69 | void dumpResults(const bncTime& resTime,
|
---|
| 70 | const QMap<QString, t_corr*>& resCorr);
|
---|
[2986] | 71 | void switchToLastEph(const t_eph* lastEph, const t_eph* prevEph,
|
---|
| 72 | t_corr* newCorr);
|
---|
[2918] | 73 |
|
---|
| 74 | QMap<QString, cmbAC*> _ACs; // Analytical Centers (key is mountpoint)
|
---|
[2924] | 75 | bncTime _processedBeforeTime;
|
---|
[2927] | 76 | cmbCaster* _caster;
|
---|
[2933] | 77 | QVector<cmbParam*> _params;
|
---|
[2934] | 78 | double _sigACOff;
|
---|
| 79 | double _sigSatOff;
|
---|
| 80 | double _sigClk;
|
---|
[2933] | 81 | SymmetricMatrix _QQ;
|
---|
[2990] | 82 | QByteArray _log;
|
---|
[2898] | 83 | };
|
---|
| 84 |
|
---|
| 85 | #endif
|
---|