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

Last change on this file since 9419 was 9419, checked in by stuerze, 3 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.7 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
53 // RINEX
54 bool slip() const {
55 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
56 if (_obs[ii] && _obs[ii]->_slip) {
57 return true;
58 }
59 }
60 return false;
61 }
62
63 // RTCM
64 int slipCounter() const {
65 int cnt = -1;
66 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
67 if (_obs[ii] && _obs[ii]->_slipCounter > cnt) {
68 cnt = _obs[ii]->_slipCounter;
69 }
70 }
71 return cnt;
72 }
73
74 int biasJumpCounter() const {
75 int jmp = -1;
76 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
77 if (_obs[ii] && _obs[ii]->_biasJumpCounter > jmp) {
78 jmp = _obs[ii]->_biasJumpCounter;
79 }
80 }
81 return jmp;
82 }
83
84 private:
85 class t_model {
86 public:
87 t_model() {reset();}
88 ~t_model() {}
89 void reset() {
90 _set = false;
91 _rho = 0.0;
92 _eleSat = 0.0;
93 _azSat = 0.0;
94 _recClkM = 0.0;
95 _satClkM = 0.0;
96 _sagnac = 0.0;
97 _antEcc = 0.0;
98 _tropo = 0.0;
99 _tropo0 = 0.0;
100 _tideEarth = 0.0;
101 _tideOcean = 0.0;
102 _windUp = 0.0;
103 _rel = 0.0;
104 for (unsigned ii = 0; ii < t_frequency::max; ii++) {
105 _antPCO[ii] = 0.0;
106 _codeBias[ii] = 0.0;
107 _phaseBias[ii] = 0.0;
108 _ionoCodeDelay[ii] = 0.0;
109 }
110 }
111 bool _set;
112 double _rho;
113 double _eleSat;
114 double _azSat;
115 double _recClkM;
116 double _satClkM;
117 double _sagnac;
118 double _antEcc;
119 double _tropo;
120 double _tropo0;
121 double _tideEarth;
122 double _tideOcean;
123 double _windUp;
124 double _rel;
125 double _antPCO[t_frequency::max];
126 double _codeBias[t_frequency::max];
127 double _phaseBias[t_frequency::max];
128 double _ionoCodeDelay[t_frequency::max];
129 };
130
131 void prepareObs(const t_satObs& satObs);
132
133 bool _valid;
134 bool _reference;
135 t_frequency::type _fType1;
136 t_frequency::type _fType2;
137 t_prn _prn;
138 bncTime _time;
139 int _channel;
140 t_frqObs* _obs[t_frequency::max];
141 ColumnVector _xcSat;
142 ColumnVector _vvSat;
143 t_model _model;
144 bool _outlier;
145 std::map<t_lc::type, double> _res;
146 double _signalPropagationTime;
147 double _stecRefSat;
148 double _stecSat;
149 double _tropo0;
150};
151
152}
153
154#endif
Note: See TracBrowser for help on using the repository browser.