| 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>
|
|---|
| 29 | #include "newmat.h"
|
|---|
| 30 | #include "bncconst.h"
|
|---|
| 31 | #include "bnctime.h"
|
|---|
| 32 |
|
|---|
| 33 | class t_pppOpt;
|
|---|
| 34 | class bncPPPclient;
|
|---|
| 35 |
|
|---|
| 36 | class t_rnxObsFile {
|
|---|
| 37 |
|
|---|
| 38 | class t_rnxObsHeader {
|
|---|
| 39 | public:
|
|---|
| 40 | t_rnxObsHeader();
|
|---|
| 41 | ~t_rnxObsHeader();
|
|---|
| 42 | t_irc read(QTextStream* stream);
|
|---|
| 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;}
|
|---|
| 50 | private:
|
|---|
| 51 | float _version;
|
|---|
| 52 | QString _antennaName;
|
|---|
| 53 | QString _markerName;
|
|---|
| 54 | ColumnVector _antNEU;
|
|---|
| 55 | ColumnVector _xyz;
|
|---|
| 56 | QStringList _obsTypes;
|
|---|
| 57 | };
|
|---|
| 58 |
|
|---|
| 59 | public:
|
|---|
| 60 | t_rnxObsFile(QString fileName);
|
|---|
| 61 | ~t_rnxObsFile();
|
|---|
| 62 |
|
|---|
| 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 |
|
|---|
| 70 | class t_satObs : public ColumnVector {
|
|---|
| 71 | public:
|
|---|
| 72 | QString prn;
|
|---|
| 73 | int lli;
|
|---|
| 74 | int snr;
|
|---|
| 75 | };
|
|---|
| 76 |
|
|---|
| 77 | class t_epo {
|
|---|
| 78 | public:
|
|---|
| 79 | void clear() {
|
|---|
| 80 | satObs.clear();
|
|---|
| 81 | }
|
|---|
| 82 | bncTime tt;
|
|---|
| 83 | QVector<t_satObs> satObs;
|
|---|
| 84 | };
|
|---|
| 85 |
|
|---|
| 86 | float version() const {return _header.version();}
|
|---|
| 87 | const t_epo* nextEpoch();
|
|---|
| 88 |
|
|---|
| 89 | private:
|
|---|
| 90 | const t_epo* nextEpochV2();
|
|---|
| 91 | const t_epo* nextEpochV3();
|
|---|
| 92 |
|
|---|
| 93 | t_rnxObsHeader _header;
|
|---|
| 94 | QFile* _file;
|
|---|
| 95 | QTextStream* _stream;
|
|---|
| 96 | t_epo _currEpo;
|
|---|
| 97 | };
|
|---|
| 98 |
|
|---|
| 99 | #endif
|
|---|