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