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

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