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

Last change on this file since 3519 was 3519, checked in by mervart, 12 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,
[3519]127 ColumnVector& vv, const t_eph* eph);
[2035]128
129 public slots:
130 void slotNewCorrections(QList<QString> corrList);
131
[2142]132 signals:
[2548]133 void newMessage(QByteArray msg, bool showOnScreen);
[2145]134 void newPosition(bncTime time, double x, double y, double z);
[2182]135 void newNMEAstr(QByteArray str);
[2142]136
[2035]137 private:
[2505]138 class slipInfo {
139 public:
140 slipInfo() {
141 slipCntL1 = -1;
142 slipCntL2 = -1;
[2778]143 slipCntL5 = -1;
[2505]144 }
145 ~slipInfo(){}
146 int slipCntL1;
147 int slipCntL2;
[2778]148 int slipCntL5;
[2505]149 };
150
[2123]151 t_irc getSatPos(const bncTime& tt, const QString& prn,
[2357]152 ColumnVector& xc, ColumnVector& vv);
[2808]153 void processEpochs();
154 void processFrontEpoch();
[2240]155 t_irc cmpToT(t_satData* satData);
[2042]156
[2505]157 QByteArray _staID;
158 QMap<QString, t_corr*> _corr;
[2809]159 bncTime _corr_tt;
[2505]160 QMap<QString, t_bias*> _bias;
[2808]161 std::queue<t_epoData*> _epoData;
[2505]162 bncModel* _model;
163 bool _useGlonass;
[2776]164 bool _useGalileo;
[2505]165 bool _pppMode;
166 QMap<QString, slipInfo> _slips;
[2967]167 QString _pppCorrMount;
[2035]168};
169
170#endif
Note: See TracBrowser for help on using the repository browser.