[7237] | 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 |
|
---|
| 11 | namespace BNC_PPP {
|
---|
| 12 |
|
---|
| 13 | class t_pppParlist;
|
---|
| 14 | class t_pppObsPool;
|
---|
| 15 | class t_pppSatObs;
|
---|
| 16 |
|
---|
| 17 | class t_pppFilter {
|
---|
| 18 | public:
|
---|
| 19 | t_pppFilter();
|
---|
| 20 | ~t_pppFilter();
|
---|
| 21 |
|
---|
| 22 | t_irc processEpoch(t_pppObsPool* obsPool);
|
---|
| 23 |
|
---|
| 24 | const ColumnVector& x() const {return _xFlt;}
|
---|
| 25 | const SymmetricMatrix& Q() const {return _QFlt;}
|
---|
| 26 |
|
---|
| 27 | int numSat() const {return _numSat;}
|
---|
[7932] | 28 | double HDOP() const {return _dop.H;}
|
---|
| 29 | double HDOV() const {return _dop.V;}
|
---|
[7237] | 30 | double PDOP() const {return _dop.P;}
|
---|
| 31 | double GDOP() const {return _dop.G;}
|
---|
| 32 | double trp() const {
|
---|
| 33 | const std::vector<t_pppParam*>& par = _parlist->params();
|
---|
| 34 | for (unsigned ii = 0; ii < par.size(); ++ii) {
|
---|
| 35 | if (par[ii]->type() == t_pppParam::trp) {
|
---|
| 36 | return x()[ii];
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
| 39 | return 0.0;
|
---|
| 40 | };
|
---|
| 41 | double trpStdev() const {
|
---|
| 42 | const std::vector<t_pppParam*>& par = _parlist->params();
|
---|
| 43 | for (unsigned ii = 0; ii < par.size(); ++ii) {
|
---|
| 44 | if (par[ii]->type() == t_pppParam::trp) {
|
---|
| 45 | return sqrt(Q()[ii][ii]);
|
---|
| 46 | }
|
---|
| 47 | }
|
---|
| 48 | return 0.0;
|
---|
| 49 | };
|
---|
| 50 |
|
---|
| 51 | private:
|
---|
| 52 | class t_slip {
|
---|
| 53 | public:
|
---|
| 54 | t_slip() {
|
---|
| 55 | _slip = false;
|
---|
| 56 | _obsSlipCounter = -1;
|
---|
| 57 | _biasJumpCounter = -1;
|
---|
| 58 | }
|
---|
| 59 | bool _slip;
|
---|
| 60 | int _obsSlipCounter;
|
---|
| 61 | int _biasJumpCounter;
|
---|
| 62 | };
|
---|
| 63 |
|
---|
| 64 | class t_dop {
|
---|
| 65 | public:
|
---|
| 66 | t_dop() {reset();}
|
---|
[7932] | 67 | void reset() {H = V = P = T = G = 0.0;}
|
---|
| 68 | double H;
|
---|
| 69 | double V;
|
---|
[7237] | 70 | double P;
|
---|
| 71 | double T;
|
---|
| 72 | double G;
|
---|
| 73 | };
|
---|
| 74 |
|
---|
[7302] | 75 | t_irc processSystem(const std::vector<t_lc::type>& LCs,
|
---|
[7237] | 76 | const std::vector<t_pppSatObs*>& obsVector);
|
---|
| 77 |
|
---|
[7302] | 78 | t_irc detectCycleSlips(const std::vector<t_lc::type>& LCs,
|
---|
[7237] | 79 | const std::vector<t_pppSatObs*>& obsVector);
|
---|
| 80 |
|
---|
| 81 | t_irc resetAmb(t_prn prn, const std::vector<t_pppSatObs*>& obsVector,
|
---|
| 82 | SymmetricMatrix* QSav = 0, ColumnVector* xSav = 0);
|
---|
| 83 |
|
---|
| 84 | void cmpDOP(const std::vector<t_pppSatObs*>& obsVector);
|
---|
| 85 |
|
---|
| 86 | void predictCovCrdPart(const SymmetricMatrix& QFltOld);
|
---|
| 87 |
|
---|
| 88 | bncTime _epoTime;
|
---|
| 89 | t_pppParlist* _parlist;
|
---|
| 90 | SymmetricMatrix _QFlt;
|
---|
| 91 | ColumnVector _xFlt;
|
---|
| 92 | ColumnVector _x0;
|
---|
| 93 | t_slip _slips[t_prn::MAXPRN+1];
|
---|
| 94 | int _numSat;
|
---|
| 95 | t_dop _dop;
|
---|
| 96 | bncTime _firstEpoTime;
|
---|
[7302] | 97 | bncTime _lastEpoTimeOK;
|
---|
[7237] | 98 | };
|
---|
| 99 |
|
---|
| 100 | }
|
---|
| 101 |
|
---|
| 102 | #endif
|
---|