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

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