source: ntrip/trunk/BNC/src/PPP/pppObsPool.h@ 9669

Last change on this file since 9669 was 9508, checked in by stuerze, 3 years ago

some changes regarding PPP

  • Property svn:keywords set to Author Date Id Rev URL;svn:eol-style=native
  • Property svn:mime-type set to text/plain
File size: 3.0 KB
Line 
1#ifndef OBSPOOL_H
2#define OBSPOOL_H
3
4#include <vector>
5#include <deque>
6#include <QMap>
7#include <iostream>
8#include "pppSatObs.h"
9#include "bnctime.h"
10#include "pppRefSat.h"
11
12namespace BNC_PPP {
13
14class t_pppObsPool {
15 public:
16
17 class t_epoch {
18 public:
19 t_epoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
20 bool pseudoObsIono, const QMap<char, t_pppRefSat*>& refSatMap);
21 ~t_epoch();
22 std::vector<t_pppSatObs*>& obsVector() {return _obsVector;}
23 const std::vector<t_pppSatObs*>& obsVector() const {return _obsVector;}
24 const QMap<char, t_pppRefSat*>& refSatMap() const {return _refSatMap;}
25 const bncTime& epoTime() const {return _epoTime;}
26 bool pseudoObsIono() const {return _pseudoObsIono;}
27 private:
28 bncTime _epoTime;
29 bool _pseudoObsIono;
30 std::vector<t_pppSatObs*> _obsVector;
31 QMap<char, t_pppRefSat*> _refSatMap;
32 };
33
34 t_pppObsPool();
35 ~t_pppObsPool();
36 void putCodeBias(t_satCodeBias* satCodeBias);
37 void putPhaseBias(t_satPhaseBias* satPhaseBias);
38 void putTec(t_vTec* _vTec);
39
40 void putEpoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
41 bool pseudoObsIono, const QMap<char, t_pppRefSat*>& refSatMap);
42
43 void deleteLastEpoch();
44
45 const t_satCodeBias* satCodeBias(const t_prn& prn) const {
46 return _satCodeBiases[prn.toInt()];
47 }
48 const t_satPhaseBias* satPhaseBias(const t_prn& prn) const {
49 return _satPhaseBiases[prn.toInt()];
50 }
51 const t_vTec* vTec() const {return _vTec;}
52
53 t_epoch* lastEpoch() {
54 if (_epochs.size()) {
55 return _epochs.back();
56 }
57 else {
58 return 0;
59 }
60 }
61
62 // RefSat change required in current epoch
63 // =======================================
64 void setRefSatChangeRequired(char sys, bool refSatChangeRequired) {
65 _refSatChangeRequiredMap[sys] = refSatChangeRequired;
66 }
67 bool refSatChangeRequired() {
68 QMapIterator<char, bool> it(_refSatChangeRequiredMap);
69 while (it.hasNext()) {
70 it.next();
71 if (it.value() == true) {
72 return true;
73 }
74 }
75 return false;
76 }
77 bool refSatChangeRequired(char sys) {
78 return _refSatChangeRequiredMap[sys];
79 }
80
81 // RefSat changed in current epoch (different from last epoch)
82 // ===========================================================
83 void setRefSatChanged(char sys, bool refSatChanged) {
84 _refSatChangedMap[sys] = refSatChanged;
85 }
86 bool refSatChanged() {
87 QMapIterator<char, bool> it(_refSatChangedMap);
88 while (it.hasNext()) {
89 it.next();
90 if (it.value() == true) {
91 return true;
92 }
93 }
94 return false;
95 }
96 bool refSatChanged(char sys) {
97 return _refSatChangedMap[sys];
98 }
99
100 private:
101 t_satCodeBias* _satCodeBiases[t_prn::MAXPRN+1];
102 t_satPhaseBias* _satPhaseBiases[t_prn::MAXPRN+1];
103 t_vTec* _vTec;
104 std::deque<t_epoch*> _epochs;
105 QMap<char, bool> _refSatChangeRequiredMap;
106 QMap<char, bool> _refSatChangedMap;
107};
108
109}
110
111#endif
Note: See TracBrowser for help on using the repository browser.