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

Last change on this file since 6080 was 6080, checked in by mervart, 8 years ago
File size: 3.8 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 <vector>
29#include "bncephuser.h"
30#include "GPSDecoder.h"
31
32
33namespace BNC_PPP {
34
35class bncModel;
36class t_pppOptions;
37class t_satObs;
38class t_satData;
39class t_epoData;
40class t_output;
41
42class bncPPPclient : public bncEphUser {
43 public:
44 bncPPPclient(QByteArray staID, const t_pppOptions* opt);
45 ~bncPPPclient();
46 void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output);
47 void putNewCorrections(QList<QString> corrList);
48 QByteArray staID() const {return _staID;}
49 const t_pppOptions* opt() const {return _opt;}
50
51 private:
52 class slipInfo {
53 public:
54 slipInfo() {
55 slipCntL1 = -1;
56 slipCntL2 = -1;
57 slipCntL5 = -1;
58 }
59 ~slipInfo(){}
60 int slipCntL1;
61 int slipCntL2;
62 int slipCntL5;
63 };
64
65 t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv);
66 void putNewObs(t_satData* satData);
67 t_irc cmpToT(t_satData* satData);
68 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc, ColumnVector& vv);
69
70 const t_pppOptions* _opt;
71 QByteArray _staID;
72 QMap<QString, t_corr*> _corr;
73 bncTime _corr_tt;
74 QMap<QString, t_bias*> _bias;
75 t_epoData* _epoData;
76 bncModel* _model;
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 tt.reset();
131 }
132
133 void deepCopy(const t_epoData* from) {
134 clear();
135 tt = from->tt;
136 QMapIterator<QString, t_satData*> it(from->satData);
137 while (it.hasNext()) {
138 it.next();
139 satData[it.key()] = new t_satData(*it.value());
140 }
141 }
142
143 unsigned sizeSys(char system) const {
144 unsigned ans = 0;
145 QMapIterator<QString, t_satData*> it(satData);
146 while (it.hasNext()) {
147 it.next();
148 if (it.value()->system() == system) {
149 ++ans;
150 }
151 }
152 return ans;
153 }
154 unsigned sizeAll() const {return satData.size();}
155
156 bncTime tt;
157 QMap<QString, t_satData*> satData;
158};
159
160}
161
162#endif
Note: See TracBrowser for help on using the repository browser.