Changeset 9419 in ntrip for trunk/BNC/src/PPP/pppFilter.h
- Timestamp:
- May 3, 2021, 2:18:39 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppFilter.h
r9386 r9419 24 24 25 25 t_irc datumTransformation(); 26 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs); 26 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs, bool pseudoObsIono); 27 unsigned setTrafoObs(); 27 28 28 29 const ColumnVector& x() const {return _xFlt;} … … 79 80 class t_datumTrafo { 80 81 public: 81 t_datumTrafo () {initIndices();} 82 void initIndices() {_firstRow = 1; _lastRow = 0;} 83 void setFirstSystem(bool firstSys) {_firstSys = firstSys;} 84 bool firstSystem() {return _firstSys;} 85 void updateIndices(int maxObsSys) { 86 if (firstSystem()) { 82 t_datumTrafo () { 83 initIndices(); 84 } 85 ~t_datumTrafo () { 86 87 } 88 89 void initIndices() { 90 _firstRow = 1; _lastRow = 0; 91 } 92 93 void setFirstSystem(char firstSys) { 94 _firstSys = firstSys; 95 } 96 97 bool firstSystem(char sys) { 98 if (_firstSys == sys) { 99 return true; 100 } 101 return false; 102 } 103 104 void updateIndices(char sys, int maxObsSys) { 105 if (firstSystem(sys)) { 87 106 initIndices(); 88 107 } … … 90 109 _firstRow = _lastRow + 1; 91 110 } 92 _lastRow += maxObsSys; 93 111 _lastRow += maxObsSys;//LOG << "updateIndices: lastRow: " << _lastRow << endl; 94 112 }; 95 void setObsNum(int maxObs) {_maxObs = maxObs;} 96 void setParNum(int numPar) {_numPar = numPar;} 97 int obsNum() {return _maxObs;} 98 int parNum() {return _numPar;} 113 114 void setNumObs(int maxObs) {_maxObs = maxObs;} 115 void setNumPar(int numPar) { _numPar = numPar;} 116 void setLastEpoParlist(t_pppParlist* parlist) {_parlist = parlist;} 117 t_pppParlist* lastEpoParlist() {return _parlist;} 118 int numPar() {return _numPar;} 119 int numObs() {return _maxObs;} 120 void updateNumObs() {//LOG << "updateObsNum _maxObs " << _maxObs; 121 _maxObs = _lastRow;//LOG << "=> _maxObs " << _maxObs << " _numPar: " << _numPar << endl; 122 _AA1 = _AA1.SubMatrix(1, _lastRow, 1, _numPar); 123 _AA2 = _AA2.SubMatrix(1, _lastRow, 1, _numPar); 124 } 125 99 126 const Matrix& AA1() {return _AA1;} 100 127 const Matrix& AA2() {return _AA2;} 101 102 void initAA() { 128 const Matrix& D21() {return _D21;} 129 130 void initAA() {//LOG << "initAA: _maxObs: " << _maxObs << " _numPar: " << _numPar << endl; 103 131 _AA1.ReSize(_maxObs, _numPar); _AA1 = 0.0; 104 132 _AA2.ReSize(_maxObs, _numPar); _AA2 = 0.0; 133 _D21.ReSize(_numPar, _numPar); _D21 = 0.0; 105 134 } 106 135 … … 112 141 Prep->SubMatrix(_firstRow, _lastRow, 1, _numPar) << AA; 113 142 } 143 114 144 void switchAA() { 115 145 _AA1 = _AA2; 116 146 } 117 Matrix& getAA(int ind) { 118 if (ind == 1) {119 return _AA1;120 }121 return _AA2;122 }123 Matrix computeTrafoMatrix() {124 Matrix D21 = ((_AA2.t() * _AA2).i()) * _AA2.t() * _AA1;125 return D21;126 } 147 148 t_irc computeTrafoMatrix() { 149 if (((_AA2.t() * _AA2)).Determinant() == 0.0) { 150 LOG << "(_AA2.t() * _AA2).inv() is singular" << endl; 151 return failure; 152 } 153 _D21 = ((_AA2.t() * _AA2).i()) * _AA2.t() * _AA1; 154 return success; 155 } 156 127 157 void printMatrix(const Matrix& X, int nRow, int nCol) { 128 158 for (int rr = 0; rr < nRow; rr++) { … … 134 164 LOG << endl; 135 165 } 136 166 private: 137 167 int _firstRow; 138 168 int _lastRow; 139 169 Matrix _AA1; 140 170 Matrix _AA2; 141 bool _firstSys; 171 Matrix _D21; 172 char _firstSys; 142 173 int _maxObs; 143 174 int _numPar; 144 175 QMap<char, t_prn> _refSatMapPseudoObs; 176 t_pppParlist* _parlist; 145 177 }; 146 178
Note:
See TracChangeset
for help on using the changeset viewer.