source: ntrip/trunk/BNC/src/combination/bnccomb.h@ 9264

Last change on this file since 9264 was 9258, checked in by stuerze, 4 years ago

combination adapted to work system by system

File size: 4.0 KB
RevLine 
[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]12class bncRtnetDecoder;
[3181]13class bncSP3;
[3052]14class bncAntex;
[2927]15
[6443]16class 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;
[3433]65 }
[3430]66 ~cmbAC() {}
[3434]67 QString mountPoint;
68 QString name;
69 double weight;
[9258]70 QMap<char, unsigned> numObs;
[2918]71 };
72
[6155]73 class cmbCorr {
[3423]74 public:
[6155]75 cmbCorr() {
[6160]76 _eph = 0;
77 _iod = 0;
78 _dClkResult = 0.0;
[6155]79 }
[6159]80 ~cmbCorr() {}
[7055]81 QString _prn;
82 bncTime _time;
83 unsigned long _iod;
84 t_eph* _eph;
85 t_orbCorr _orbCorr;
86 t_clkCorr _clkCorr;
87 QString _acName;
88 double _dClkResult;
89 ColumnVector _diffRao;
[6157]90 QString ID() {return _acName + "_" + _prn;}
[3423]91 };
92
[3434]93 class cmbEpoch {
94 public:
95 cmbEpoch() {}
96 ~cmbEpoch() {
97 QVectorIterator<cmbCorr*> it(corrs);
98 while (it.hasNext()) {
99 delete it.next();
100 }
101 }
102 QVector<cmbCorr*> corrs;
103 };
104
[9258]105 void processEpoch(char sys);
106 t_irc processEpoch_filter(char sys, QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
[3475]107 ColumnVector& dx);
[9258]108 t_irc processEpoch_singleEpoch(char sys, QTextStream& out, QMap<QString, cmbCorr*>& resCorr,
[3475]109 ColumnVector& dx);
[9258]110 t_irc createAmat(char sys, Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
[6155]111 const ColumnVector& x0, QMap<QString, cmbCorr*>& resCorr);
112 void dumpResults(const QMap<QString, cmbCorr*>& resCorr);
113 void printResults(QTextStream& out, const QMap<QString, cmbCorr*>& resCorr);
[7011]114 void switchToLastEph(t_eph* lastEph, cmbCorr* corr);
[9258]115 t_irc checkOrbits(char sys, QTextStream& out);
116 QVector<cmbCorr*>& corrs(char sys) {return _buffer[sys][_resTime].corrs;}
[2918]117
[6443]118 QMutex _mutex;
[6155]119 QList<cmbAC*> _ACs;
120 bncTime _resTime;
[9258]121 QMap<char, QVector<cmbParam*>> _params;
122 QMap<char, QMap<bncTime, cmbEpoch>> _buffer;
[6155]123 bncRtnetDecoder* _rtnetDecoder;
[9258]124 QMap<char, SymmetricMatrix> _QQ;
[6155]125 QByteArray _log;
126 bncAntex* _antex;
127 double _MAXRES;
[9258]128 QMap<char, QString> _masterOrbitAC;
129 QMap<char, unsigned> _masterMissingEpochs;
[6155]130 e_method _method;
131 int _cmbSampl;
132 QMap<QString, QMap<t_prn, t_orbCorr> > _orbCorrections;
[6443]133 bncEphUser _ephUser;
[9025]134 SsrCorr* _ssrCorr;
[9258]135 QMap<char, unsigned> _cmbSysPrn;
[2898]136};
137
[7299]138#define BNC_CMB (bncComb::instance())
139
[2898]140#endif
Note: See TracBrowser for help on using the repository browser.