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

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