source: ntrip/branches/BNC_LM/bncpppclient.h@ 3843

Last change on this file since 3843 was 3571, checked in by mervart, 13 years ago
File size: 3.9 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() {
[3408]37 obsIndex = 0;
[2791]38 }
39 ~t_satData() {}
[2808]40 bncTime tt;
[2240]41 QString prn;
[2051]42 double P1;
43 double P2;
[2778]44 double P5;
[2051]45 double P3;
46 double L1;
47 double L2;
[2778]48 double L5;
[2051]49 double L3;
[2049]50 ColumnVector xx;
51 ColumnVector vv;
52 double clk;
[2065]53 double eleSat;
54 double azSat;
[2060]55 double rho;
[2505]56 bool slipFlag;
[2583]57 double lambda3;
[3408]58 unsigned obsIndex;
[2788]59 char system() const {return prn.toAscii()[0];}
[2035]60};
61
[2039]62class t_epoData {
63 public:
64 t_epoData() {}
[3408]65
[3382]66 ~t_epoData() {
[3408]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();
[3375]75 }
[3408]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());
[2039]86 }
[3408]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 }
[2231]97 }
[3408]98 return ans;
[2039]99 }
[3408]100 unsigned sizeAll() const {return satData.size();}
101
102 bncTime tt;
103 QMap<QString, t_satData*> satData;
[2039]104};
105
[2274]106class t_bias {
107 public:
108 t_bias() {
[2426]109 p1 = 0.0;
110 p2 = 0.0;
111 c1 = 0.0;
[2274]112 }
113 bncTime tt;
[2426]114 double p1;
115 double p2;
116 double c1;
[2274]117};
118
[2905]119class bncPPPclient : public bncEphUser {
[2035]120 Q_OBJECT
121
122 public:
123 bncPPPclient(QByteArray staID);
124 ~bncPPPclient();
[2711]125 void putNewObs(const t_obs& pp);
[3319]126 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc,
127 ColumnVector& vv);
[3571]128 QByteArray staID() const {return _staID;}
[2035]129
130 public slots:
131 void slotNewCorrections(QList<QString> corrList);
132
[2142]133 signals:
[2548]134 void newMessage(QByteArray msg, bool showOnScreen);
[2145]135 void newPosition(bncTime time, double x, double y, double z);
[2182]136 void newNMEAstr(QByteArray str);
[2142]137
[2035]138 private:
[2505]139 class slipInfo {
140 public:
141 slipInfo() {
142 slipCntL1 = -1;
143 slipCntL2 = -1;
[2778]144 slipCntL5 = -1;
[2505]145 }
146 ~slipInfo(){}
147 int slipCntL1;
148 int slipCntL2;
[2778]149 int slipCntL5;
[2505]150 };
151
[2123]152 t_irc getSatPos(const bncTime& tt, const QString& prn,
[2357]153 ColumnVector& xc, ColumnVector& vv);
[2808]154 void processEpochs();
155 void processFrontEpoch();
[2240]156 t_irc cmpToT(t_satData* satData);
[2042]157
[2505]158 QByteArray _staID;
159 QMap<QString, t_corr*> _corr;
[2809]160 bncTime _corr_tt;
[2505]161 QMap<QString, t_bias*> _bias;
[2808]162 std::queue<t_epoData*> _epoData;
[2505]163 bncModel* _model;
164 bool _useGlonass;
[2776]165 bool _useGalileo;
[2505]166 bool _pppMode;
167 QMap<QString, slipInfo> _slips;
[2967]168 QString _pppCorrMount;
[2035]169};
170
171#endif
Note: See TracBrowser for help on using the repository browser.