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