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