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

Last change on this file since 6715 was 6135, checked in by mervart, 10 years ago
File size: 3.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 const t_prn& prn() const {return _prn;}
22 const ColumnVector& xc() const {return _xcSat;}
23 const bncTime& time() const {return _time;}
24 t_irc cmpModel(const t_pppStation* station);
25 double obsValue(t_lc::type tLC, bool* valid = 0) const;
26 double cmpValue(t_lc::type tLC) const;
27 double cmpValueForBanc(t_lc::type tLC) const;
28 double rho() const {return _model._rho;}
29 double sagnac() const {return _model._sagnac;}
30 double eleSat() const {return _model._eleSat;}
31 bool modelSet() const {return _model._set;}
32 void printModel() const;
33 void lcCoeff(t_lc::type tLC,
34 std::map<t_frequency::type, double>& codeCoeff,
35 std::map<t_frequency::type, double>& phaseCoeff) const;
36 double lambda(t_lc::type tLC) const;
37 double sigma(t_lc::type tLC) const;
38 double maxRes(t_lc::type tLC) const;
39 bool outlier() const {return _outlier;}
40 void setOutlier() {_outlier = true;}
41 void setRes(t_lc::type tLC, double res);
42 double getRes(t_lc::type tLC) const;
43
44 bool slip() const {
45 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
46 if (_obs[ii] && _obs[ii]->_slip) {
47 return true;
48 }
49 }
50 return false;
51 }
52
53 int slipCounter() const {
54 int cnt = -1;
55 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
56 if (_obs[ii] && _obs[ii]->_slipCounter > cnt) {
57 cnt = _obs[ii]->_slipCounter;
58 }
59 }
60 return cnt;
61 }
62
63 int biasJumpCounter() const {
64 int jmp = -1;
65 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
66 if (_obs[ii] && _obs[ii]->_biasJumpCounter > jmp) {
67 jmp = _obs[ii]->_biasJumpCounter;
68 }
69 }
70 return jmp;
71 }
72
73 private:
74 class t_model {
75 public:
76 t_model() {reset();}
77 ~t_model() {}
78 void reset() {
79 _set = false;
80 _rho = 0.0;
81 _eleSat = 0.0;
82 _azSat = 0.0;
83 _recClkM = 0.0;
84 _satClkM = 0.0;
85 _sagnac = 0.0;
86 _antEcc = 0.0;
87 _tropo = 0.0;
88 _tide = 0.0;
89 _windUp = 0.0;
90 for (unsigned ii = 0; ii < t_frequency::max; ii++) {
91 _antPCO[ii] = 0.0;
92 _codeBias[ii] = 0.0;
93 _phaseBias[ii] = 0.0;
94 }
95 }
96 bool _set;
97 double _rho;
98 double _eleSat;
99 double _azSat;
100 double _recClkM;
101 double _satClkM;
102 double _sagnac;
103 double _antEcc;
104 double _tropo;
105 double _tide;
106 double _windUp;
107 double _antPCO[t_frequency::max];
108 double _codeBias[t_frequency::max];
109 double _phaseBias[t_frequency::max];
110 };
111
112 void prepareObs(const t_satObs& satObs);
113
114 bool _valid;
115 t_frequency::type _fType1;
116 t_frequency::type _fType2;
117 t_prn _prn;
118 bncTime _time;
119 int _channel;
120 t_frqObs* _obs[t_frequency::max];
121 ColumnVector _xcSat;
122 ColumnVector _vvSat;
123 t_model _model;
124 bool _outlier;
125 std::map<t_lc::type, double> _res;
126};
127
128}
129
130#endif
Note: See TracBrowser for help on using the repository browser.