source: ntrip/trunk/BNC/RTCM/GPSDecoder.h@ 3285

Last change on this file since 3285 was 2712, checked in by mervart, 14 years ago
File size: 4.3 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 GPSDECODER_H
26#define GPSDECODER_H
27
28#include <iostream>
29#include <vector>
30#include <string>
31#include <QList>
32#include <QStringList>
33
34#include "bncconst.h"
35
36class t_obs {
37 public:
38 t_obs() {
39 StatID[0] = '\x0';
40 satSys = 'G';
41 satNum = 0;
42 slotNum = 0;
43 GPSWeek = 0;
44 GPSWeeks = 0.0;
45 C1 = 0.0;
46 P1 = 0.0;
47 L1C = 0.0;
48 D1C = 0.0;
49 S1C = 0.0;
50 L1P = 0.0;
51 D1P = 0.0;
52 S1P = 0.0;
53 C2 = 0.0;
54 P2 = 0.0;
55 L2C = 0.0;
56 D2C = 0.0;
57 S2C = 0.0;
58 L2P = 0.0;
59 D2P = 0.0;
60 S2P = 0.0;
61 C5 = 0.0;
62 L5 = 0.0;
63 D5 = 0.0;
64 S5 = 0.0;
65 slip_cnt_L1 = -1;
66 slip_cnt_L2 = -1;
67 slip_cnt_L5 = -1;
68 }
69
70 ~t_obs() {}
71
72 double L1() const {return (L1P != 0.0 ? L1P : L1C);}
73 double L2() const {return (L2P != 0.0 ? L2P : L2C);}
74 double S1() const {return (L1P != 0.0 ? S1P : S1C);}
75 double S2() const {return (L2P != 0.0 ? S2P : S2C);}
76
77 char StatID[20+1]; // Station ID
78 char satSys; // Satellite System ('G' or 'R')
79 int satNum; // Satellite Number (PRN for GPS NAVSTAR)
80 int slotNum; // Slot Number (for Glonass)
81 int GPSWeek; // Week of GPS-Time
82 double GPSWeeks; // Second of Week (GPS-Time)
83
84 double C1; // CA-code pseudorange (meters)
85 double P1; // P1-code pseudorange (meters)
86 double L1C; // L1 carrier phase (cycles)
87 double D1C; // Doppler L1
88 double S1C; // raw L1 signal strength
89 double L1P; // L1 carrier phase (cycles)
90 double D1P; // Doppler L1
91 double S1P; // raw L1 signal strength
92
93 double C2; // CA-code pseudorange (meters)
94 double P2; // P2-code pseudorange (meters)
95 double L2C; // L2 carrier phase (cycles)
96 double D2C; // Doppler L2
97 double S2C; // raw L2 signal strength
98 double L2P; // L2 carrier phase (cycles)
99 double D2P; // Doppler L2
100 double S2P; // raw L2 signal strength
101
102 double C5; // Pseudorange (meters)
103 double L5; // L5 carrier phase (cycles)
104 double D5; // Doppler L5
105 double S5; // raw L5 signal strength
106
107 int slip_cnt_L1; // L1 cumulative loss of continuity indicator (negative value = undefined)
108 int slip_cnt_L2; // L2 cumulative loss of continuity indicator (negative value = undefined)
109 int slip_cnt_L5; // L5 cumulative loss of continuity indicator (negative value = undefined)
110};
111
112class GPSDecoder {
113 public:
114 virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg) = 0;
115
116 virtual ~GPSDecoder() {}
117
118 virtual int corrGPSEpochTime() const {return -1;}
119
120 struct t_antInfo {
121 enum t_type { ARP, APC };
122
123 t_antInfo() {
124 xx = yy = zz = height = 0.0;
125 type = ARP;
126 height_f = false;
127 message = 0;
128 };
129
130 double xx;
131 double yy;
132 double zz;
133 t_type type;
134 double height;
135 bool height_f;
136 int message;
137 };
138
139 QList<t_obs> _obsList;
140 QList<int> _typeList; // RTCM message types
141 QStringList _antType; // RTCM antenna descriptor
142 QList<t_antInfo> _antList; // RTCM antenna XYZ
143};
144
145#endif
Note: See TracBrowser for help on using the repository browser.