source: ntrip/trunk/BNC/src/rinex/rnxnavfile.h@ 9765

Last change on this file since 9765 was 9765, checked in by stuerze, 22 months ago

some more changes to consider RINEX Version 4 nav file (EPH key only)

File size: 2.7 KB
RevLine 
[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 RNXNAVFILE_H
26#define RNXNAVFILE_H
[9765]27#include <iostream>
[3746]28#include <queue>
[3645]29#include <QtCore>
30#include "bncconst.h"
[3748]31#include "bnctime.h"
[8354]32#include "ephemeris.h"
[3645]33
34class t_pppOpt;
35class bncPPPclient;
[3659]36class t_eph;
[9765]37using namespace std;
[8127]38#define defaultRnxNavVersion2 2.11
[9366]39#define defaultRnxNavVersion3 3.05
[9760]40#define defaultRnxNavVersion4 4.00
[8127]41
[3645]42class t_rnxNavFile {
[3657]43
[3999]44 public:
45 enum e_inpOut {input, output};
46 private:
[3657]47 class t_rnxNavHeader {
48 public:
49 t_rnxNavHeader();
50 ~t_rnxNavHeader();
[4008]51 t_irc read(QTextStream* stream);
52 double _version;
53 bool _glonass;
[8354]54 t_eph::e_type _satSys;
[7999]55 QStringList _comments;
[3657]56 };
[7999]57
[3645]58 public:
[3999]59 t_rnxNavFile(const QString& fileName, e_inpOut inpOut);
[3645]60 ~t_rnxNavFile();
[7169]61 t_eph* getNextEph(const bncTime& tt, const QMap<QString, unsigned int>* corrIODs);
[4000]62 const std::vector<t_eph*> ephs() const {return _ephs;}
[4008]63 double version() const {return _header._version;}
64 void setVersion(double version) {_header._version = version;}
65 bool glonass() const {return _header._glonass;}
[7999]66 QStringList comments() const {return _header._comments;}
[8354]67 t_eph::e_type satSystem() const {return _header._satSys;}
[7999]68 void setGlonass(bool glo) {_header._glonass = glo;}
[8354]69 void setGnssTypeV3(t_eph::e_type sys) {_header._satSys = sys;}
[9765]70 void writeHeader(const QMap<QString, QString>* txtMap = 0, int numMergedFiles = 0, int leapSecs = 0);
[4008]71 void writeEph(const t_eph* eph);
[3645]72
[3999]73 protected:
74 t_rnxNavFile() {};
75 void openRead(const QString& fileName);
76 void openWrite(const QString& fileName);
77 void close();
78
[3645]79 private:
[3758]80 void read(QTextStream* stream);
81
[3999]82 e_inpOut _inpOut;
83 QFile* _file;
84 QString _fileName;
85 QTextStream* _stream;
[3758]86 std::vector<t_eph*> _ephs;
87 t_rnxNavHeader _header;
[3645]88};
89
90#endif
Note: See TracBrowser for help on using the repository browser.