[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"
|
---|
[6141] | 8 | #include "satObs.h"
|
---|
[9025] | 9 | #include "../RTCM3/clock_and_orbit/clock_orbit_rtcm.h"
|
---|
| 10 | #include "../RTCM3/clock_and_orbit/clock_orbit_igs.h"
|
---|
[2898] | 11 |
|
---|
[3201] | 12 | class bncRtnetDecoder;
|
---|
[3181] | 13 | class bncSP3;
|
---|
[3052] | 14 | class bncAntex;
|
---|
[2927] | 15 |
|
---|
[6443] | 16 | class bncComb : public QObject {
|
---|
[2898] | 17 | Q_OBJECT
|
---|
| 18 | public:
|
---|
| 19 | bncComb();
|
---|
[3297] | 20 | virtual ~bncComb();
|
---|
[7299] | 21 | static bncComb* instance();
|
---|
[2918] | 22 | int nStreams() const {return _ACs.size();}
|
---|
[2898] | 23 |
|
---|
[5583] | 24 | public slots:
|
---|
| 25 | void slotProviderIDChanged(QString mountPoint);
|
---|
[6155] | 26 | void slotNewOrbCorrections(QList<t_orbCorr> orbCorrections);
|
---|
| 27 | void slotNewClkCorrections(QList<t_clkCorr> clkCorrections);
|
---|
[5583] | 28 |
|
---|
[2898] | 29 | signals:
|
---|
| 30 | void newMessage(QByteArray msg, bool showOnScreen);
|
---|
[7085] | 31 | void newOrbCorrections(QList<t_orbCorr>);
|
---|
| 32 | void newClkCorrections(QList<t_clkCorr>);
|
---|
[2898] | 33 |
|
---|
| 34 | private:
|
---|
[3470] | 35 | enum e_method{singleEpoch, filter};
|
---|
| 36 |
|
---|
[6154] | 37 | class cmbParam {
|
---|
| 38 | public:
|
---|
[9258] | 39 | enum parType {offACgnss, offACSat, clkSat};
|
---|
[6154] | 40 | cmbParam(parType type_, int index_, const QString& ac_, const QString& prn_);
|
---|
| 41 | ~cmbParam();
|
---|
[9258] | 42 | double partial(char sys, const QString& AC_, const QString& prn_);
|
---|
| 43 | QString toString(char sys) const;
|
---|
[6154] | 44 | parType type;
|
---|
| 45 | int index;
|
---|
| 46 | QString AC;
|
---|
| 47 | QString prn;
|
---|
| 48 | double xx;
|
---|
| 49 | double sig0;
|
---|
| 50 | double sigP;
|
---|
| 51 | bool epoSpec;
|
---|
| 52 | const t_eph* eph;
|
---|
| 53 | };
|
---|
| 54 |
|
---|
[2918] | 55 | class cmbAC {
|
---|
| 56 | public:
|
---|
[3433] | 57 | cmbAC() {
|
---|
| 58 | weight = 0.0;
|
---|
[9258] | 59 | numObs['G'] = 0;
|
---|
| 60 | numObs['R'] = 0;
|
---|
| 61 | numObs['E'] = 0;
|
---|
| 62 | numObs['C'] = 0;
|
---|
| 63 | numObs['J'] = 0;
|
---|
| 64 | numObs['S'] = 0;
|
---|
[9292] | 65 | numObs['I'] = 0;
|
---|
[3433] | 66 | }
|
---|
[3430] | 67 | ~cmbAC() {}
|
---|
[3434] | 68 | QString mountPoint;
|
---|
| 69 | QString name;
|
---|
| 70 | double weight;
|
---|
[9258] | 71 | QMap<char, unsigned> numObs;
|
---|
[2918] | 72 | };
|
---|
| 73 |
|
---|
[6155] | 74 | class cmbCorr {
|
---|
[3423] | 75 | public:
|
---|
[6155] | 76 | cmbCorr() {
|
---|
[6160] | 77 | _eph = 0;
|
---|
| 78 | _iod = 0;
|
---|
| 79 | _dClkResult = 0.0;
|
---|
[6155] | 80 | }
|
---|
[6159] | 81 | ~cmbCorr() {}
|
---|
[7055] | 82 | QString _prn;
|
---|
| 83 | bncTime _time;
|
---|
| 84 | unsigned long _iod;
|
---|
| 85 | t_eph* _eph;
|
---|
| 86 | t_orbCorr _orbCorr;
|
---|
| 87 | t_clkCorr _clkCorr;
|
---|
| 88 | QString _acName;
|
---|
| 89 | double _dClkResult;
|
---|
| 90 | ColumnVector _diffRao;
|
---|
[6157] | 91 | QString ID() {return _acName + "_" + _prn;}
|
---|
[3423] | 92 | };
|
---|
| 93 |
|
---|
[3434] | 94 | class cmbEpoch {
|
---|
| 95 | public:
|
---|
| 96 | cmbEpoch() {}
|
---|
| 97 | ~cmbEpoch() {
|
---|
| 98 | QVectorIterator<cmbCorr*> it(corrs);
|
---|
| 99 | while (it.hasNext()) {
|
---|
| 100 | delete it.next();
|
---|
| 101 | }
|
---|
| 102 | }
|
---|
| 103 | QVector<cmbCorr*> corrs;
|
---|
| 104 | };
|
---|
| 105 |
|
---|
[9258] | 106 | void processEpoch(char sys);
|
---|
| 107 | t_irc processEpoch_filter(char sys, QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
|
---|
[3475] | 108 | ColumnVector& dx);
|
---|
[9258] | 109 | t_irc processEpoch_singleEpoch(char sys, QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
|
---|
[3475] | 110 | ColumnVector& dx);
|
---|
[9258] | 111 | t_irc createAmat(char sys, Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
|
---|
[6155] | 112 | const ColumnVector& x0, QMap<QString, cmbCorr*>& resCorr);
|
---|
| 113 | void dumpResults(const QMap<QString, cmbCorr*>& resCorr);
|
---|
| 114 | void printResults(QTextStream& out, const QMap<QString, cmbCorr*>& resCorr);
|
---|
[7011] | 115 | void switchToLastEph(t_eph* lastEph, cmbCorr* corr);
|
---|
[9258] | 116 | t_irc checkOrbits(char sys, QTextStream& out);
|
---|
| 117 | QVector<cmbCorr*>& corrs(char sys) {return _buffer[sys][_resTime].corrs;}
|
---|
[2918] | 118 |
|
---|
[6443] | 119 | QMutex _mutex;
|
---|
[6155] | 120 | QList<cmbAC*> _ACs;
|
---|
| 121 | bncTime _resTime;
|
---|
[9258] | 122 | QMap<char, QVector<cmbParam*>> _params;
|
---|
| 123 | QMap<char, QMap<bncTime, cmbEpoch>> _buffer;
|
---|
[6155] | 124 | bncRtnetDecoder* _rtnetDecoder;
|
---|
[9258] | 125 | QMap<char, SymmetricMatrix> _QQ;
|
---|
[6155] | 126 | QByteArray _log;
|
---|
| 127 | bncAntex* _antex;
|
---|
| 128 | double _MAXRES;
|
---|
[9258] | 129 | QMap<char, QString> _masterOrbitAC;
|
---|
| 130 | QMap<char, unsigned> _masterMissingEpochs;
|
---|
[6155] | 131 | e_method _method;
|
---|
| 132 | int _cmbSampl;
|
---|
| 133 | QMap<QString, QMap<t_prn, t_orbCorr> > _orbCorrections;
|
---|
[6443] | 134 | bncEphUser _ephUser;
|
---|
[9025] | 135 | SsrCorr* _ssrCorr;
|
---|
[9258] | 136 | QMap<char, unsigned> _cmbSysPrn;
|
---|
[9292] | 137 | bool _useGps;
|
---|
| 138 | bool _useGlo;
|
---|
| 139 | bool _useGal;
|
---|
| 140 | bool _useBds;
|
---|
| 141 | bool _useQzss;
|
---|
| 142 | bool _useSbas;
|
---|
| 143 | bool _useIrnss;
|
---|
[2898] | 144 | };
|
---|
| 145 |
|
---|
[7299] | 146 | #define BNC_CMB (bncComb::instance())
|
---|
| 147 |
|
---|
[2898] | 148 | #endif
|
---|