source: ntrip/branches/test_lm/BNC/bncephuser.h@ 3566

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