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 |
|
---|
35 | extern "C" {
|
---|
36 | #include "clock_orbit_rtcm.h"
|
---|
37 | }
|
---|
38 |
|
---|
39 | class t_corr {
|
---|
40 | public:
|
---|
41 | t_corr() {
|
---|
42 | raoSet = false;
|
---|
43 | dClkSet = false;
|
---|
44 | eph = 0;
|
---|
45 | }
|
---|
46 | bool ready() {return raoSet && dClkSet;}
|
---|
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 |
|
---|
57 | t_irc readLine(const QString& line);
|
---|
58 |
|
---|
59 | QString prn;
|
---|
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;
|
---|
70 | const t_eph* eph;
|
---|
71 | };
|
---|
72 |
|
---|
73 | class bncEphUser : public QObject {
|
---|
74 | Q_OBJECT
|
---|
75 |
|
---|
76 | public:
|
---|
77 | bncEphUser();
|
---|
78 | ~bncEphUser();
|
---|
79 |
|
---|
80 | class t_ephPair {
|
---|
81 | public:
|
---|
82 | t_ephPair(t_eph* lastEph) {
|
---|
83 | last = lastEph;
|
---|
84 | prev = 0;
|
---|
85 | }
|
---|
86 | ~t_ephPair() {
|
---|
87 | delete last;
|
---|
88 | delete prev;
|
---|
89 | }
|
---|
90 | t_eph* last;
|
---|
91 | t_eph* prev;
|
---|
92 | };
|
---|
93 |
|
---|
94 |
|
---|
95 | public slots:
|
---|
96 | void slotNewEphGPS(gpsephemeris gpseph);
|
---|
97 | void slotNewEphGlonass(glonassephemeris gloeph);
|
---|
98 | void slotNewEphGalileo(galileoephemeris galeph);
|
---|
99 |
|
---|
100 | protected:
|
---|
101 | QMutex _mutex;
|
---|
102 | QMap<QString, t_ephPair*> _eph;
|
---|
103 | };
|
---|
104 |
|
---|
105 | #endif
|
---|