[5743] | 1 | #ifndef SATOBS_H
|
---|
| 2 | #define SATOBS_H
|
---|
| 3 |
|
---|
| 4 | #include <string>
|
---|
| 5 | #include <map>
|
---|
| 6 | #include <newmat.h>
|
---|
[5810] | 7 | #include "pppInclude.h"
|
---|
[5743] | 8 | #include "bnctime.h"
|
---|
| 9 |
|
---|
[5814] | 10 | namespace BNC_PPP {
|
---|
[5743] | 11 |
|
---|
[5810] | 12 | class t_pppStation;
|
---|
[5743] | 13 |
|
---|
[5819] | 14 | class t_pppSatObs {
|
---|
[5743] | 15 | public:
|
---|
[5823] | 16 | t_pppSatObs(const t_satObs& satObs);
|
---|
[5819] | 17 | ~t_pppSatObs();
|
---|
[5743] | 18 | bool isValid() const {return _valid;}
|
---|
| 19 | void prepareObs();
|
---|
| 20 | const t_prn& prn() const {return _prn;}
|
---|
| 21 | const ColumnVector& xc() const {return _xcSat;}
|
---|
| 22 | const bncTime& time() const {return _time;}
|
---|
[5810] | 23 | t_irc cmpModel(const t_pppStation* station);
|
---|
[5743] | 24 | double obsValue(t_lc::type tLC) const;
|
---|
| 25 | double cmpValue(t_lc::type tLC) const;
|
---|
| 26 | double cmpValueForBanc(t_lc::type tLC) const;
|
---|
| 27 | double rho() const {return _model._rho;}
|
---|
| 28 | double sagnac() const {return _model._sagnac;}
|
---|
| 29 | double eleSat() const {return _model._eleSat;}
|
---|
| 30 | bool modelSet() const {return _model._set;}
|
---|
| 31 | void printModel() const;
|
---|
| 32 | double lc(t_lc::type tLC, double L1, double L2,
|
---|
| 33 | double C1, double C2, ColumnVector* coeff = 0) const;
|
---|
| 34 | double lambda(t_lc::type tLC) const;
|
---|
| 35 | double sigma(t_lc::type tLC) const;
|
---|
[5916] | 36 | double maxRes(t_lc::type tLC) const;
|
---|
[5743] | 37 | bool outlier() const {return _outlier;}
|
---|
| 38 | void setOutlier() {_outlier = true;}
|
---|
| 39 | int channel() const {return _channel;}
|
---|
| 40 | void setRes(t_lc::type tLC, double res);
|
---|
| 41 | double getRes(t_lc::type tLC) const;
|
---|
| 42 |
|
---|
| 43 | bool slip() const {
|
---|
[5830] | 44 | for (unsigned ii = 0; ii < _allObs.size(); ii++) {
|
---|
| 45 | if (_allObs[ii]->_slip) {
|
---|
[5743] | 46 | return true;
|
---|
| 47 | }
|
---|
| 48 | }
|
---|
| 49 | return false;
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 | int slipCounter() const {
|
---|
| 53 | int cnt = -1;
|
---|
[5830] | 54 | for (unsigned ii = 0; ii < _allObs.size(); ii++) {
|
---|
| 55 | if (_allObs[ii]->_slipCounter > cnt) {
|
---|
| 56 | cnt = _allObs[ii]->_slipCounter;
|
---|
[5743] | 57 | }
|
---|
| 58 | }
|
---|
| 59 | return cnt;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
| 62 | int biasJumpCounter() const {
|
---|
| 63 | int jmp = -1;
|
---|
[5830] | 64 | for (unsigned ii = 0; ii < _allObs.size(); ii++) {
|
---|
| 65 | if (_allObs[ii]->_biasJumpCounter > jmp) {
|
---|
| 66 | jmp = _allObs[ii]->_biasJumpCounter;
|
---|
[5743] | 67 | }
|
---|
| 68 | }
|
---|
| 69 | return jmp;
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | private:
|
---|
| 73 | class t_model {
|
---|
| 74 | public:
|
---|
| 75 | t_model() {reset();}
|
---|
| 76 | ~t_model() {}
|
---|
| 77 | void reset() {
|
---|
| 78 | _set = false;
|
---|
| 79 | _rho = 0.0;
|
---|
| 80 | _eleSat = 0.0;
|
---|
| 81 | _azSat = 0.0;
|
---|
| 82 | _recClkM = 0.0;
|
---|
| 83 | _satClkM = 0.0;
|
---|
| 84 | _sagnac = 0.0;
|
---|
| 85 | _antEcc = 0.0;
|
---|
| 86 | _tropo = 0.0;
|
---|
| 87 | _tide = 0.0;
|
---|
| 88 | _windUp = 0.0;
|
---|
| 89 | _antPco1 = 0.0;
|
---|
| 90 | _antPco2 = 0.0;
|
---|
| 91 | _biasC1 = 0.0;
|
---|
| 92 | _biasC2 = 0.0;
|
---|
| 93 | _biasL1 = 0.0;
|
---|
| 94 | _biasL2 = 0.0;
|
---|
| 95 | }
|
---|
| 96 | bool _set;
|
---|
| 97 | double _rho;
|
---|
| 98 | double _eleSat;
|
---|
| 99 | double _azSat;
|
---|
| 100 | double _recClkM;
|
---|
| 101 | double _satClkM;
|
---|
| 102 | double _sagnac;
|
---|
| 103 | double _antEcc;
|
---|
| 104 | double _tropo;
|
---|
| 105 | double _tide;
|
---|
| 106 | double _windUp;
|
---|
| 107 | double _antPco1;
|
---|
| 108 | double _antPco2;
|
---|
| 109 | double _biasC1;
|
---|
| 110 | double _biasC2;
|
---|
| 111 | double _biasL1;
|
---|
| 112 | double _biasL2;
|
---|
| 113 | };
|
---|
| 114 |
|
---|
[5830] | 115 | t_prn _prn;
|
---|
| 116 | bncTime _time;
|
---|
| 117 | int _channel;
|
---|
| 118 | std::vector<t_frqObs*> _allObs;
|
---|
| 119 | bool _valid;
|
---|
| 120 | t_frqObs* _validObs1;
|
---|
| 121 | t_frqObs* _validObs2;
|
---|
| 122 | double _f1;
|
---|
| 123 | double _f2;
|
---|
| 124 | double _rawC1;
|
---|
| 125 | double _rawC2;
|
---|
| 126 | double _rawL1;
|
---|
| 127 | double _rawL2;
|
---|
| 128 | ColumnVector _xcSat;
|
---|
| 129 | ColumnVector _vvSat;
|
---|
| 130 | t_model _model;
|
---|
| 131 | bool _outlier;
|
---|
| 132 | std::map<t_lc::type, double> _res;
|
---|
[5743] | 133 | };
|
---|
| 134 |
|
---|
| 135 | }
|
---|
| 136 |
|
---|
| 137 | #endif
|
---|