source: ntrip/trunk/BNC/src/RTCM/GPSDecoder.h@ 4390

Last change on this file since 4390 was 4389, checked in by mervart, 12 years ago
File size: 3.8 KB
RevLine 
[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>
[1218]29#include <vector>
30#include <string>
[621]31#include <QList>
[1239]32#include <QStringList>
[35]33
[649]34#include "bncconst.h"
[3528]35#include "bncrinex.h"
[649]36
[4389]37extern "C" {
38#include "rtcm3torinex.h"
39}
40
[2709]41class t_obs {
42 public:
43 t_obs() {
[2712]44 StatID[0] = '\x0';
[2709]45 satSys = 'G';
46 satNum = 0;
47 slotNum = 0;
48 GPSWeek = 0;
49 GPSWeeks = 0.0;
[4389]50 _dataflags = 0;
51 _dataflags2 = 0;
52 for (int iEntry = 0; iEntry < GNSSENTRY_NUMBER; iEntry++) {
53 _measdata[iEntry] = 0.0;
54 _codetype[iEntry] = 0;
55 }
[2709]56 slip_cnt_L1 = -1;
57 slip_cnt_L2 = -1;
58 slip_cnt_L5 = -1;
59 }
60
61 ~t_obs() {}
62
[4389]63 double c1() const;
64 double c2() const;
65 double c5() const;
66 double p1() const;
67 double p2() const;
68 double l1() const;
69 double l2() const;
70 double l5() const;
71 double s1() const;
72 double s2() const;
73 std::string entry2str(int iEntry) const;
74 int str2entry(const char* str) const;
[2709]75
[2691]76 char StatID[20+1]; // Station ID
77 char satSys; // Satellite System ('G' or 'R')
78 int satNum; // Satellite Number (PRN for GPS NAVSTAR)
79 int slotNum; // Slot Number (for Glonass)
80 int GPSWeek; // Week of GPS-Time
81 double GPSWeeks; // Second of Week (GPS-Time)
82
83 int slip_cnt_L1; // L1 cumulative loss of continuity indicator (negative value = undefined)
84 int slip_cnt_L2; // L2 cumulative loss of continuity indicator (negative value = undefined)
85 int slip_cnt_L5; // L5 cumulative loss of continuity indicator (negative value = undefined)
[4389]86
87 double _measdata[GNSSENTRY_NUMBER]; // data fields */
88 unsigned long long _dataflags; // GNSSDF_xxx */
89 unsigned int _dataflags2; // GNSSDF2_xxx */
90 const char* _codetype[GNSSENTRY_NUMBER];
[222]91};
[35]92
93class GPSDecoder {
[622]94 public:
[3528]95 GPSDecoder();
[622]96
[3528]97 virtual ~GPSDecoder() {delete _rnx;}
[622]98
[3528]99 virtual t_irc Decode(char* buffer, int bufLen,
100 std::vector<std::string>& errmsg) = 0;
101
102
[1567]103 virtual int corrGPSEpochTime() const {return -1;}
104
[3529]105 void initRinex(const QByteArray& staID, const QUrl& mountPoint,
106 const QByteArray& latitude, const QByteArray& longitude,
107 const QByteArray& nmea, const QByteArray& ntripVersion);
108
[3528]109 void dumpRinexEpoch(const t_obs& obs, const QByteArray& format);
110
111 void setRinexReconnectFlag(bool flag);
112
[1268]113 struct t_antInfo {
114 enum t_type { ARP, APC };
115
116 t_antInfo() {
117 xx = yy = zz = height = 0.0;
118 type = ARP;
119 height_f = false;
120 message = 0;
121 };
122
123 double xx;
124 double yy;
125 double zz;
126 t_type type;
127 double height;
128 bool height_f;
129 int message;
130 };
131
[2711]132 QList<t_obs> _obsList;
[3528]133 QList<int> _typeList; // RTCM message types
134 QStringList _antType; // RTCM antenna descriptor
135 QList<t_antInfo> _antList; // RTCM antenna XYZ
136 bncRinex* _rnx; // RINEX writer
[222]137};
[35]138
139#endif
Note: See TracBrowser for help on using the repository browser.