1 | #ifndef PARLIST_H
|
---|
2 | #define PARLIST_H
|
---|
3 |
|
---|
4 | #include <vector>
|
---|
5 | #include <string>
|
---|
6 | #include "pppInclude.h"
|
---|
7 | #include "t_prn.h"
|
---|
8 | #include "bnctime.h"
|
---|
9 | #include "pppRefSat.h"
|
---|
10 |
|
---|
11 | namespace BNC_PPP {
|
---|
12 |
|
---|
13 | class t_pppSatObs;
|
---|
14 |
|
---|
15 | class t_pppParam {
|
---|
16 | public:
|
---|
17 | enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb,
|
---|
18 | cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1,
|
---|
19 | cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
|
---|
20 |
|
---|
21 | t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0);
|
---|
22 | t_pppParam(const t_pppParam* old);
|
---|
23 | ~t_pppParam();
|
---|
24 |
|
---|
25 | e_type type() const {return _type;}
|
---|
26 | double x0() const {return _x0;}
|
---|
27 | double partial(const bncTime& epoTime, const t_pppSatObs* obs,
|
---|
28 | const t_lc::type& tLC, const t_prn refPrn) const;
|
---|
29 | bool epoSpec() const {return _epoSpec;}
|
---|
30 | bool isEqual(const t_pppParam* par2) const {
|
---|
31 | return (_type == par2->_type && _prn == par2->_prn && _tLC == par2->_tLC);
|
---|
32 | }
|
---|
33 | void setIndex(int indexNew) {
|
---|
34 | _indexOld = _indexNew;
|
---|
35 | _indexNew = indexNew;
|
---|
36 | }
|
---|
37 | void resetIndex() {
|
---|
38 | _indexOld = -1;
|
---|
39 | _indexNew = -1;
|
---|
40 | }
|
---|
41 | int indexOld() const {return _indexOld;}
|
---|
42 | int indexNew() const {return _indexNew;}
|
---|
43 | double sigma0() const {return _sigma0;}
|
---|
44 | double noise() const {return _noise;}
|
---|
45 | t_lc::type tLC() const {return _tLC;}
|
---|
46 | t_prn prn() const {return _prn;}
|
---|
47 | std::string toString() const;
|
---|
48 |
|
---|
49 | const bncTime& lastObsTime() const {return _lastObsTime;}
|
---|
50 | void setLastObsTime(const bncTime& epoTime) {_lastObsTime = epoTime;}
|
---|
51 | const bncTime& firstObsTime() const {return _firstObsTime;}
|
---|
52 | void setFirstObsTime(const bncTime& epoTime) {_firstObsTime = epoTime;}
|
---|
53 |
|
---|
54 | bool ambResetCandidate() const {return _ambInfo && _ambInfo->_resetCandidate;}
|
---|
55 | void setAmbResetCandidate() {if (_ambInfo) _ambInfo->_resetCandidate = true;}
|
---|
56 | double ambEleSat() const {return _ambInfo ? _ambInfo->_eleSat : 0.0;}
|
---|
57 | void setAmbEleSat(double eleSat) {if (_ambInfo) _ambInfo->_eleSat = eleSat;}
|
---|
58 | unsigned ambNumEpo() const {return _ambInfo ? _ambInfo->_numEpo : 0;}
|
---|
59 | void stepAmbNumEpo() {if (_ambInfo) _ambInfo->_numEpo += 1;}
|
---|
60 |
|
---|
61 | static bool sortFunction(const t_pppParam* p1, const t_pppParam* p2) {
|
---|
62 | if (p1->_type != p2->_type) {
|
---|
63 | return p1->_type < p2->_type;
|
---|
64 | }
|
---|
65 | else if (p1->_tLC != p2->_tLC) {
|
---|
66 | return p1->_tLC < p2->_tLC;
|
---|
67 | }
|
---|
68 | else if (p1->_prn != p2->_prn) {
|
---|
69 | return p1->_prn < p2->_prn;
|
---|
70 | }
|
---|
71 | return false;
|
---|
72 | }
|
---|
73 |
|
---|
74 | private:
|
---|
75 | class t_ambInfo {
|
---|
76 | public:
|
---|
77 | t_ambInfo() {
|
---|
78 | _resetCandidate = false;
|
---|
79 | _eleSat = 0.0;
|
---|
80 | _numEpo = 0;
|
---|
81 | }
|
---|
82 | ~t_ambInfo() {}
|
---|
83 | bool _resetCandidate;
|
---|
84 | double _eleSat;
|
---|
85 | unsigned _numEpo;
|
---|
86 | };
|
---|
87 | e_type _type;
|
---|
88 | t_prn _prn;
|
---|
89 | t_lc::type _tLC;
|
---|
90 | double _x0;
|
---|
91 | bool _epoSpec;
|
---|
92 | int _indexOld;
|
---|
93 | int _indexNew;
|
---|
94 | double _sigma0;
|
---|
95 | double _noise;
|
---|
96 | t_ambInfo* _ambInfo;
|
---|
97 | bncTime _lastObsTime;
|
---|
98 | bncTime _firstObsTime;
|
---|
99 | };
|
---|
100 |
|
---|
101 | class t_pppParlist {
|
---|
102 | public:
|
---|
103 | t_pppParlist();
|
---|
104 | ~t_pppParlist();
|
---|
105 | t_pppParlist(const t_pppParlist& old);
|
---|
106 | const t_pppParlist&operator= (const t_pppParlist& p);
|
---|
107 | t_irc set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector,
|
---|
108 | const QMap<char, t_pppRefSat*>& refSatMap);
|
---|
109 | unsigned nPar() const {return _params.size();}
|
---|
110 | const std::vector<t_pppParam*>& params() const {return _params;}
|
---|
111 | std::vector<t_pppParam*>& params() {return _params;}
|
---|
112 | const QList<char>& usedSystems() const {return _usedSystems;}
|
---|
113 | void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
|
---|
114 | const ColumnVector& xx) const;
|
---|
115 | void printParams(const bncTime& epoTime);
|
---|
116 |
|
---|
117 | private:
|
---|
118 | std::vector<t_pppParam*> _params;
|
---|
119 | QList<char> _usedSystems;
|
---|
120 | };
|
---|
121 |
|
---|
122 | }
|
---|
123 |
|
---|
124 | #endif
|
---|