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

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