source: ntrip/trunk/BNC/bncpppclient.h@ 3428

Last change on this file since 3428 was 3408, checked in by mervart, 13 years ago
File size: 3.9 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 "RTCM/GPSDecoder.h"
31
32class bncModel;
33
34class t_satData {
35 public:
36 t_satData() {
37 obsIndex = 0;
38 }
39 ~t_satData() {}
40 bncTime tt;
41 QString prn;
42 double P1;
43 double P2;
44 double P5;
45 double P3;
46 double L1;
47 double L2;
48 double L5;
49 double L3;
50 ColumnVector xx;
51 ColumnVector vv;
52 double clk;
53 double eleSat;
54 double azSat;
55 double rho;
56 bool slipFlag;
57 double lambda3;
58 unsigned obsIndex;
59 char system() const {return prn.toAscii()[0];}
60};
61
62class t_epoData {
63 public:
64 t_epoData() {}
65
66 ~t_epoData() {
67 clear();
68 }
69
70 void clear() {
71 QMapIterator<QString, t_satData*> it(satData);
72 while (it.hasNext()) {
73 it.next();
74 delete it.value();
75 }
76 satData.clear();
77 }
78
79 void deepCopy(const t_epoData* from) {
80 clear();
81 tt = from->tt;
82 QMapIterator<QString, t_satData*> it(from->satData);
83 while (it.hasNext()) {
84 it.next();
85 satData[it.key()] = new t_satData(*it.value());
86 }
87 }
88
89 unsigned sizeSys(char system) const {
90 unsigned ans = 0;
91 QMapIterator<QString, t_satData*> it(satData);
92 while (it.hasNext()) {
93 it.next();
94 if (it.value()->system() == system) {
95 ++ans;
96 }
97 }
98 return ans;
99 }
100 unsigned sizeAll() const {return satData.size();}
101
102 bncTime tt;
103 QMap<QString, t_satData*> satData;
104};
105
106class t_bias {
107 public:
108 t_bias() {
109 p1 = 0.0;
110 p2 = 0.0;
111 c1 = 0.0;
112 }
113 bncTime tt;
114 double p1;
115 double p2;
116 double c1;
117};
118
119class bncPPPclient : public bncEphUser {
120 Q_OBJECT
121
122 public:
123 bncPPPclient(QByteArray staID);
124 ~bncPPPclient();
125 void putNewObs(const t_obs& pp);
126 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc,
127 ColumnVector& vv);
128
129 public slots:
130 void slotNewCorrections(QList<QString> corrList);
131
132 signals:
133 void newMessage(QByteArray msg, bool showOnScreen);
134 void newPosition(bncTime time, double x, double y, double z);
135 void newNMEAstr(QByteArray str);
136
137 private:
138 class slipInfo {
139 public:
140 slipInfo() {
141 slipCntL1 = -1;
142 slipCntL2 = -1;
143 slipCntL5 = -1;
144 }
145 ~slipInfo(){}
146 int slipCntL1;
147 int slipCntL2;
148 int slipCntL5;
149 };
150
151 t_irc getSatPos(const bncTime& tt, const QString& prn,
152 ColumnVector& xc, ColumnVector& vv);
153 void processEpochs();
154 void processFrontEpoch();
155 t_irc cmpToT(t_satData* satData);
156
157 QByteArray _staID;
158 QMap<QString, t_corr*> _corr;
159 bncTime _corr_tt;
160 QMap<QString, t_bias*> _bias;
161 std::queue<t_epoData*> _epoData;
162 bncModel* _model;
163 bool _useGlonass;
164 bool _useGalileo;
165 bool _pppMode;
166 QMap<QString, slipInfo> _slips;
167 QString _pppCorrMount;
168};
169
170#endif
Note: See TracBrowser for help on using the repository browser.