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

Last change on this file since 5852 was 5819, checked in by mervart, 10 years ago
File size: 3.3 KB
RevLine 
[5743]1#ifndef PARLIST_H
2#define PARLIST_H
3
4#include <vector>
5#include <string>
[5810]6#include "pppInclude.h"
[5743]7#include "t_prn.h"
8#include "bnctime.h"
9
[5814]10namespace BNC_PPP {
[5743]11
[5819]12class t_pppSatObs;
[5743]13
[5810]14class t_pppParam {
[5743]15 public:
[5752]16 enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, trp, bias};
[5743]17
[5810]18 t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC,
[5819]19 const std::vector<t_pppSatObs*>* obsVector = 0);
[5743]20
[5810]21 ~t_pppParam();
[5743]22 e_type type() const {return _type;}
23 double x0() const {return _x0;}
[5819]24 double partial(const bncTime& epoTime, const t_pppSatObs* obs,
[5743]25 const t_lc::type& tLC) const;
26 bool epoSpec() const {return _epoSpec;}
[5810]27 bool isEqual(const t_pppParam* par2) const {
[5743]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
[5810]54 static bool sortFunction(const t_pppParam* p1, const t_pppParam* p2) {
[5743]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
[5810]94class t_pppParlist {
[5743]95 public:
[5810]96 t_pppParlist();
97 ~t_pppParlist();
[5743]98
99 t_irc set(const bncTime& epoTime, const std::vector<t_lc::type>& ambLCs,
[5819]100 const std::vector<t_pppSatObs*>& obsVector);
[5743]101
102 unsigned nPar() const {return _params.size();}
[5810]103 const std::vector<t_pppParam*>& params() const {return _params;}
104 std::vector<t_pppParam*>& params() {return _params;}
[5743]105 void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
106 const ColumnVector& xx, double ambFixRate) const;
107 private:
[5810]108 std::vector<t_pppParam*> _params;
[5743]109};
110
111}
112
113#endif
Note: See TracBrowser for help on using the repository browser.