| 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 BNCPPPTHREAD_H
|
|---|
| 26 | #define BNCPPPTHREAD_H
|
|---|
| 27 |
|
|---|
| 28 | #include <QThread>
|
|---|
| 29 | #include <QtNetwork>
|
|---|
| 30 |
|
|---|
| 31 | #include <newmat.h>
|
|---|
| 32 |
|
|---|
| 33 | #include "bncconst.h"
|
|---|
| 34 | #include "t_time.h"
|
|---|
| 35 | #include "RTCM/GPSDecoder.h"
|
|---|
| 36 | #include "RTCM3/ephemeris.h"
|
|---|
| 37 |
|
|---|
| 38 | #define MAXPRN =
|
|---|
| 39 |
|
|---|
| 40 | class t_data {
|
|---|
| 41 | public:
|
|---|
| 42 | static const int MAXOBS = 56;
|
|---|
| 43 | t_data() {numSat = 0;}
|
|---|
| 44 | ~t_data() {}
|
|---|
| 45 | t_time tt;
|
|---|
| 46 | int numSat;
|
|---|
| 47 | QString prn[MAXOBS+1];
|
|---|
| 48 | double C1[MAXOBS+1];
|
|---|
| 49 | double C2[MAXOBS+1];
|
|---|
| 50 | double P1[MAXOBS+1];
|
|---|
| 51 | double P2[MAXOBS+1];
|
|---|
| 52 | double L1[MAXOBS+1];
|
|---|
| 53 | double L2[MAXOBS+1];
|
|---|
| 54 | };
|
|---|
| 55 |
|
|---|
| 56 | class t_corr {
|
|---|
| 57 | public:
|
|---|
| 58 | t_time tt;
|
|---|
| 59 | int iod;
|
|---|
| 60 | double dClk;
|
|---|
| 61 | double rao[3];
|
|---|
| 62 | };
|
|---|
| 63 |
|
|---|
| 64 | class bncPPPthread : public QThread {
|
|---|
| 65 | Q_OBJECT
|
|---|
| 66 |
|
|---|
| 67 | public:
|
|---|
| 68 | bncPPPthread(QByteArray staID);
|
|---|
| 69 |
|
|---|
| 70 | protected:
|
|---|
| 71 | ~bncPPPthread();
|
|---|
| 72 |
|
|---|
| 73 | public:
|
|---|
| 74 | void terminate();
|
|---|
| 75 | void putNewObs(p_obs pp);
|
|---|
| 76 |
|
|---|
| 77 | signals:
|
|---|
| 78 | void newMessage(QByteArray msg, bool showOnScreen);
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 | protected:
|
|---|
| 82 | virtual void run();
|
|---|
| 83 |
|
|---|
| 84 | public slots:
|
|---|
| 85 | void slotNewEphGPS(gpsephemeris gpseph);
|
|---|
| 86 | void slotNewCorrections(QList<QString> corrList);
|
|---|
| 87 |
|
|---|
| 88 | private:
|
|---|
| 89 | t_irc getSatPos(const t_time& tt, const QString& prn,
|
|---|
| 90 | ColumnVector& xc, ColumnVector& vv);
|
|---|
| 91 | void processEpoch();
|
|---|
| 92 | QByteArray _staID;
|
|---|
| 93 | bool _isToBeDeleted;
|
|---|
| 94 | QMutex _mutex;
|
|---|
| 95 | QMap<QString, t_eph*> _eph;
|
|---|
| 96 | QMap<QString, t_corr*> _corr;
|
|---|
| 97 | t_data* _data;
|
|---|
| 98 | t_data* _dataHlp;
|
|---|
| 99 | };
|
|---|
| 100 |
|
|---|
| 101 | #endif
|
|---|