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