source: ntrip/trunk/BNC/combination/bnccomb.h@ 3423

Last change on this file since 3423 was 3423, checked in by mervart, 13 years ago
File size: 2.3 KB
Line 
1
2#ifndef BNCCOMB_H
3#define BNCCOMB_H
4
5#include <fstream>
6#include <newmat.h>
7#include "bncephuser.h"
8
9class bncRtnetDecoder;
10class bncSP3;
11class bncAntex;
12
13class cmbParam {
14 public:
15 enum parType {AC_offset, Sat_offset, clk};
16 cmbParam(parType type_, int index_, const QString& ac_,
17 const QString& prn_, double sig_0_, double sig_P_);
18 ~cmbParam();
19 double partial(const QString& AC_, t_corr* corr);
20 QString toString() const;
21 parType type;
22 int index;
23 QString AC;
24 QString prn;
25 double xx;
26 double sig_0;
27 double sig_P;
28};
29
30class bncComb : public bncEphUser {
31 Q_OBJECT
32
33 public:
34 bncComb();
35 virtual ~bncComb();
36 void processCorrLine(const QString& staID, const QString& line);
37 int nStreams() const {return _ACs.size();}
38
39 signals:
40 void newMessage(QByteArray msg, bool showOnScreen);
41
42 private:
43 class cmbEpoch {
44 public:
45 cmbEpoch(const QString& name) {acName = name;}
46 ~cmbEpoch() {
47 QMapIterator<QString, t_corr*> it(corr);
48 while (it.hasNext()) {
49 it.next();
50 delete it.value();
51 }
52 }
53 QString acName;
54 bncTime time;
55 QMap<QString, t_corr*> corr; // Corrections (key is PRN)
56 };
57
58 class cmbAC {
59 public:
60 cmbAC() {}
61 ~cmbAC() {
62 QListIterator<cmbEpoch*> it(epochs);
63 while (it.hasNext()) {
64 delete it.next();
65 }
66 }
67 QString mountPoint;
68 QString name;
69 double weight;
70 QQueue<cmbEpoch*> epochs; // List of Epochs with Corrections
71 };
72
73 class t_llInfo {
74 public:
75 QString AC;
76 QString prn;
77 };
78
79 void processEpochs(const QList<cmbEpoch*>& epochs);
80 void dumpResults(const bncTime& resTime,
81 const QMap<QString, t_corr*>& resCorr);
82 void printResults(QTextStream& out, const bncTime& resTime,
83 const QMap<QString, t_corr*>& resCorr);
84 void switchToLastEph(const t_eph* lastEph, t_corr* corr);
85
86 QMap<QString, cmbAC*> _ACs; // Analytical Centers (key is mountpoint)
87 bncTime _lastCorrTime;
88 QVector<cmbParam*> _params;
89 bncRtnetDecoder* _rtnetDecoder;
90 SymmetricMatrix _QQ;
91 bool _firstReg;
92 QByteArray _log;
93 QString _masterAC;
94 bncAntex* _antex;
95 double _MAXRES;
96};
97
98#endif
Note: See TracBrowser for help on using the repository browser.