source: ntrip/trunk/BNC/src/PPP/pppFilter.h@ 8915

Last change on this file since 8915 was 8915, checked in by stuerze, 4 years ago

minor changes regarding PPP

  • 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.7 KB
Line 
1#ifndef FILTER_H
2#define FILTER_H
3
4#include <vector>
5#include <newmat.h>
6#include "pppInclude.h"
7#include "pppParlist.h"
8#include "bnctime.h"
9#include "t_prn.h"
10
11namespace BNC_PPP {
12
13class t_pppParlist;
14class t_pppObsPool;
15class t_pppSatObs;
16
17class t_pppFilter {
18 public:
19 t_pppFilter(t_pppObsPool* obsPool);
20 ~t_pppFilter();
21
22 t_irc processEpoch(int num);
23
24 void datumTransformation();
25
26 const ColumnVector& x() const {return _xFlt;}
27 const SymmetricMatrix& Q() const {return _QFlt;}
28
29 int numSat() const {return _numSat;}
30 double HDOP() const {return _dop.H;}
31 double HDOV() const {return _dop.V;}
32 double PDOP() const {return _dop.P;}
33 double GDOP() const {return _dop.G;}
34 double trp() const {
35 const std::vector<t_pppParam*>& par = _parlist->params();
36 for (unsigned ii = 0; ii < par.size(); ++ii) {
37 if (par[ii]->type() == t_pppParam::trp) {
38 return x()[ii];
39 }
40 }
41 return 0.0;
42 };
43 double trpStdev() const {
44 const std::vector<t_pppParam*>& par = _parlist->params();
45 for (unsigned ii = 0; ii < par.size(); ++ii) {
46 if (par[ii]->type() == t_pppParam::trp) {
47 return sqrt(Q()[ii][ii]);
48 }
49 }
50 return 0.0;
51 };
52
53 private:
54 class t_slip {
55 public:
56 t_slip() {
57 _slip = false;
58 _obsSlipCounter = -1;
59 _biasJumpCounter = -1;
60 }
61 bool _slip;
62 int _obsSlipCounter;
63 int _biasJumpCounter;
64 };
65
66 class t_dop {
67 public:
68 t_dop() {reset();}
69 void reset() {H = V = P = T = G = 0.0;}
70 double H;
71 double V;
72 double P;
73 double T;
74 double G;
75 };
76
77 class t_datumTrafo{
78 public:
79 t_datumTrafo () {initIndices();}
80 void initIndices() {_firstRow = 1; _lastRow = 0;}
81 void setFirstSystem(bool firstSys) {_firstSys = firstSys;}
82 bool firstSystem() {return _firstSys;}
83 void updateIndices(int maxObs) {
84 if (_firstSys) {
85 initIndices();
86 }
87 else {
88 _firstRow += maxObs;
89 }
90 _lastRow += maxObs;
91 };
92 void initAA(int maxObs, int numPar) {
93 _AA1.ReSize(maxObs, numPar); _AA1 = 0.0;
94 _AA2.ReSize(maxObs, numPar); _AA2 = 0.0;
95 }
96 void prepareAA(Matrix& AA, int _numEpoProcessing, int nPar) {
97 Matrix& Prep = _AA2;
98 if (_numEpoProcessing == 1) {
99 Prep = _AA1;
100 }
101 Prep.SubMatrix(_firstRow, _lastRow, 1, nPar) = AA;
102 }
103 Matrix varCov(const SymmetricMatrix& QFlt) {
104 Matrix D21 = (_AA2.t() * _AA2).i() * _AA2.t() * _AA1;
105 return D21 * QFlt * D21.t();
106 }
107 int _firstRow;
108 int _lastRow;
109 Matrix _AA1;
110 Matrix _AA2;
111 bool _firstSys;
112 };
113
114 t_irc processSystem(const std::vector<t_lc::type>& LCs,
115 const std::vector<t_pppSatObs*>& obsVector,
116 const t_prn& refPrn,
117 bool pseudoObsIonoAvailable,
118 bool preProcessing);
119
120 t_irc detectCycleSlips(const std::vector<t_lc::type>& LCs,
121 const std::vector<t_pppSatObs*>& obsVector,
122 const t_prn& refPrn,
123 bool preProcessing);
124
125 t_irc resetAmb(t_prn prn, const std::vector<t_pppSatObs*>& obsVector,
126 SymmetricMatrix* QSav = 0, ColumnVector* xSav = 0);
127
128 void cmpDOP(const std::vector<t_pppSatObs*>& obsVector);
129
130 void predictCovCrdPart(const SymmetricMatrix& QFltOld);
131
132 bncTime _epoTime;
133 t_pppParlist* _parlist;
134 t_pppObsPool* _obsPool;
135 t_datumTrafo* _datumTrafo;
136 SymmetricMatrix _QFlt;
137 ColumnVector _xFlt;
138 ColumnVector _x0;
139 t_slip _slips[t_prn::MAXPRN+1];
140 int _numSat;
141 int _numEpoProcessing;
142 int _numAllUsedLCs;
143 t_dop _dop;
144 bncTime _firstEpoTime;
145 bncTime _lastEpoTimeOK;
146 t_prn _refPrn;
147};
148
149}
150
151#endif
Note: See TracBrowser for help on using the repository browser.