source: ntrip/trunk/BNC/src/PPP/pppParlist.h@ 10805

Last change on this file since 10805 was 10791, checked in by mervart, 3 months ago

BNC Multifrequency and PPPAR Client (initial version)

  • Property svn:keywords set to Author Date Id Rev URL;svn:eol-style=native
  • Property svn:mime-type set to text/plain
File size: 3.6 KB
Line 
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
10namespace BNC_PPP {
11
12class t_pppSatObs;
13
14class t_pppParam {
15 public:
16 enum e_type {crdX, crdY, crdZ, rClk, trp, ion, amb, bias};
17
18 t_pppParam(e_type type, const t_prn& prn, t_lc LC = t_lc(), const std::vector<t_pppSatObs*>* obsVector = 0);
19 ~t_pppParam();
20
21 e_type type() const {return _type;}
22 double x0() const {return _x0;}
23 double partial(const bncTime& epoTime, const t_pppSatObs* obs, const t_lc& LC) const;
24 bool epoSpec() const {return _epoSpec;}
25 bool isEqual(const t_pppParam* par2) const {
26 return (_type == par2->_type && _prn == par2->_prn && _LC == par2->_LC && _sys == par2->_sys);
27 }
28 void setIndex(int indexNew) {
29 _indexOld = _indexNew;
30 _indexNew = indexNew;
31 }
32 void resetIndex() {
33 _indexOld = -1;
34 }
35 int indexOld() const {return _indexOld;}
36 int indexNew() const {return _indexNew;}
37 double sigma0() const {return _sigma0;}
38 double noise() const {return _noise;}
39 t_lc LC() const {return _LC;}
40 t_prn prn() const {return _prn;}
41 std::string toString() const;
42
43 const bncTime& lastObsTime() const {return _lastObsTime;}
44 void setLastObsTime(const bncTime& epoTime) {_lastObsTime = epoTime;}
45 const bncTime& firstObsTime() const {return _firstObsTime;}
46 void setFirstObsTime(const bncTime& epoTime) {_firstObsTime = epoTime;}
47
48 bool ambResetCandidate() const {return _ambInfo && _ambInfo->_resetCandidate;}
49 void setAmbResetCandidate() {if (_ambInfo) _ambInfo->_resetCandidate = true;}
50 double ambEleSat() const {return _ambInfo ? _ambInfo->_eleSat : 0.0;}
51 void setAmbEleSat(double eleSat) {if (_ambInfo) _ambInfo->_eleSat = eleSat;}
52 unsigned ambNumEpo() const {return _ambInfo ? _ambInfo->_numEpo : 0;}
53 void stepAmbNumEpo() {if (_ambInfo) _ambInfo->_numEpo += 1;}
54 char system() const {
55 if (_prn.valid()) {
56 return _prn.system();
57 }
58 else if (_LC.valid()) {
59 return _LC.system();
60 }
61 else {
62 return _sys;
63 }
64 }
65 void setSystem(char sys) {_sys = sys;}
66
67 static bool sortFunction(const t_pppParam* p1, const t_pppParam* p2) {
68 if (p1->_type != p2->_type) {
69 return p1->_type < p2->_type;
70 }
71 else if (p1->_LC != p2->_LC) {
72 return p1->_LC < p2->_LC;
73 }
74 else if (p1->_prn != p2->_prn) {
75 return p1->_prn < p2->_prn;
76 }
77 return false;
78 }
79
80 private:
81 class t_ambInfo {
82 public:
83 t_ambInfo() {
84 _resetCandidate = false;
85 _eleSat = 0.0;
86 _numEpo = 0;
87 }
88 ~t_ambInfo() {}
89 bool _resetCandidate;
90 double _eleSat;
91 unsigned _numEpo;
92 };
93 e_type _type;
94 t_prn _prn;
95 char _sys;
96 t_lc _LC;
97 double _x0;
98 bool _epoSpec;
99 int _indexOld;
100 int _indexNew;
101 double _sigma0;
102 double _noise;
103 t_ambInfo* _ambInfo;
104 bncTime _lastObsTime;
105 bncTime _firstObsTime;
106};
107
108class t_pppParlist {
109 public:
110 t_pppParlist();
111 ~t_pppParlist();
112 t_irc set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector);
113 unsigned nPar() const {return _params.size();}
114 const std::vector<t_pppParam*>& params() const {return _params;}
115 std::vector<t_pppParam*>& params() {return _params;}
116 void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
117 const ColumnVector& xx, double fixRatio = 0.0) const;
118 void printParams(const bncTime& epoTime);
119
120 private:
121 std::vector<t_pppParam*> _params;
122 std::map<char, int> _usedSystems;
123};
124
125}
126
127#endif
Note: See TracBrowser for help on using the repository browser.