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

Last change on this file since 3382 was 3382, checked in by mervart, 13 years ago
File size: 4.7 KB
RevLine 
[2035]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
[2808]28#include <queue>
[2905]29#include "bncephuser.h"
[2035]30#include "RTCM/GPSDecoder.h"
31
[2058]32class bncModel;
33
[2039]34class t_satData {
[2035]35 public:
[2791]36 t_satData() {
37 indexCode = 0;
38 indexPhase = 0;
39 }
40 ~t_satData() {}
[2808]41 bncTime tt;
[2240]42 QString prn;
[2051]43 double P1;
44 double P2;
[2778]45 double P5;
[2051]46 double P3;
47 double L1;
48 double L2;
[2778]49 double L5;
[2051]50 double L3;
[2049]51 ColumnVector xx;
52 ColumnVector vv;
53 double clk;
[2065]54 double eleSat;
55 double azSat;
[2060]56 double rho;
[2505]57 bool slipFlag;
[2583]58 double lambda3;
[2791]59 unsigned indexCode;
60 unsigned indexPhase;
[2788]61 char system() const {return prn.toAscii()[0];}
[2035]62};
63
[2039]64class t_epoData {
65 public:
66 t_epoData() {}
[3375]67
[3382]68 ~t_epoData() {
69 clear();
70 }
71
72 void clear() {
73 QMapIterator<QString, t_satData*> itGPS(satDataGPS);
[3375]74 while (itGPS.hasNext()) {
75 itGPS.next();
[3382]76 delete itGPS.value();
[3375]77 }
[3382]78 satDataGPS.clear();
79 QMapIterator<QString, t_satData*> itGlo(satDataGlo);
[3375]80 while (itGlo.hasNext()) {
81 itGlo.next();
[3382]82 delete itGlo.value();
[3375]83 }
[3382]84 satDataGlo.clear();
85 QMapIterator<QString, t_satData*> itGal(satDataGal);
[3375]86 while (itGal.hasNext()) {
87 itGal.next();
[3382]88 delete itGal.value();
[3375]89 }
[3382]90 satDataGal.clear();
[3375]91 }
92
[3382]93 void deepCopy(const t_epoData* from) {
94 clear();
95 tt = from->tt;
96 QMapIterator<QString, t_satData*> itGPS(from->satDataGPS);
[2231]97 while (itGPS.hasNext()) {
98 itGPS.next();
[3382]99 satDataGPS[itGPS.key()] = new t_satData(*itGPS.value());
[2039]100 }
[3382]101 QMapIterator<QString, t_satData*> itGlo(from->satDataGlo);
[2231]102 while (itGlo.hasNext()) {
103 itGlo.next();
[3382]104 satDataGlo[itGlo.key()] = new t_satData(*itGlo.value());
[2231]105 }
[3382]106 QMapIterator<QString, t_satData*> itGal(from->satDataGal);
[2778]107 while (itGal.hasNext()) {
108 itGal.next();
[3382]109 satDataGal[itGal.key()] = new t_satData(*itGal.value());
[2778]110 }
[2039]111 }
[3382]112
[2231]113 unsigned sizeGPS() const {return satDataGPS.size();}
114 unsigned sizeGlo() const {return satDataGlo.size();}
[2778]115 unsigned sizeGal() const {return satDataGal.size();}
116 unsigned sizeAll() const {return satDataGPS.size() + satDataGlo.size() +
117 satDataGal.size();}
[3375]118 bncTime tt;
[2231]119 QMap<QString, t_satData*> satDataGPS;
120 QMap<QString, t_satData*> satDataGlo;
[2778]121 QMap<QString, t_satData*> satDataGal;
[2039]122};
123
[2274]124class t_bias {
125 public:
126 t_bias() {
[2426]127 p1 = 0.0;
128 p2 = 0.0;
129 c1 = 0.0;
[2274]130 }
131 bncTime tt;
[2426]132 double p1;
133 double p2;
134 double c1;
[2274]135};
136
[2905]137class bncPPPclient : public bncEphUser {
[2035]138 Q_OBJECT
139
140 public:
141 bncPPPclient(QByteArray staID);
142 ~bncPPPclient();
[2711]143 void putNewObs(const t_obs& pp);
[3319]144 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc,
145 ColumnVector& vv);
[2035]146
147 public slots:
148 void slotNewCorrections(QList<QString> corrList);
149
[2142]150 signals:
[2548]151 void newMessage(QByteArray msg, bool showOnScreen);
[2145]152 void newPosition(bncTime time, double x, double y, double z);
[2182]153 void newNMEAstr(QByteArray str);
[2142]154
[2035]155 private:
[2505]156 class slipInfo {
157 public:
158 slipInfo() {
159 slipCntL1 = -1;
160 slipCntL2 = -1;
[2778]161 slipCntL5 = -1;
[2505]162 }
163 ~slipInfo(){}
164 int slipCntL1;
165 int slipCntL2;
[2778]166 int slipCntL5;
[2505]167 };
168
[2123]169 t_irc getSatPos(const bncTime& tt, const QString& prn,
[2357]170 ColumnVector& xc, ColumnVector& vv);
[2808]171 void processEpochs();
172 void processFrontEpoch();
[2240]173 t_irc cmpToT(t_satData* satData);
[2042]174
[2505]175 QByteArray _staID;
176 QMap<QString, t_corr*> _corr;
[2809]177 bncTime _corr_tt;
[2505]178 QMap<QString, t_bias*> _bias;
[2808]179 std::queue<t_epoData*> _epoData;
[2505]180 bncModel* _model;
181 bool _useGlonass;
[2776]182 bool _useGalileo;
[2505]183 bool _pppMode;
184 QMap<QString, slipInfo> _slips;
[2967]185 QString _pppCorrMount;
[2035]186};
187
188#endif
Note: See TracBrowser for help on using the repository browser.