source: ntrip/trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.h@ 9050

Last change on this file since 9050 was 9050, checked in by stuerze, 21 months ago

minor changes

  • Property svn:executable set to *
File size: 8.2 KB
Line 
1#ifndef RTCM3_CLOCK_ORBIT_IGS_H
2#define RTCM3_CLOCK_ORBIT_IGS_H
3
4/* Programheader
5
6 Name: clock_orbit_igs.h
7 Project: RTCM3
8 Version: $Id: clock_orbit_igs.h 8966 2020-07-01 07:48:35Z stuerze $
9 Authors: Dirk Stöcker, Andrea Stürze
10 Description: state space approach: IGS
11 */
12#include <QDebug>
13#include <string.h>
14#include "clock_orbit.h"
15
16class SsrCorrIgs: public SsrCorr {
17 //Q_OBJECT
18
19public:
20 SsrCorrIgs() {qDebug() << "SsrCorrIgs()";
21 setCorBase();
22 setCorOffset();
23 setCoType();
24 setCbType();
25 setPbType();
26 setVtecType();
27 setCodeType();
28
29 satoffset << CLOCKORBIT_OFFSETGPS
30 << CLOCKORBIT_OFFSETGLONASS
31 << CLOCKORBIT_OFFSETGALILEO
32 << CLOCKORBIT_OFFSETQZSS
33 << CLOCKORBIT_OFFSETSBAS
34 << CLOCKORBIT_OFFSETBDS
35 << CLOCKORBIT_COUNTSAT;
36 };
37
38 ~SsrCorrIgs() {};
39
40 void setCorBase() {
41 COBBASE_GPS = 21;
42 COBBASE_GLONASS = 41;
43 COBBASE_GALILEO = 61;
44 COBBASE_QZSS = 81;
45 COBBASE_BDS = 101;
46 COBBASE_SBAS = 121;
47 COBBASE_NUM = 6;
48
49 corbase << COBBASE_GPS
50 << COBBASE_GLONASS
51 << COBBASE_GALILEO
52 << COBBASE_QZSS
53 << COBBASE_SBAS
54 << COBBASE_BDS;
55 }
56
57 void setCorOffset() {
58 COBOFS_ORBIT = 0; // GPS: IM21
59 COBOFS_CLOCK = 1; // GPS: IM22
60 COBOFS_COMBINED = 2; // GPS: IM23
61 COBOFS_HR = 3; // GPS: IM24
62 COBOFS_CBIAS = 4; // GPS: IM25
63 COBOFS_PBIAS = 5; // GPS: IM26
64 COBOFS_URA = 6; // GPS: IM27
65 COBOFS_NUM = 7;
66 };
67
68 void setCoType() {
69 COTYPE_GPSORBIT = COBBASE_GPS + COBOFS_ORBIT;
70 COTYPE_GPSCLOCK = COTYPE_GPSORBIT + 1;
71 COTYPE_GPSCOMBINED = COBBASE_GPS + COBOFS_COMBINED;
72 COTYPE_GPSHR = COTYPE_GPSCOMBINED + 1;
73 COTYPE_GPSURA = COBBASE_GPS + COBOFS_URA;
74
75 COTYPE_GLONASSORBIT = COBBASE_GLONASS + COBOFS_ORBIT;
76 COTYPE_GLONASSCLOCK = COTYPE_GLONASSORBIT + 1;
77 COTYPE_GLONASSCOMBINED = COBBASE_GLONASS + COBOFS_COMBINED,
78 COTYPE_GLONASSHR = COTYPE_GLONASSCOMBINED + 1;
79 COTYPE_GLONASSURA = COBBASE_GLONASS + COBOFS_URA,
80
81 COTYPE_GALILEOORBIT = COBBASE_GALILEO + COBOFS_ORBIT;
82 COTYPE_GALILEOCLOCK = COTYPE_GALILEOORBIT + 1;
83 COTYPE_GALILEOCOMBINED = COBBASE_GALILEO + COBOFS_COMBINED,
84 COTYPE_GALILEOHR = COTYPE_GALILEOCOMBINED + 1;
85 COTYPE_GALILEOURA = COBBASE_GALILEO + COBOFS_URA;
86
87 COTYPE_QZSSORBIT = COBBASE_QZSS + COBOFS_ORBIT;
88 COTYPE_QZSSCLOCK = COTYPE_QZSSORBIT + 1;
89 COTYPE_QZSSCOMBINED = COBBASE_QZSS + COBOFS_COMBINED;
90 COTYPE_QZSSHR = COTYPE_QZSSCOMBINED + 1;
91 COTYPE_QZSSURA = COBBASE_QZSS + COBOFS_URA;
92
93 COTYPE_SBASORBIT = COBBASE_SBAS + COBOFS_ORBIT;
94 COTYPE_SBASCLOCK = COTYPE_SBASORBIT + 1;
95 COTYPE_SBASCOMBINED = COBBASE_SBAS + COBOFS_COMBINED;
96 COTYPE_SBASHR = COTYPE_SBASCOMBINED + 1;
97 COTYPE_SBASURA = COBBASE_SBAS + COBOFS_URA;
98
99 COTYPE_BDSORBIT = COBBASE_BDS + COBOFS_ORBIT;
100 COTYPE_BDSCLOCK = COTYPE_BDSORBIT + 1;
101 COTYPE_BDSCOMBINED = COBBASE_BDS + COBOFS_COMBINED;
102 COTYPE_BDSHR = COTYPE_BDSCOMBINED + 1;
103 COTYPE_BDSURA = COBBASE_BDS + COBOFS_URA;
104
105 COTYPE_AUTO = 0;
106 };
107
108 void setCbType() {
109 CBTYPE_GPS = COBBASE_GPS + COBOFS_CBIAS;
110 CBTYPE_GLONASS = COBBASE_GLONASS + COBOFS_CBIAS;
111 CBTYPE_GALILEO = COBBASE_GALILEO + COBOFS_CBIAS;
112 CBTYPE_QZSS = COBBASE_QZSS + COBOFS_CBIAS;
113 CBTYPE_SBAS = COBBASE_SBAS + COBOFS_CBIAS;
114 CBTYPE_BDS = COBBASE_BDS + COBOFS_CBIAS;
115 CBTYPE_AUTO = 0;
116 };
117
118 void setPbType() {
119 PBTYPE_GPS = COBBASE_GPS + COBOFS_PBIAS;
120 PBTYPE_GLONASS = COBBASE_GLONASS + COBOFS_PBIAS;
121 PBTYPE_GALILEO = COBBASE_GALILEO + COBOFS_PBIAS;
122 PBTYPE_QZSS = COBBASE_QZSS + COBOFS_PBIAS;
123 PBTYPE_SBAS = COBBASE_SBAS + COBOFS_PBIAS;
124 PBTYPE_BDS = COBBASE_BDS + COBOFS_PBIAS;
125 PBTYPE_AUTO = 0;
126 };
127
128 void setVtecType() {
129 VTEC_BASE = 201;
130 };
131
132 void setCodeType() {
133 RESERVED = 99;
134
135 CODETYPE_GPS_L1_CA = 0;
136 CODETYPE_GPS_L1_P = 1;
137 CODETYPE_GPS_L1_Z = 2;
138 CODETYPE_GPS_L1C_D = 3;
139 CODETYPE_GPS_L1C_P = 4;
140 CODETYPE_GPS_L2_CA = 5;
141 CODETYPE_GPS_SEMI_CODELESS = 6;
142 CODETYPE_GPS_L2C_M = 7;
143 CODETYPE_GPS_L2C_L = 8;
144 //RESERVED = 9;
145 CODETYPE_GPS_L2_P = 10;
146 CODETYPE_GPS_L2_Z = 11;
147 //RESERVED = 12;
148 //RESERVED = 13;
149 CODETYPE_GPS_L5_I = 14;
150 CODETYPE_GPS_L5_Q = 15;
151
152
153
154
155
156 CODETYPE_GLONASS_L1_CA = 0;
157 CODETYPE_GLONASS_L1_P = 1;
158 CODETYPE_GLONASS_L2_CA = 2;
159 CODETYPE_GLONASS_L2_P = 3;
160 CODETYPE_GLONASS_L1a_OCd = 4;
161 CODETYPE_GLONASS_L1a_OCp = 5;
162 CODETYPE_GLONASS_L2a_CSI = 6;
163 CODETYPE_GLONASS_L2a_OCp = 7;
164 CODETYPE_GLONASS_L3_I = 8;
165 CODETYPE_GLONASS_L3_Q = 9;
166
167
168
169
170 CODETYPE_GALILEO_E1_A = 0;
171 CODETYPE_GALILEO_E1_B = 1;
172 CODETYPE_GALILEO_E1_C = 2;
173 //RESERVED_E1_BC = 3;
174 //RESERVED_E1_ABC = 4;
175 CODETYPE_GALILEO_E5A_I = 5;
176 CODETYPE_GALILEO_E5A_Q = 6;
177 //RESERVED_E5A_IQ = 7;
178 CODETYPE_GALILEO_E5B_I = 8;
179 CODETYPE_GALILEO_E5B_Q = 9;
180 //RESERVED_E5B_IQ = 10;
181 //RESERVED_E5_I = 11;
182 //RESERVED_E5_Q = 12;
183 //RESERVED_E5_IQ = 13;
184 CODETYPE_GALILEO_E6_A = 14;
185 CODETYPE_GALILEO_E6_B = 15;
186 CODETYPE_GALILEO_E6_C = 16;
187 //RESERVED_E6_BC = 17;
188 //RESERVED_E6_ABC = 18;
189
190 CODETYPE_QZSS_L1_CA = 0;
191 CODETYPE_QZSS_L1C_D = 1;
192 CODETYPE_QZSS_L1C_P = 2;
193 CODETYPE_QZSS_L2C_M = 3;
194 CODETYPE_QZSS_L2C_L = 4;
195 //RESEVED_L2C_ML = 5;
196 CODETYPE_QZSS_L5_I = 6;
197 CODETYPE_QZSS_L5_Q = 7;
198 //RESERVED_L5_IQ = 8;
199 CODETYPE_QZSS_L6_D = 9;
200 CODETYPE_QZSS_L6_P = 10;
201 //RESERVED_L6_DP = 11;
202 //RESERVED_L1C_DP = 12;
203 //RESERVED_L1_S = 13;
204 //RESERVED_L5_D = 14;
205 //RESERVED_L5_P = 15;
206 //RESERVED_L5_DP = 16;
207 CODETYPE_QZSS_L6_E = 17;
208 //RESERVED_L6_DE = 18;
209
210 CODETYPE_SBAS_L1_CA = 0;
211 CODETYPE_SBAS_L5_I = 1;
212 CODETYPE_SBAS_L5_Q = 2;
213 //RESERVED_CODETYPE_SBAS_L5_IQ = 3;
214
215 CODETYPE_BDS_B1_I = 0;
216 CODETYPE_BDS_B1_Q = 1;
217 //RESERVED_CODETYPE_BDS_B1_IQ = 2;
218 CODETYPE_BDS_B3_I = 3;
219 CODETYPE_BDS_B3_Q = 4;
220 //RESERVED_CODETYPE_BDS_B3_IQ = 5;
221 CODETYPE_BDS_B2_I = 6;
222 CODETYPE_BDS_B2_Q = 7;
223 //RESERVED_CODETYPE_BDS_B2_IQ = 8;
224 CODETYPE_BDS_B1a_D = 9;
225 CODETYPE_BDS_B1a_P = 10;
226 //RESERVED_CODETYPE_BDS_B1a_DP = 11;
227 CODETYPE_BDS_B2a_D = 12;
228 CODETYPE_BDS_B2a_P = 13;
229 //RESEVED_CODETYPE_BDS_B2a_DP = 14;
230 CODETYPE_BDS_B1_A = 15; //NEW 1A
231 //RESERVED = 16;
232 //RESERVED = 17;
233 CODETYPE_BDS_B3_A = 18; //NEW 6A
234 };
235
236 std::string codeTypeToRnxType(char system, CodeType type);
237 SsrCorr::CodeType rnxTypeToCodeType(char system, std::string type);
238
239 size_t MakeClockOrbit(const struct ClockOrbit *co, ClockOrbitType type,
240 int moremessagesfollow, char *buffer, size_t size);
241 size_t MakeCodeBias(const struct CodeBias *b, CodeBiasType type,
242 int moremessagesfollow, char *buffer, size_t size);
243 size_t MakePhaseBias(const struct PhaseBias *b, PhaseBiasType type,
244 int moremessagesfollow, char *buffer, size_t size);
245 size_t MakeVTEC(const struct VTEC *v, int moremessagesfollow, char *buffer,
246 size_t size);
247 enum GCOB_RETURN GetSSR(struct ClockOrbit *co, struct CodeBias *b,
248 struct VTEC *v, struct PhaseBias *pb, const char *buffer, size_t size,
249 int *bytesused);
250 };
251
252#endif /* RTCM3_CLOCK_ORBIT_IGS_H */
Note: See TracBrowser for help on using the repository browser.