| [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;
|
|---|
| [8905] | 21 | bool isReference() const {return _reference;};
|
|---|
| 22 | void setAsReference() {_reference = true;};
|
|---|
| [7237] | 23 | const t_prn& prn() const {return _prn;}
|
|---|
| 24 | const ColumnVector& xc() const {return _xcSat;}
|
|---|
| 25 | const bncTime& time() const {return _time;}
|
|---|
| 26 | t_irc cmpModel(const t_pppStation* station);
|
|---|
| 27 | double obsValue(t_lc::type tLC, bool* valid = 0) const;
|
|---|
| 28 | double cmpValue(t_lc::type tLC) const;
|
|---|
| 29 | double cmpValueForBanc(t_lc::type tLC) const;
|
|---|
| 30 | double rho() const {return _model._rho;}
|
|---|
| 31 | double sagnac() const {return _model._sagnac;}
|
|---|
| 32 | double eleSat() const {return _model._eleSat;}
|
|---|
| 33 | bool modelSet() const {return _model._set;}
|
|---|
| 34 | void printModel() const;
|
|---|
| [8905] | 35 | void printObsMinusComputed() const;
|
|---|
| [7836] | 36 | void lcCoeff(t_lc::type tLC,
|
|---|
| [7237] | 37 | std::map<t_frequency::type, double>& codeCoeff,
|
|---|
| [8905] | 38 | std::map<t_frequency::type, double>& phaseCoeff,
|
|---|
| 39 | std::map<t_frequency::type, double>& ionoCoeff) const;
|
|---|
| [7237] | 40 | double lambda(t_lc::type tLC) const;
|
|---|
| 41 | double sigma(t_lc::type tLC) const;
|
|---|
| 42 | double maxRes(t_lc::type tLC) const;
|
|---|
| 43 | bool outlier() const {return _outlier;}
|
|---|
| 44 | void setOutlier() {_outlier = true;}
|
|---|
| 45 | void setRes(t_lc::type tLC, double res);
|
|---|
| 46 | double getRes(t_lc::type tLC) const;
|
|---|
| [8905] | 47 | void setPseudoObsIono(t_frequency::type freq, double stecRefSat);
|
|---|
| 48 | double getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];}
|
|---|
| [7237] | 49 |
|
|---|
| [7836] | 50 | // RINEX
|
|---|
| [7237] | 51 | bool slip() const {
|
|---|
| 52 | for (unsigned ii = 1; ii < t_frequency::max; ii++) {
|
|---|
| 53 | if (_obs[ii] && _obs[ii]->_slip) {
|
|---|
| 54 | return true;
|
|---|
| 55 | }
|
|---|
| 56 | }
|
|---|
| 57 | return false;
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| [7836] | 60 | // RTCM
|
|---|
| [7237] | 61 | int slipCounter() const {
|
|---|
| 62 | int cnt = -1;
|
|---|
| 63 | for (unsigned ii = 1; ii < t_frequency::max; ii++) {
|
|---|
| 64 | if (_obs[ii] && _obs[ii]->_slipCounter > cnt) {
|
|---|
| 65 | cnt = _obs[ii]->_slipCounter;
|
|---|
| 66 | }
|
|---|
| 67 | }
|
|---|
| 68 | return cnt;
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | int biasJumpCounter() const {
|
|---|
| 72 | int jmp = -1;
|
|---|
| 73 | for (unsigned ii = 1; ii < t_frequency::max; ii++) {
|
|---|
| 74 | if (_obs[ii] && _obs[ii]->_biasJumpCounter > jmp) {
|
|---|
| 75 | jmp = _obs[ii]->_biasJumpCounter;
|
|---|
| 76 | }
|
|---|
| 77 | }
|
|---|
| 78 | return jmp;
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | private:
|
|---|
| 82 | class t_model {
|
|---|
| 83 | public:
|
|---|
| 84 | t_model() {reset();}
|
|---|
| 85 | ~t_model() {}
|
|---|
| 86 | void reset() {
|
|---|
| [8905] | 87 | _set = false;
|
|---|
| 88 | _rho = 0.0;
|
|---|
| 89 | _eleSat = 0.0;
|
|---|
| 90 | _azSat = 0.0;
|
|---|
| 91 | _recClkM = 0.0;
|
|---|
| 92 | _satClkM = 0.0;
|
|---|
| 93 | _sagnac = 0.0;
|
|---|
| 94 | _antEcc = 0.0;
|
|---|
| 95 | _tropo = 0.0;
|
|---|
| 96 | _tideEarth = 0.0;
|
|---|
| 97 | _tideOcean = 0.0;
|
|---|
| 98 | _windUp = 0.0;
|
|---|
| 99 | _rel = 0.0;
|
|---|
| [7237] | 100 | for (unsigned ii = 0; ii < t_frequency::max; ii++) {
|
|---|
| [7250] | 101 | _antPCO[ii] = 0.0;
|
|---|
| 102 | _codeBias[ii] = 0.0;
|
|---|
| 103 | _phaseBias[ii] = 0.0;
|
|---|
| 104 | _ionoCodeDelay[ii] = 0.0;
|
|---|
| [7237] | 105 | }
|
|---|
| 106 | }
|
|---|
| 107 | bool _set;
|
|---|
| 108 | double _rho;
|
|---|
| 109 | double _eleSat;
|
|---|
| 110 | double _azSat;
|
|---|
| 111 | double _recClkM;
|
|---|
| 112 | double _satClkM;
|
|---|
| 113 | double _sagnac;
|
|---|
| 114 | double _antEcc;
|
|---|
| 115 | double _tropo;
|
|---|
| [8905] | 116 | double _tideEarth;
|
|---|
| 117 | double _tideOcean;
|
|---|
| [7237] | 118 | double _windUp;
|
|---|
| [8619] | 119 | double _rel;
|
|---|
| [7237] | 120 | double _antPCO[t_frequency::max];
|
|---|
| 121 | double _codeBias[t_frequency::max];
|
|---|
| 122 | double _phaseBias[t_frequency::max];
|
|---|
| [7250] | 123 | double _ionoCodeDelay[t_frequency::max];
|
|---|
| [7237] | 124 | };
|
|---|
| 125 |
|
|---|
| 126 | void prepareObs(const t_satObs& satObs);
|
|---|
| 127 |
|
|---|
| 128 | bool _valid;
|
|---|
| [8905] | 129 | bool _reference;
|
|---|
| [7237] | 130 | t_frequency::type _fType1;
|
|---|
| 131 | t_frequency::type _fType2;
|
|---|
| 132 | t_prn _prn;
|
|---|
| 133 | bncTime _time;
|
|---|
| 134 | int _channel;
|
|---|
| 135 | t_frqObs* _obs[t_frequency::max];
|
|---|
| 136 | ColumnVector _xcSat;
|
|---|
| 137 | ColumnVector _vvSat;
|
|---|
| 138 | t_model _model;
|
|---|
| 139 | bool _outlier;
|
|---|
| 140 | std::map<t_lc::type, double> _res;
|
|---|
| [7250] | 141 | double _signalPropagationTime;
|
|---|
| [8905] | 142 | double _stecRefSat;
|
|---|
| 143 | double _stecSat;
|
|---|
| [7237] | 144 | };
|
|---|
| 145 |
|
|---|
| 146 | }
|
|---|
| 147 |
|
|---|
| 148 | #endif
|
|---|