source: ntrip/trunk/BNC/src/bncconst.h@ 9292

Last change on this file since 9292 was 8629, checked in by stuerze, 6 years ago

some updates to support RINEX Version 3.04

File size: 5.1 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#include <string>
26
27#ifndef BNCCONST_H
28#define BNCCONST_H
29
30enum t_irc {failure = -1, success, fatal}; // return code
31
32class t_frequency {
33 public:
34 enum type {dummy = 0,
35 // GPS
36 G1, // L1 / 1575.42
37 G2, // L2 / 1227.60
38 G5, // L5 / 1176.45
39 // GLONASS
40 R1, // G1 / 1602 + k * 9/16 (k = -7 .. +12)
41 R4, // G1a / 1600.995
42 R2, // G2 / 1246 + k * 7/16 (k = -7 .. +12)
43 R6, // G1b / 1248.06
44 R3, // G3 / 1202.025
45 // Galileo
46 E1, // E1 / 1575.42
47 E5, // E5a / 1176.45
48 E7, // E5b / 1207.140
49 E8, // E5(E5a+E5b) / 1191.795
50 E6, // E6 / 1278.75
51 // QZSS
52 J1, // L1 / 1575.42
53 J2, // L2 / 1227.60
54 J5, // L5 / 1176.45
55 J6, // L6 / 1278.75
56 // BDS
57 C2, // B1-2 / 1561.098
58 C1, // B1 / 1575.42 (BDS-3 signals)
59 C5, // B2a / 1176.45 (BDS-3 signals)
60 C7, // B2b / 1207.14 (BDS-2 signals)
61 C8, // B2 (B2a + B2b) / 1191.795 (BDS-3 signals)
62 C6, // B3 / 1268.52
63 // IRNSS
64 I5, // L5 / 1176.45
65 I9, // S / 2492.028
66 // SBAS
67 S1, // L1 / 1575.42
68 S5, // L5 / 1176.45
69 max};
70
71 static std::string toString(type tt) {
72 // GPS
73 if (tt == G1) return "G1";
74 else if (tt == G2) return "G2";
75 else if (tt == G5) return "G5";
76 // GLONASS
77 else if (tt == R1) return "R1";
78 else if (tt == R4) return "R4";
79 else if (tt == R2) return "R2";
80 else if (tt == R6) return "R6";
81 else if (tt == R3) return "R3";
82 // Galileo
83 else if (tt == E1) return "E1";
84 else if (tt == E5) return "E5";
85 else if (tt == E6) return "E6";
86 else if (tt == E7) return "E7";
87 else if (tt == E8) return "E8";
88 // QZSS
89 else if (tt == J1) return "J1";
90 else if (tt == J2) return "J2";
91 else if (tt == J5) return "J5";
92 else if (tt == J6) return "J6";
93 // BDS
94 else if (tt == C2) return "C2";
95 else if (tt == C1) return "C1";
96 else if (tt == C5) return "C5";
97 else if (tt == C7) return "C7";
98 else if (tt == C8) return "C8";
99 else if (tt == C6) return "C6";
100 // IRNSS
101 else if (tt == I5) return "I5";
102 else if (tt == I9) return "I9";
103 // SBAS
104 else if (tt == S1) return "S1";
105 else if (tt == S5) return "S5";
106 return std::string();
107 }
108 static enum type toInt(std::string s) {
109 // GPS
110 if (s == "G1") return G1;
111 else if (s == "G2") return G2;
112 else if (s == "G5") return G5;
113 // GLONASS
114 else if (s == "R1") return R1;
115 else if (s == "R2") return R2;
116 else if (s == "R3") return R3;
117 // Galileo
118 else if (s == "E1") return E1;
119 else if (s == "E5") return E5;
120 else if (s == "E6") return E6;
121 else if (s == "E7") return E7;
122 else if (s == "E8") return E8;
123 // QZSS
124 else if (s == "J1") return J1;
125 else if (s == "J2") return J2;
126 else if (s == "J5") return J5;
127 else if (s == "J6") return J6;
128 // BDS
129 else if (s == "C2") return C2;
130 else if (s == "C1") return C1;
131 else if (s == "C5") return C5;
132 else if (s == "C7") return C7;
133 else if (s == "C8") return C8;
134 else if (s == "C6") return C6;
135 // IRNSS
136 else if (s == "I5") return I5;
137 else if (s == "I9") return I9;
138 // SBAS
139 else if (s == "S1") return S1;
140 else if (s == "S5") return S5;
141 return type();
142 }
143};
144
145class t_CST {
146 public:
147 static double freq(t_frequency::type fType, int slotNum);
148 static double lambda(t_frequency::type fType, int slotNum);
149
150 static const double c;
151 static const double omega;
152 static const double aell;
153 static const double fInv;
154 static const double rgeoc;
155};
156
157
158#endif
Note: See TracBrowser for help on using the repository browser.