source: ntrip/trunk/BNC/src/PPP/pppSatObs.h@ 9560

Last change on this file since 9560 was 9560, checked in by stuerze, 2 years ago

update regarding PPP

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