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 INC_RTCM2DECODER_H
|
---|
26 | #define INC_RTCM2DECODER_H
|
---|
27 |
|
---|
28 | #include <map>
|
---|
29 |
|
---|
30 | #include "GPSDecoder.h"
|
---|
31 | #include "RTCM2.h"
|
---|
32 | #include "RTCM2_2021.h"
|
---|
33 | #include "../RTCM3/rtcm3torinex.h"
|
---|
34 | #include "../RTCM3/ephemeris.h"
|
---|
35 |
|
---|
36 | class RTCM2Decoder: public GPSDecoder {
|
---|
37 |
|
---|
38 | public:
|
---|
39 | RTCM2Decoder(const std::string& ID);
|
---|
40 | virtual ~RTCM2Decoder();
|
---|
41 | virtual t_irc Decode(char* buffer, int bufLen);
|
---|
42 |
|
---|
43 | void storeEph(const gpsephemeris& gpseph);
|
---|
44 | void storeEph(const t_ephGPS& gpseph);
|
---|
45 |
|
---|
46 | t_irc getStaCrd(double& xx, double& yy, double& zz);
|
---|
47 |
|
---|
48 | const rtcm2::RTCM2_2021& msg2021() const { return _msg2021; }
|
---|
49 |
|
---|
50 | std::string ID() const { return _ID; }
|
---|
51 |
|
---|
52 | private:
|
---|
53 |
|
---|
54 | class t_ephPair {
|
---|
55 | public:
|
---|
56 | t_ephPair() {
|
---|
57 | eph = 0;
|
---|
58 | oldEph = 0;
|
---|
59 | }
|
---|
60 |
|
---|
61 | ~t_ephPair() {
|
---|
62 | delete eph;
|
---|
63 | delete oldEph;
|
---|
64 | }
|
---|
65 |
|
---|
66 | t_eph* eph;
|
---|
67 | t_eph* oldEph;
|
---|
68 | };
|
---|
69 |
|
---|
70 | void translateCorr2Obs();
|
---|
71 |
|
---|
72 | std::string _ID;
|
---|
73 |
|
---|
74 | std::string _buffer;
|
---|
75 | rtcm2::RTCM2packet _PP;
|
---|
76 |
|
---|
77 | // for messages 18, 19 decoding
|
---|
78 | rtcm2::RTCM2_Obs _ObsBlock;
|
---|
79 |
|
---|
80 | // for messages 20, 21 decoding
|
---|
81 | rtcm2::RTCM2_03 _msg03;
|
---|
82 | rtcm2::RTCM2_22 _msg22;
|
---|
83 | rtcm2::RTCM2_2021 _msg2021;
|
---|
84 | std::map<std::string, t_ephPair*> _ephPair;
|
---|
85 |
|
---|
86 | typedef std::map<std::string, t_ephPair*> t_pairMap;
|
---|
87 | };
|
---|
88 |
|
---|
89 | #endif // include blocker
|
---|