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