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

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

updated RINEX obs codes

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,
35 // GPS
36 G1,
37 G2,
38 G5,
39 // GLONASS
40 R1, // G1
41 // R1a,// G1a / 1600.995
42 R2, // G2
43// R2a,// G1b / 1248.06
44 R3, // G3 / 1202.025
45 // Galileo
[8168]46 E1, // E1 / 1575.42
47 E5, // E5a / 1176.45
48 E7, // E5b / 1207.140
49 E8, // E5(E5a+E5b) / 1191.795
[6319]50 E6, // E6 / 1278.75
[8407]51 // QZSS
[6405]52 J1, // 1575.42
53 J2, // 1227.60
54 J5, // 1176.45
[8407]55 J6, // 1278.75
56 // BDS
[6817]57 C2, // 1561.098
[8407]58 C1, // 1575.42
59 C5, // 1176.45
[6405]60 C7, // 1207.14
61 C6, // 1268.52
[8407]62 // IRNSS
[8168]63 I5, // 1176.45
64 I9, // 2492.028
[8407]65 // SBAS
66 S1, // 1575.42
67 S5, // 1176.45
[6017]68 max};
69
70 static std::string toString(type tt) {
[8407]71 // GPS
[6017]72 if (tt == G1) return "G1";
73 else if (tt == G2) return "G2";
74 else if (tt == G5) return "G5";
[8407]75 // GLONASS
[6017]76 else if (tt == R1) return "R1";
[8407]77// else if (tt == R1a) return "R5";
[6017]78 else if (tt == R2) return "R2";
[8407]79// else if (tt == R2a) return "R7";
80 else if (tt == R3) return "R3";
81 // Galileo
[6017]82 else if (tt == E1) return "E1";
83 else if (tt == E5) return "E5";
84 else if (tt == E6) return "E6";
85 else if (tt == E7) return "E7";
86 else if (tt == E8) return "E8";
[8407]87 // QZSS
[6319]88 else if (tt == J1) return "J1";
89 else if (tt == J2) return "J2";
90 else if (tt == J5) return "J5";
91 else if (tt == J6) return "J6";
[8407]92 // BDS
[6817]93 else if (tt == C2) return "C2";
[8407]94 else if (tt == C1) return "C1";
95 else if (tt == C5) return "C5";
[6319]96 else if (tt == C7) return "C7";
97 else if (tt == C6) return "C6";
[8407]98 // IRNSS
[8168]99 else if (tt == I5) return "I5";
100 else if (tt == I9) return "I9";
[8407]101 // SBAS
102 else if (tt == S1) return "S1";
103 else if (tt == S5) return "S5";
[6017]104 return std::string();
[4265]105 }
[6560]106 static enum type toInt(std::string s) {
[8407]107 // GPS
[6560]108 if (s == "G1") return G1;
109 else if (s == "G2") return G2;
110 else if (s == "G5") return G5;
[8407]111 // GLONASS
[6560]112 else if (s == "R1") return R1;
113 else if (s == "R2") return R2;
[8407]114 else if (s == "R3") return R3;
115 // Galileo
[6560]116 else if (s == "E1") return E1;
117 else if (s == "E5") return E5;
118 else if (s == "E6") return E6;
119 else if (s == "E7") return E7;
120 else if (s == "E8") return E8;
[8407]121 // QZSS
[6560]122 else if (s == "J1") return J1;
123 else if (s == "J2") return J2;
124 else if (s == "J5") return J5;
125 else if (s == "J6") return J6;
[8407]126 // BDS
[6817]127 else if (s == "C2") return C2;
[8407]128 else if (s == "C1") return C1;
129 else if (s == "C5") return C5;
[6560]130 else if (s == "C7") return C7;
131 else if (s == "C6") return C6;
[8407]132 // IRNSS
[8168]133 else if (s == "I5") return I5;
134 else if (s == "I9") return I9;
[8407]135 // SBAS
136 else if (s == "S1") return S1;
137 else if (s == "S5") return S5;
[6560]138 return type();
139 }
[6017]140};
[4265]141
[6017]142class t_CST {
143 public:
144 static double freq(t_frequency::type fType, int slotNum);
145 static double lambda(t_frequency::type fType, int slotNum);
146
[4265]147 static const double c;
148 static const double omega;
149 static const double aell;
150 static const double fInv;
[7243]151 static const double rgeoc;
[126]152};
153
154
155#endif
Note: See TracBrowser for help on using the repository browser.