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

Last change on this file since 9089 was 8961, checked in by stuerze, 4 years ago

PPP update: pseudo obs tropo added

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