[2904] | 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 BNCEPHUSER_H
|
---|
| 26 | #define BNCEPHUSER_H
|
---|
| 27 |
|
---|
| 28 | #include <QtCore>
|
---|
| 29 | #include <newmat.h>
|
---|
| 30 |
|
---|
| 31 | #include "bncconst.h"
|
---|
| 32 | #include "bnctime.h"
|
---|
| 33 | #include "RTCM3/ephemeris.h"
|
---|
| 34 |
|
---|
[2911] | 35 | extern "C" {
|
---|
| 36 | #include "clock_orbit_rtcm.h"
|
---|
| 37 | }
|
---|
| 38 |
|
---|
[2904] | 39 | class t_corr {
|
---|
| 40 | public:
|
---|
| 41 | t_corr() {
|
---|
| 42 | raoSet = false;
|
---|
| 43 | dClkSet = false;
|
---|
[3012] | 44 | eph = 0;
|
---|
[2904] | 45 | }
|
---|
| 46 | bool ready() {return raoSet && dClkSet;}
|
---|
[2911] | 47 |
|
---|
| 48 | static bool relevantMessageType(int msgType) {
|
---|
| 49 | return ( msgType == COTYPE_GPSCOMBINED ||
|
---|
| 50 | msgType == COTYPE_GLONASSCOMBINED ||
|
---|
| 51 | msgType == COTYPE_GPSORBIT ||
|
---|
| 52 | msgType == COTYPE_GPSCLOCK ||
|
---|
| 53 | msgType == COTYPE_GLONASSORBIT ||
|
---|
| 54 | msgType == COTYPE_GLONASSCLOCK );
|
---|
| 55 | }
|
---|
| 56 |
|
---|
[2912] | 57 | t_irc readLine(const QString& line);
|
---|
[2911] | 58 |
|
---|
[2914] | 59 | QString prn;
|
---|
[2904] | 60 | bncTime tt;
|
---|
| 61 | int iod;
|
---|
| 62 | double dClk;
|
---|
| 63 | double dotDClk;
|
---|
| 64 | double dotDotDClk;
|
---|
| 65 | ColumnVector rao;
|
---|
| 66 | ColumnVector dotRao;
|
---|
| 67 | ColumnVector dotDotRao;
|
---|
| 68 | bool raoSet;
|
---|
| 69 | bool dClkSet;
|
---|
[3029] | 70 | const t_eph* eph;
|
---|
[2904] | 71 | };
|
---|
| 72 |
|
---|
| 73 | class bncEphUser : public QObject {
|
---|
| 74 | Q_OBJECT
|
---|
| 75 |
|
---|
| 76 | public:
|
---|
| 77 | bncEphUser();
|
---|
| 78 | ~bncEphUser();
|
---|
| 79 |
|
---|
| 80 | class t_ephPair {
|
---|
| 81 | public:
|
---|
[3012] | 82 | t_ephPair(t_eph* lastEph) {
|
---|
| 83 | last = lastEph;
|
---|
[2904] | 84 | prev = 0;
|
---|
| 85 | }
|
---|
| 86 | ~t_ephPair() {
|
---|
| 87 | delete last;
|
---|
| 88 | delete prev;
|
---|
| 89 | }
|
---|
| 90 | t_eph* last;
|
---|
| 91 | t_eph* prev;
|
---|
| 92 | };
|
---|
| 93 |
|
---|
[3209] | 94 | const t_ephPair* ephPair(const QString& prn) {
|
---|
| 95 | if (_eph.contains(prn)) {
|
---|
| 96 | return _eph[prn];
|
---|
| 97 | }
|
---|
| 98 | else {
|
---|
| 99 | return 0;
|
---|
| 100 | }
|
---|
| 101 | }
|
---|
[3182] | 102 |
|
---|
| 103 | public slots:
|
---|
| 104 | void slotNewEphGPS(gpsephemeris gpseph);
|
---|
| 105 | void slotNewEphGlonass(glonassephemeris gloeph);
|
---|
| 106 | void slotNewEphGalileo(galileoephemeris galeph);
|
---|
| 107 |
|
---|
| 108 | protected:
|
---|
[2904] | 109 | QMutex _mutex;
|
---|
| 110 | QMap<QString, t_ephPair*> _eph;
|
---|
| 111 | };
|
---|
| 112 |
|
---|
| 113 | #endif
|
---|