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

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

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

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