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

Last change on this file since 6021 was 6021, checked in by mervart, 10 years ago
File size: 3.5 KB
Line 
1#ifndef SATOBS_H
2#define SATOBS_H
3
4#include <string>
5#include <map>
6#include <newmat.h>
7#include "pppInclude.h"
8#include "bnctime.h"
9
10namespace BNC_PPP {
11
12class t_pppStation;
13
14class t_pppSatObs {
15 public:
16 t_pppSatObs(const t_satObs& satObs);
17 ~t_pppSatObs();
18 bool isValid() const;
19 bool isValid(t_lc::type tLC) const;
20 const t_prn& prn() const {return _prn;}
21 const ColumnVector& xc() const {return _xcSat;}
22 const bncTime& time() const {return _time;}
23 t_irc cmpModel(const t_pppStation* station);
24 double obsValue(t_lc::type tLC) const;
25 double cmpValue(t_lc::type tLC) const;
26 double cmpValueForBanc(t_lc::type tLC) const;
27 double rho() const {return _model._rho;}
28 double sagnac() const {return _model._sagnac;}
29 double eleSat() const {return _model._eleSat;}
30 bool modelSet() const {return _model._set;}
31 void printModel() const;
32 void lcCoeff(t_lc::type tLC,
33 std::map<t_frequency::type, double>& codeCoeff,
34 std::map<t_frequency::type, double>& phaseCoeff) const;
35 double lc(t_lc::type tLC);
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 int channel() const {return _channel;}
42 void setRes(t_lc::type tLC, double res);
43 double getRes(t_lc::type tLC) const;
44
45 bool slip() const {
46 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
47 if (_obs[ii] && _obs[ii]->_slip) {
48 return true;
49 }
50 }
51 return false;
52 }
53
54 int slipCounter() const {
55 int cnt = -1;
56 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
57 if (_obs[ii] && _obs[ii]->_slipCounter > cnt) {
58 cnt = _obs[ii]->_slipCounter;
59 }
60 }
61 return cnt;
62 }
63
64 int biasJumpCounter() const {
65 int jmp = -1;
66 for (unsigned ii = 1; ii < t_frequency::max; ii++) {
67 if (_obs[ii] && _obs[ii]->_biasJumpCounter > jmp) {
68 jmp = _obs[ii]->_biasJumpCounter;
69 }
70 }
71 return jmp;
72 }
73
74 private:
75 class t_model {
76 public:
77 t_model() {reset();}
78 ~t_model() {}
79 void reset() {
80 _set = false;
81 _rho = 0.0;
82 _eleSat = 0.0;
83 _azSat = 0.0;
84 _recClkM = 0.0;
85 _satClkM = 0.0;
86 _sagnac = 0.0;
87 _antEcc = 0.0;
88 _tropo = 0.0;
89 _tide = 0.0;
90 _windUp = 0.0;
91 _antPco1 = 0.0;
92 _antPco2 = 0.0;
93 _biasC1 = 0.0;
94 _biasC2 = 0.0;
95 _biasL1 = 0.0;
96 _biasL2 = 0.0;
97 }
98 bool _set;
99 double _rho;
100 double _eleSat;
101 double _azSat;
102 double _recClkM;
103 double _satClkM;
104 double _sagnac;
105 double _antEcc;
106 double _tropo;
107 double _tide;
108 double _windUp;
109 double _antPco1;
110 double _antPco2;
111 double _biasC1;
112 double _biasC2;
113 double _biasL1;
114 double _biasL2;
115 };
116
117 void prepareObs(const t_satObs& satObs);
118
119 t_prn _prn;
120 bncTime _time;
121 int _channel;
122 t_frqObs* _obs[t_frequency::max];
123 ColumnVector _xcSat;
124 ColumnVector _vvSat;
125 t_model _model;
126 bool _outlier;
127 std::map<t_lc::type, double> _res;
128};
129
130}
131
132#endif
Note: See TracBrowser for help on using the repository browser.