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

Last change on this file since 10393 was 10251, checked in by stuerze, 12 months ago

changes regarding PPP: allow single frequency PPP and allow to select the frequency bands that are used

File size: 4.7 KB
RevLine 
[280]1// Part of BNC, a utility for retrieving decoding and
[464]2// converting GNSS data streams from NTRIP broadcasters.
[280]3//
[464]4// Copyright (C) 2007
[280]5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
[464]7// Czech Technical University Prague, Department of Geodesy
[280]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.
[464]24
[6017]25#include <string>
26
[126]27#ifndef BNCCONST_H
28#define BNCCONST_H
29
[192]30enum t_irc {failure = -1, success, fatal}; // return code
[138]31
[6017]32class t_frequency {
[4265]33 public:
[8407]34 enum type {dummy = 0,
[10251]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, // G2a / 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 / 1561.098 (BDS 2/3 signals)
58 C1, // B1C, B1A / 1575.42 (BDS-3 signals)
59 C5, // B2a / 1176.45 (BDS-3 signals)
60 C7, // B2, B2b / 1207.14 (BDS-2 signals)
61 C8, // B2(B2a+B2b) / 1191.795 (BDS-3 signals)
62 C6, // B3,B3A / 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};
[6017]70
71 static std::string toString(type tt) {
[8407]72 // GPS
[6017]73 if (tt == G1) return "G1";
74 else if (tt == G2) return "G2";
75 else if (tt == G5) return "G5";
[8407]76 // GLONASS
[6017]77 else if (tt == R1) return "R1";
[8629]78 else if (tt == R4) return "R4";
[6017]79 else if (tt == R2) return "R2";
[8629]80 else if (tt == R6) return "R6";
[8407]81 else if (tt == R3) return "R3";
82 // Galileo
[6017]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";
[8407]88 // QZSS
[6319]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";
[8407]93 // BDS
[6817]94 else if (tt == C2) return "C2";
[8407]95 else if (tt == C1) return "C1";
96 else if (tt == C5) return "C5";
[6319]97 else if (tt == C7) return "C7";
[8629]98 else if (tt == C8) return "C8";
[6319]99 else if (tt == C6) return "C6";
[8407]100 // IRNSS
[8168]101 else if (tt == I5) return "I5";
102 else if (tt == I9) return "I9";
[8407]103 // SBAS
104 else if (tt == S1) return "S1";
105 else if (tt == S5) return "S5";
[6017]106 return std::string();
[4265]107 }
[6560]108 static enum type toInt(std::string s) {
[8407]109 // GPS
[6560]110 if (s == "G1") return G1;
111 else if (s == "G2") return G2;
112 else if (s == "G5") return G5;
[8407]113 // GLONASS
[6560]114 else if (s == "R1") return R1;
115 else if (s == "R2") return R2;
[8407]116 else if (s == "R3") return R3;
117 // Galileo
[6560]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;
[8407]123 // QZSS
[6560]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;
[8407]128 // BDS
[6817]129 else if (s == "C2") return C2;
[8407]130 else if (s == "C1") return C1;
131 else if (s == "C5") return C5;
[6560]132 else if (s == "C7") return C7;
[8629]133 else if (s == "C8") return C8;
[6560]134 else if (s == "C6") return C6;
[8407]135 // IRNSS
[8168]136 else if (s == "I5") return I5;
137 else if (s == "I9") return I9;
[8407]138 // SBAS
139 else if (s == "S1") return S1;
140 else if (s == "S5") return S5;
[6560]141 return type();
142 }
[6017]143};
[4265]144
[6017]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
[4265]150 static const double c;
151 static const double omega;
152 static const double aell;
153 static const double fInv;
[7243]154 static const double rgeoc;
[126]155};
156
157
158#endif
Note: See TracBrowser for help on using the repository browser.