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 |
|
---|
30 | enum t_irc {failure = -1, success, fatal}; // return code
|
---|
31 |
|
---|
32 | class t_frequency {
|
---|
33 | public:
|
---|
34 | enum type {dummy = 0, G1, G2, G5, R1, R2,
|
---|
35 | E1, // E1 / 1575.42
|
---|
36 | E5, // E5a / 1176.45
|
---|
37 | E7, // E5b / 1207.140
|
---|
38 | E8, // E5(E5a+E5b) / 1191.795
|
---|
39 | E6, // E6 / 1278.75
|
---|
40 | J1, // 1575.42
|
---|
41 | J2, // 1227.60
|
---|
42 | J5, // 1176.45
|
---|
43 | J6, // Lex(6) 1278.75
|
---|
44 | S1, // 1575.42
|
---|
45 | S5, // 1176.45
|
---|
46 | C2, // 1561.098
|
---|
47 | C7, // 1207.14
|
---|
48 | C6, // 1268.52
|
---|
49 | I5, // 1176.45
|
---|
50 | I9, // 2492.028
|
---|
51 | max};
|
---|
52 |
|
---|
53 | static std::string toString(type tt) {
|
---|
54 | if (tt == G1) return "G1";
|
---|
55 | else if (tt == G2) return "G2";
|
---|
56 | else if (tt == G5) return "G5";
|
---|
57 | else if (tt == R1) return "R1";
|
---|
58 | else if (tt == R2) return "R2";
|
---|
59 | else if (tt == E1) return "E1";
|
---|
60 | else if (tt == E5) return "E5";
|
---|
61 | else if (tt == E6) return "E6";
|
---|
62 | else if (tt == E7) return "E7";
|
---|
63 | else if (tt == E8) return "E8";
|
---|
64 | else if (tt == J1) return "J1";
|
---|
65 | else if (tt == J2) return "J2";
|
---|
66 | else if (tt == J5) return "J5";
|
---|
67 | else if (tt == J6) return "J6";
|
---|
68 | else if (tt == S1) return "S1";
|
---|
69 | else if (tt == S5) return "S5";
|
---|
70 | else if (tt == C2) return "C2";
|
---|
71 | else if (tt == C7) return "C7";
|
---|
72 | else if (tt == C6) return "C6";
|
---|
73 | else if (tt == I5) return "I5";
|
---|
74 | else if (tt == I9) return "I9";
|
---|
75 | return std::string();
|
---|
76 | }
|
---|
77 | static enum type toInt(std::string s) {
|
---|
78 | if (s == "G1") return G1;
|
---|
79 | else if (s == "G2") return G2;
|
---|
80 | else if (s == "G5") return G5;
|
---|
81 | else if (s == "R1") return R1;
|
---|
82 | else if (s == "R2") return R2;
|
---|
83 | else if (s == "E1") return E1;
|
---|
84 | else if (s == "E5") return E5;
|
---|
85 | else if (s == "E6") return E6;
|
---|
86 | else if (s == "E7") return E7;
|
---|
87 | else if (s == "E8") return E8;
|
---|
88 | else if (s == "J1") return J1;
|
---|
89 | else if (s == "J2") return J2;
|
---|
90 | else if (s == "J5") return J5;
|
---|
91 | else if (s == "J6") return J6;
|
---|
92 | else if (s == "S1") return S1;
|
---|
93 | else if (s == "S5") return S5;
|
---|
94 | else if (s == "C2") return C2;
|
---|
95 | else if (s == "C7") return C7;
|
---|
96 | else if (s == "C6") return C6;
|
---|
97 | else if (s == "I5") return I5;
|
---|
98 | else if (s == "I9") return I9;
|
---|
99 | return type();
|
---|
100 | }
|
---|
101 | };
|
---|
102 |
|
---|
103 | class t_CST {
|
---|
104 | public:
|
---|
105 | static double freq(t_frequency::type fType, int slotNum);
|
---|
106 | static double lambda(t_frequency::type fType, int slotNum);
|
---|
107 |
|
---|
108 | static const double c;
|
---|
109 | static const double omega;
|
---|
110 | static const double aell;
|
---|
111 | static const double fInv;
|
---|
112 | static const double rgeoc;
|
---|
113 | };
|
---|
114 |
|
---|
115 |
|
---|
116 | #endif
|
---|