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

Last change on this file since 10460 was 10251, checked in by stuerze, 13 months ago

changes regarding PPP: allow single frequency PPP and allow to select the frequency bands that are used

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