source: ntrip/trunk/BNC/src/bncephuser.h@ 6442

Last change on this file since 6442 was 6442, checked in by mervart, 9 years ago
File size: 2.1 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 "ephemeris.h"
34
35extern "C" {
36# include "clock_orbit_rtcm.h"
37}
38
39class bncEphUser : public QObject {
40 Q_OBJECT
41
42 public slots:
43 void slotNewGPSEph(t_ephGPS);
44 void slotNewGlonassEph(t_ephGlo);
45 void slotNewGalileoEph(t_ephGal);
46 void slotNewSBASEph(t_ephSBAS);
47
48 public:
49 bncEphUser(bool connectSlots);
50 virtual ~bncEphUser();
51
52 t_irc putNewEph(const t_eph* newEph);
53
54 const t_eph* ephLast(const QString& prn) {
55 if (_eph.contains(prn)) {
56 return _eph[prn]->last;
57 }
58 return 0;
59 }
60
61 const t_eph* ephPrev(const QString& prn) {
62 if (_eph.contains(prn)) {
63 return _eph[prn]->prev;
64 }
65 return 0;
66 }
67
68 protected:
69 virtual void ephBufferChanged() {}
70
71 class t_ephPair {
72 public:
73 t_ephPair(t_eph* lastEph) {
74 last = lastEph;
75 prev = 0;
76 }
77 ~t_ephPair() {
78 delete last;
79 delete prev;
80 }
81 t_eph* last;
82 t_eph* prev;
83 };
84
85 QMutex _mutex;
86 QMap<QString, t_ephPair*> _eph;
87};
88
89#endif
Note: See TracBrowser for help on using the repository browser.