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

Last change on this file since 2452 was 2426, checked in by mervart, 15 years ago

* empty log message *

File size: 3.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
28#include <QtNetwork>
29
30#include <newmat.h>
31
32#include "bncconst.h"
[2123]33#include "bnctime.h"
[2035]34#include "RTCM/GPSDecoder.h"
35#include "RTCM3/ephemeris.h"
36
[2058]37class bncModel;
38
[2039]39class t_satData {
[2035]40 public:
[2051]41 enum codeType {P_CODE, C_CODE};
[2240]42 QString prn;
[2051]43 double P1;
44 double P2;
45 double P3;
46 double L1;
47 double L2;
48 double L3;
49 codeType codeTypeF1;
50 codeType codeTypeF2;
[2049]51 ColumnVector xx;
52 ColumnVector vv;
53 double clk;
[2065]54 double eleSat;
55 double azSat;
[2060]56 double rho;
[2035]57};
58
[2039]59class t_epoData {
60 public:
61 t_epoData() {}
62 ~t_epoData() {
[2231]63 QMapIterator<QString, t_satData*> itGPS(satDataGPS);
64 while (itGPS.hasNext()) {
65 itGPS.next();
66 delete itGPS.value();
[2039]67 }
[2231]68 QMapIterator<QString, t_satData*> itGlo(satDataGlo);
69 while (itGlo.hasNext()) {
70 itGlo.next();
71 delete itGlo.value();
72 }
[2039]73 }
[2231]74 unsigned sizeGPS() const {return satDataGPS.size();}
75 unsigned sizeGlo() const {return satDataGlo.size();}
76 unsigned sizeAll() const {return satDataGPS.size() + satDataGlo.size();}
[2123]77 bncTime tt;
[2231]78 QMap<QString, t_satData*> satDataGPS;
79 QMap<QString, t_satData*> satDataGlo;
[2039]80};
81
[2035]82class t_corr {
83 public:
[2208]84 t_corr() {
85 raoSet = false;
86 dClkSet = false;
87 }
88 bool ready() {return raoSet && dClkSet;}
[2123]89 bncTime tt;
[2044]90 int iod;
91 double dClk;
[2365]92 double dotDClk;
93 double dotDotDClk;
[2044]94 ColumnVector rao;
[2296]95 ColumnVector dotRao;
[2365]96 ColumnVector dotDotRao;
[2208]97 bool raoSet;
98 bool dClkSet;
[2035]99};
100
[2274]101class t_bias {
102 public:
103 t_bias() {
[2426]104 p1 = 0.0;
105 p2 = 0.0;
106 c1 = 0.0;
[2274]107 }
108 bncTime tt;
[2426]109 double p1;
110 double p2;
111 double c1;
[2274]112};
113
[2036]114class bncPPPclient : public QObject {
[2035]115 Q_OBJECT
116
117 public:
118 bncPPPclient(QByteArray staID);
119 ~bncPPPclient();
120 void putNewObs(p_obs pp);
121
122 public slots:
123 void slotNewEphGPS(gpsephemeris gpseph);
[2225]124 void slotNewEphGlonass(glonassephemeris gloeph);
[2035]125 void slotNewCorrections(QList<QString> corrList);
126
[2142]127 signals:
[2145]128 void newPosition(bncTime time, double x, double y, double z);
[2182]129 void newNMEAstr(QByteArray str);
[2142]130
[2035]131 private:
[2123]132 t_irc getSatPos(const bncTime& tt, const QString& prn,
[2357]133 ColumnVector& xc, ColumnVector& vv);
[2035]134 void processEpoch();
[2296]135 void applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc,
136 ColumnVector& vv);
[2240]137 t_irc cmpToT(t_satData* satData);
[2042]138
[2035]139 QByteArray _staID;
140 QMutex _mutex;
141 QMap<QString, t_eph*> _eph;
142 QMap<QString, t_corr*> _corr;
[2274]143 QMap<QString, t_bias*> _bias;
[2039]144 t_epoData* _epoData;
[2058]145 bncModel* _model;
[2226]146 bool _useGlonass;
[2357]147 bool _pppMode;
[2035]148};
149
150#endif
Note: See TracBrowser for help on using the repository browser.