[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] | 37 | class bncModel;
|
---|
| 38 |
|
---|
[2039] | 39 | class t_satData {
|
---|
[2035] | 40 | public:
|
---|
[2051] | 41 | enum codeType {P_CODE, C_CODE};
|
---|
| 42 | double P1;
|
---|
| 43 | double P2;
|
---|
| 44 | double P3;
|
---|
| 45 | double L1;
|
---|
| 46 | double L2;
|
---|
| 47 | double L3;
|
---|
| 48 | codeType codeTypeF1;
|
---|
| 49 | codeType codeTypeF2;
|
---|
[2049] | 50 | ColumnVector xx;
|
---|
| 51 | ColumnVector vv;
|
---|
| 52 | double clk;
|
---|
| 53 | bool clkCorr;
|
---|
[2065] | 54 | double eleSat;
|
---|
| 55 | double azSat;
|
---|
[2060] | 56 | double rho;
|
---|
[2035] | 57 | };
|
---|
| 58 |
|
---|
[2039] | 59 | class t_epoData {
|
---|
| 60 | public:
|
---|
| 61 | t_epoData() {}
|
---|
| 62 | ~t_epoData() {
|
---|
| 63 | QMapIterator<QString, t_satData*> it(satData);
|
---|
| 64 | while (it.hasNext()) {
|
---|
| 65 | it.next();
|
---|
| 66 | delete it.value();
|
---|
| 67 | }
|
---|
| 68 | }
|
---|
[2053] | 69 | unsigned size() const {return satData.size();}
|
---|
[2123] | 70 | bncTime tt;
|
---|
[2039] | 71 | QMap<QString, t_satData*> satData;
|
---|
| 72 | };
|
---|
| 73 |
|
---|
[2035] | 74 | class t_corr {
|
---|
| 75 | public:
|
---|
[2123] | 76 | bncTime tt;
|
---|
[2044] | 77 | int iod;
|
---|
| 78 | double dClk;
|
---|
| 79 | ColumnVector rao;
|
---|
[2035] | 80 | };
|
---|
| 81 |
|
---|
[2036] | 82 | class bncPPPclient : public QObject {
|
---|
[2035] | 83 | Q_OBJECT
|
---|
| 84 |
|
---|
| 85 | public:
|
---|
| 86 | bncPPPclient(QByteArray staID);
|
---|
| 87 | ~bncPPPclient();
|
---|
| 88 | void putNewObs(p_obs pp);
|
---|
| 89 |
|
---|
| 90 | public slots:
|
---|
| 91 | void slotNewEphGPS(gpsephemeris gpseph);
|
---|
| 92 | void slotNewCorrections(QList<QString> corrList);
|
---|
| 93 |
|
---|
[2142] | 94 | signals:
|
---|
[2145] | 95 | void newPosition(bncTime time, double x, double y, double z);
|
---|
[2142] | 96 |
|
---|
[2035] | 97 | private:
|
---|
[2123] | 98 | t_irc getSatPos(const bncTime& tt, const QString& prn,
|
---|
[2042] | 99 | ColumnVector& xc, ColumnVector& vv, bool& corr);
|
---|
[2035] | 100 | void processEpoch();
|
---|
[2042] | 101 | void applyCorr(const t_corr* cc, ColumnVector& xc, ColumnVector& vv);
|
---|
[2049] | 102 | t_irc cmpToT(const QString& prn, t_satData* satData);
|
---|
[2042] | 103 |
|
---|
[2035] | 104 | QByteArray _staID;
|
---|
| 105 | QMutex _mutex;
|
---|
| 106 | QMap<QString, t_eph*> _eph;
|
---|
| 107 | QMap<QString, t_corr*> _corr;
|
---|
[2039] | 108 | t_epoData* _epoData;
|
---|
[2058] | 109 | bncModel* _model;
|
---|
[2035] | 110 | };
|
---|
| 111 |
|
---|
| 112 | #endif
|
---|