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

Last change on this file since 8669 was 7299, checked in by stuerze, 9 years ago

some additions, to allow PPP with the internal combination result

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