source: ntrip/branches/BNC_LM/bncephuser.h@ 6325

Last change on this file since 6325 was 3571, checked in by mervart, 12 years ago
File size: 2.8 KB
Line 
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
35extern "C" {
36#include "clock_orbit_rtcm.h"
37}
38
39class t_corr {
40 public:
41 t_corr() {
42 raoSet = false;
43 dClkSet = false;
44 eph = 0;
45 hrClk = 0.0;
46 }
47 bool ready() {return raoSet && dClkSet;}
48
49 static bool relevantMessageType(int msgType) {
50 return ( msgType == COTYPE_GPSCOMBINED ||
51 msgType == COTYPE_GLONASSCOMBINED ||
52 msgType == COTYPE_GPSORBIT ||
53 msgType == COTYPE_GPSCLOCK ||
54 msgType == COTYPE_GLONASSORBIT ||
55 msgType == COTYPE_GLONASSCLOCK ||
56 msgType == COTYPE_GPSHR ||
57 msgType == COTYPE_GLONASSHR );
58 }
59
60 t_irc readLine(const QString& line);
61
62 QString prn;
63 bncTime tt;
64 int iod;
65 double dClk;
66 double dotDClk;
67 double dotDotDClk;
68 double hrClk;
69 ColumnVector rao;
70 ColumnVector dotRao;
71 ColumnVector dotDotRao;
72 bool raoSet;
73 bool dClkSet;
74 const t_eph* eph;
75};
76
77class bncEphUser : public QObject {
78 Q_OBJECT
79
80 public:
81 bncEphUser();
82 virtual ~bncEphUser();
83
84 class t_ephPair {
85 public:
86 t_ephPair(t_eph* lastEph) {
87 last = lastEph;
88 prev = 0;
89 }
90 ~t_ephPair() {
91 delete last;
92 delete prev;
93 }
94 t_eph* last;
95 t_eph* prev;
96 };
97
98 const t_ephPair* ephPair(const QString& prn) {
99 if (_eph.contains(prn)) {
100 return _eph[prn];
101 }
102 else {
103 return 0;
104 }
105 }
106
107 public slots:
108 void slotNewEphGPS(gpsephemeris gpseph);
109 void slotNewEphGlonass(glonassephemeris gloeph);
110 void slotNewEphGalileo(galileoephemeris galeph);
111
112 protected:
113 virtual void ephBufferChanged() {}
114 QMutex _mutex;
115 QMap<QString, t_ephPair*> _eph;
116};
117
118#endif
Note: See TracBrowser for help on using the repository browser.