[297] | 1 | // Part of BNC, a utility for retrieving decoding and
|
---|
[464] | 2 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
[297] | 3 | //
|
---|
[464] | 4 | // Copyright (C) 2007
|
---|
[297] | 5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
| 6 | // http://www.bkg.bund.de
|
---|
[464] | 7 | // Czech Technical University Prague, Department of Geodesy
|
---|
[297] | 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.
|
---|
[35] | 24 |
|
---|
[222] | 25 | #ifndef GPSDECODER_H
|
---|
| 26 | #define GPSDECODER_H
|
---|
| 27 |
|
---|
[625] | 28 | #include <iostream>
|
---|
[10533] | 29 | #include <iomanip>
|
---|
[1218] | 30 | #include <vector>
|
---|
| 31 | #include <string>
|
---|
[35] | 32 |
|
---|
[5884] | 33 | #include <QtCore>
|
---|
| 34 |
|
---|
[649] | 35 | #include "bncconst.h"
|
---|
[5884] | 36 | #include "bnctime.h"
|
---|
[6137] | 37 | #include "satObs.h"
|
---|
[10533] | 38 | #include "crs.h"
|
---|
[649] | 39 |
|
---|
[5884] | 40 | class bncRinex;
|
---|
[10533] | 41 | using namespace std;
|
---|
[5884] | 42 |
|
---|
[35] | 43 | class GPSDecoder {
|
---|
[622] | 44 | public:
|
---|
[3528] | 45 | GPSDecoder();
|
---|
[5884] | 46 | virtual ~GPSDecoder();
|
---|
[622] | 47 |
|
---|
[8197] | 48 | virtual t_irc Decode(char* buffer, int bufLen,
|
---|
[3528] | 49 | std::vector<std::string>& errmsg) = 0;
|
---|
| 50 |
|
---|
| 51 |
|
---|
[1567] | 52 | virtual int corrGPSEpochTime() const {return -1;}
|
---|
| 53 |
|
---|
[3529] | 54 | void initRinex(const QByteArray& staID, const QUrl& mountPoint,
|
---|
[8197] | 55 | const QByteArray& latitude, const QByteArray& longitude,
|
---|
[3529] | 56 | const QByteArray& nmea, const QByteArray& ntripVersion);
|
---|
| 57 |
|
---|
[6137] | 58 | void dumpRinexEpoch(const t_satObs& obs, const QByteArray& format);
|
---|
[3528] | 59 |
|
---|
| 60 | void setRinexReconnectFlag(bool flag);
|
---|
| 61 |
|
---|
[8235] | 62 | struct t_antRefPoint {
|
---|
[1268] | 63 | enum t_type { ARP, APC };
|
---|
| 64 |
|
---|
[8235] | 65 | t_antRefPoint() {
|
---|
[1268] | 66 | xx = yy = zz = height = 0.0;
|
---|
| 67 | type = ARP;
|
---|
| 68 | height_f = false;
|
---|
| 69 | message = 0;
|
---|
| 70 | };
|
---|
| 71 |
|
---|
| 72 | double xx;
|
---|
| 73 | double yy;
|
---|
| 74 | double zz;
|
---|
| 75 | t_type type;
|
---|
| 76 | double height;
|
---|
| 77 | bool height_f;
|
---|
| 78 | int message;
|
---|
| 79 | };
|
---|
| 80 |
|
---|
[8235] | 81 | struct t_antInfo {
|
---|
| 82 | t_antInfo() {
|
---|
| 83 | };
|
---|
| 84 | char descriptor[256];
|
---|
| 85 | char serialnumber[256];
|
---|
| 86 | };
|
---|
| 87 |
|
---|
| 88 | struct t_recInfo {
|
---|
| 89 | t_recInfo() {
|
---|
| 90 | };
|
---|
| 91 | char descriptor[256];
|
---|
| 92 | char serialnumber[256];
|
---|
| 93 | char firmware[256];
|
---|
| 94 | };
|
---|
| 95 |
|
---|
[6812] | 96 | /** List of observations */
|
---|
[10533] | 97 | QList<t_satObs> _obsList;
|
---|
| 98 | QList<int> _typeList; // RTCM message types
|
---|
| 99 | QList<t_antInfo> _antType; // RTCM antenna descriptor
|
---|
| 100 | QList<t_recInfo> _recType; // RTCM receiver descriptor
|
---|
| 101 | QList<t_antRefPoint> _antList; // RTCM antenna XYZ
|
---|
| 102 | QList<t_helmertPar> _helmertPar; // List of Helmert parameter sets
|
---|
| 103 | QList<t_serviceCrs> _serviceCrs; // Service CRS
|
---|
| 104 | QList<t_rtcmCrs> _rtcmCrs; // RTCM CRS
|
---|
| 105 | QString _gloFrq; // GLONASS slot
|
---|
| 106 | bncRinex* _rnx; // RINEX writer
|
---|
[222] | 107 | };
|
---|
[35] | 108 |
|
---|
| 109 | #endif
|
---|