[3645] | 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 RNXOBSFILE_H
|
---|
| 26 | #define RNXOBSFILE_H
|
---|
| 27 |
|
---|
| 28 | #include <QtCore>
|
---|
[3672] | 29 | #include "newmat.h"
|
---|
[3645] | 30 | #include "bncconst.h"
|
---|
[3680] | 31 | #include "bnctime.h"
|
---|
[3645] | 32 |
|
---|
| 33 | class t_pppOpt;
|
---|
| 34 | class bncPPPclient;
|
---|
| 35 |
|
---|
| 36 | class t_rnxObsFile {
|
---|
[3646] | 37 |
|
---|
| 38 | class t_rnxObsHeader {
|
---|
| 39 | public:
|
---|
| 40 | t_rnxObsHeader();
|
---|
| 41 | ~t_rnxObsHeader();
|
---|
| 42 | t_irc read(QTextStream* stream);
|
---|
[3672] | 43 | float version() const {return _version;}
|
---|
| 44 | int nTypes() const {return _obsTypes.size();}
|
---|
| 45 | const QString& obsType(int index) const {return _obsTypes.at(index);}
|
---|
| 46 | const QString& antennaName() const {return _antennaName;}
|
---|
| 47 | const QString& markerName() const {return _markerName;}
|
---|
| 48 | const ColumnVector& xyz() const {return _xyz;}
|
---|
| 49 | const ColumnVector& antNEU() const {return _antNEU;}
|
---|
[3646] | 50 | private:
|
---|
[3672] | 51 | float _version;
|
---|
| 52 | QString _antennaName;
|
---|
| 53 | QString _markerName;
|
---|
| 54 | ColumnVector _antNEU;
|
---|
| 55 | ColumnVector _xyz;
|
---|
| 56 | QStringList _obsTypes;
|
---|
[3646] | 57 | };
|
---|
[3645] | 58 |
|
---|
| 59 | public:
|
---|
[3646] | 60 | t_rnxObsFile(QString fileName);
|
---|
[3645] | 61 | ~t_rnxObsFile();
|
---|
| 62 |
|
---|
[3680] | 63 | int nTypes() const {return _header.nTypes();}
|
---|
| 64 | const QString& obsType(int index) const {return _header.obsType(index);}
|
---|
| 65 | const QString& antennaName() const {return _header.antennaName();}
|
---|
| 66 | const QString& markerName() const {return _header.markerName();}
|
---|
| 67 | const ColumnVector& xyz() const {return _header.xyz();}
|
---|
| 68 | const ColumnVector& antNEU() const {return _header.antNEU();}
|
---|
| 69 |
|
---|
[3676] | 70 | class t_satObs : public ColumnVector {
|
---|
| 71 | public:
|
---|
[3677] | 72 | QString prn;
|
---|
| 73 | int lli;
|
---|
| 74 | int snr;
|
---|
[3676] | 75 | };
|
---|
| 76 |
|
---|
[3675] | 77 | class t_epo {
|
---|
| 78 | public:
|
---|
[3676] | 79 | void clear() {
|
---|
| 80 | satObs.clear();
|
---|
| 81 | }
|
---|
[3680] | 82 | bncTime tt;
|
---|
[3677] | 83 | QVector<t_satObs> satObs;
|
---|
[3675] | 84 | };
|
---|
| 85 |
|
---|
[3673] | 86 | float version() const {return _header.version();}
|
---|
[3675] | 87 | const t_epo* nextEpoch();
|
---|
[3645] | 88 |
|
---|
| 89 | private:
|
---|
[3675] | 90 | const t_epo* nextEpochV2();
|
---|
| 91 | const t_epo* nextEpochV3();
|
---|
[3673] | 92 |
|
---|
[3646] | 93 | t_rnxObsHeader _header;
|
---|
| 94 | QFile* _file;
|
---|
| 95 | QTextStream* _stream;
|
---|
[3675] | 96 | t_epo _currEpo;
|
---|
[3645] | 97 | };
|
---|
| 98 |
|
---|
| 99 | #endif
|
---|