source: ntrip/trunk/BNC/src/PPP_free/bncpppclient.h@ 6067

Last change on this file since 6067 was 6067, checked in by mervart, 8 years ago
File size: 3.7 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25#ifndef BNCPPPCLIENT_H
26#define BNCPPPCLIENT_H
27
28#include <queue>
29#include "bncephuser.h"
30#include "GPSDecoder.h"
31
32
33namespace BNC_PPP {
34
35class bncModel;
36class t_pppOptions;
37class t_satData;
38class t_epoData;
39
40class bncPPPclient : public bncEphUser {
41 public:
42 bncPPPclient(QByteArray staID, const t_pppOptions* opt);
43 ~bncPPPclient();
44 void putNewObs(const t_obs& pp);
45 void putNewCorrections(QList<QString> corrList);
46 QByteArray staID() const {return _staID;}
47 const t_pppOptions* opt() const {return _opt;}
48
49 private:
50 class slipInfo {
51 public:
52 slipInfo() {
53 slipCntL1 = -1;
54 slipCntL2 = -1;
55 slipCntL5 = -1;
56 }
57 ~slipInfo(){}
58 int slipCntL1;
59 int slipCntL2;
60 int slipCntL5;
61 };
62
63 t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv);
64 void processEpochs();
65 void processFrontEpoch();
66 t_irc cmpToT(t_satData* satData);
67 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc, ColumnVector& vv);
68
69 const t_pppOptions* _opt;
70 QByteArray _staID;
71 QMap<QString, t_corr*> _corr;
72 bncTime _corr_tt;
73 QMap<QString, t_bias*> _bias;
74 std::queue<t_epoData*> _epoData;
75 bncModel* _model;
76 QMap<QString, slipInfo> _slips;
77};
78
79class t_satData {
80 public:
81 t_satData() {
82 obsIndex = 0;
83 P1 = 0.0;
84 P2 = 0.0;
85 P5 = 0.0;
86 P3 = 0.0;
87 L1 = 0.0;
88 L2 = 0.0;
89 L5 = 0.0;
90 L3 = 0.0;
91 }
92 ~t_satData() {}
93 bncTime tt;
94 QString prn;
95 double P1;
96 double P2;
97 double P5;
98 double P3;
99 double L1;
100 double L2;
101 double L5;
102 double L3;
103 ColumnVector xx;
104 ColumnVector vv;
105 double clk;
106 double eleSat;
107 double azSat;
108 double rho;
109 bool slipFlag;
110 double lambda3;
111 unsigned obsIndex;
112 char system() const {return prn.toAscii()[0];}
113};
114
115class t_epoData {
116 public:
117 t_epoData() {}
118
119 ~t_epoData() {
120 clear();
121 }
122
123 void clear() {
124 QMapIterator<QString, t_satData*> it(satData);
125 while (it.hasNext()) {
126 it.next();
127 delete it.value();
128 }
129 satData.clear();
130 }
131
132 void deepCopy(const t_epoData* from) {
133 clear();
134 tt = from->tt;
135 QMapIterator<QString, t_satData*> it(from->satData);
136 while (it.hasNext()) {
137 it.next();
138 satData[it.key()] = new t_satData(*it.value());
139 }
140 }
141
142 unsigned sizeSys(char system) const {
143 unsigned ans = 0;
144 QMapIterator<QString, t_satData*> it(satData);
145 while (it.hasNext()) {
146 it.next();
147 if (it.value()->system() == system) {
148 ++ans;
149 }
150 }
151 return ans;
152 }
153 unsigned sizeAll() const {return satData.size();}
154
155 bncTime tt;
156 QMap<QString, t_satData*> satData;
157};
158
159}
160
161#endif
Note: See TracBrowser for help on using the repository browser.