source: ntrip/branches/BNC_2.12/src/combination/bnccomb.h@ 10298

Last change on this file since 10298 was 9036, checked in by stuerze, 4 years ago

some modification to allow encoding and decoding of SSR corrections in RTCM-SSR and IGS-SSR formats

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