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