51 #define LDEXP(x,y) ldexp(x,y)
53 #define LDEXP(x,y) std::ldexp(x,y)
87 { 0, 0, 0, 1.0L, 0,{ { 0, 0},{ 0, 0} } }
92 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
93 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
94 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
95 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
96 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
97 { 5, 0, 0, 1.0L, 0,{ { 61,10},{ 0, 0} } },
98 { 6, 0, 0, 1.0L, 0,{ { 71, 2},{ 0, 0} } },
99 { 7, 0, 0, 1.0L, 0,{ { 73, 4},{ 0, 0} } },
100 { 8, 0, 0, 1.0L, 0,{ { 77, 6},{ 0, 0} } },
101 { 9, 11, 0, 1.0L, 0,{ { 83, 2},{211, 8} } },
102 { 10, 0, 0, 1.0L, 0,{ { 91, 1},{ 0, 0} } },
103 { 11, -31, 0, 1.0L, 1,{ {197, 8},{ 0, 0} } },
104 { 12, 4, 0, 1.0L, 0,{ {219,16},{ 0, 0} } },
105 { 13, -55, 0, 1.0L, 1,{ {241, 8},{ 0, 0} } },
106 { 14, -43, 0, 1.0L, 1,{ {249,16},{ 0, 0} } },
107 { 15, -31, 0, 1.0L, 1,{ {271,22},{ 0, 0} } },
112 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
113 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
114 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
115 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
116 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
117 { 5, 11, 0, 1.0L, 0,{ { 61, 8},{ 0, 0} } },
118 { 6, -5, 0, 1.0L, 1,{ { 69,16},{ 0, 0} } },
119 { 7, -43, 1, 1.0L, 1,{ { 91,16},{ 0, 0} } },
120 { 8, -31, 1, 1.0L, 1,{ {107, 8},{121,24} } },
121 { 9, -29, 0, 1.0L, 1,{ {151,16},{ 0, 0} } },
122 { 10, -33, 0, 1.0L, 0,{ {167, 8},{181,24} } },
123 { 11, -29, 0, 1.0L, 1,{ {211,16},{ 0, 0} } },
124 { 12, -19, 0, 1.0L, 0,{ {227, 8},{241,24} } },
125 { 13, 4, 0, 1.0L, 0,{ {271,16},{ 0, 0} } },
126 { 14, 0, 0, 1.0L, 0,{ {287, 1},{ 0, 0} } },
127 { 15, 0, 0, 900.0L, 0,{ {288, 5},{ 0, 0} } },
132 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
133 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
134 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
135 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
136 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
137 { 5, -29, 0, 1.0L, 1,{ { 61,16},{ 0, 0} } },
138 { 6, -31, 1, 1.0L, 1,{ { 77, 8},{ 91,24} } },
139 { 7, -29, 0, 1.0L, 1,{ {121,16},{ 0, 0} } },
140 { 8, -31, 1, 1.0L, 1,{ {137, 8},{151,24} } },
141 { 9, -5, 0, 1.0L, 1,{ {181,16},{ 0, 0} } },
142 { 10, -31, 1, 1.0L, 1,{ {197, 8},{211,24} } },
143 { 11, -43, 1, 1.0L, 1,{ {241,24},{ 0, 0} } },
144 { 12, 11, 0, 1.0L, 0,{ {271, 8},{ 0, 0} } },
145 { 13, -43, 1, 1.0L, 1,{ {279,14},{ 0, 0} } },
150 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
151 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
152 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
153 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
154 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
155 { 5, 0, 0, 1.0L, 0,{ { 61, 2},{ 0, 0} } },
156 { 6, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
157 { 7, -21, 0, 1.0L, 0,{ { 69,16},{ 0, 0} } },
158 { 8, 12, 0, 1.0L, 0,{ { 91, 8},{ 0, 0} } },
159 { 9, -19, 1, 1.0L, 1,{ { 99,16},{ 0, 0} } },
160 { 10, -38, 1, 1.0L, 1,{ {121,16},{ 0, 0} } },
161 { 11, 0, 0, 1.0L, 0,{ {137, 8},{ 0, 0} } },
162 { 12, -11, 0, 1.0L, 0,{ {151,24},{ 0, 0} } },
163 { 13, -23, 1, 1.0L, 1,{ {181,24},{ 0, 0} } },
164 { 14, -23, 1, 1.0L, 1,{ {211,24},{ 0, 0} } },
165 { 15, -23, 1, 1.0L, 1,{ {241,24},{ 0, 0} } },
166 { 16, -20, 0, 1.0L, 1,{ {271, 8},{290, 3} } },
167 { 17, -38, 0, 1.0L, 1,{ {279,11},{ 0, 0} } },
168 { 18, 0, 0, 1.0L, 0,{ { 0, 0},{ 0, 0} } },
169 { 19, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
174 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
175 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
176 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
177 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
178 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
179 { 5, 0, 0, 1.0L, 0,{ { 61, 2},{ 0, 0} } },
180 { 6, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
181 { 7, 0, 0, 1.0L, 0,{ { 77, 8},{ 0, 0} } },
182 { 8, 0, 0, 1.0L, 0,{ { 91, 6},{ 0, 0} } },
183 { 9, 0, 0, 1.0L, 0,{ { 97, 6},{ 0, 0} } },
184 { 10, 0, 0, 1.0L, 0,{ {103, 6},{ 0, 0} } },
185 { 11, 0, 0, 1.0L, 0,{ {109, 6},{ 0, 0} } },
186 { 12, 0, 0, 1.0L, 0,{ {121, 6},{ 0, 0} } },
187 { 13, 0, 0, 1.0L, 0,{ {127, 6},{ 0, 0} } },
188 { 14, 0, 0, 1.0L, 0,{ {133, 6},{ 0, 0} } },
189 { 15, 0, 0, 1.0L, 0,{ {139, 6},{ 0, 0} } },
190 { 16, 0, 0, 1.0L, 0,{ {151, 6},{ 0, 0} } },
191 { 17, 0, 0, 1.0L, 0,{ {157, 6},{ 0, 0} } },
192 { 18, 0, 0, 1.0L, 0,{ {163, 6},{ 0, 0} } },
193 { 19, 0, 0, 1.0L, 0,{ {169, 6},{ 0, 0} } },
194 { 20, 0, 0, 1.0L, 0,{ {181, 6},{ 0, 0} } },
195 { 21, 0, 0, 1.0L, 0,{ {187, 6},{ 0, 0} } },
196 { 22, 0, 0, 1.0L, 0,{ {193, 6},{ 0, 0} } },
197 { 23, 0, 0, 1.0L, 0,{ {199, 6},{ 0, 0} } },
198 { 24, 0, 0, 1.0L, 0,{ {211, 6},{ 0, 0} } },
199 { 25, 0, 0, 1.0L, 0,{ {217, 6},{ 0, 0} } },
200 { 26, 0, 0, 1.0L, 0,{ {223, 6},{ 0, 0} } },
201 { 27, 0, 0, 1.0L, 0,{ {229, 6},{ 0, 0} } },
202 { 28, 0, 0, 1.0L, 0,{ {241, 6},{ 0, 0} } },
203 { 29, 0, 0, 1.0L, 0,{ {247, 6},{ 0, 0} } },
204 { 30, 0, 0, 1.0L, 0,{ {253, 6},{ 0, 0} } },
205 { 31, 0, 0, 1.0L, 0,{ {259, 6},{ 0, 0} } },
210 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
211 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
212 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
213 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
214 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
215 { 5, 0, 0, 1.0L, 0,{ { 61, 2},{ 0, 0} } },
216 { 6, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
217 { 7, 0, 0, 1.0L, 0,{ { 69,16},{ 0, 0} } },
218 { 8, 0, 0, 1.0L, 0,{ { 91,24},{ 0, 0} } },
219 { 9, 0, 0, 1.0L, 0,{ {121,24},{ 0, 0} } },
220 { 10, 0, 0, 1.0L, 0,{ {151,24},{ 0, 0} } },
221 { 11, 0, 0, 1.0L, 0,{ {181,24},{ 0, 0} } },
222 { 12, 0, 0, 1.0L, 0,{ {211,24},{ 0, 0} } },
223 { 13, 0, 0, 1.0L, 0,{ {241, 8},{ 0, 0} } },
224 { 14, 0, 0, 1.0L, 0,{ {249,16},{ 0, 0} } },
229 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
230 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
231 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
232 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
233 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
234 { 5, 0, 0, 1.0L, 0,{ { 61, 2},{ 0, 0} } },
235 { 6, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
236 { 7, 0, 0, 1.0L, 0,{ { 69,16},{ 0, 0} } },
237 { 8, 0, 0, 1.0L, 0,{ { 91,24},{ 0, 0} } },
238 { 9, 0, 0, 1.0L, 0,{ {121,24},{ 0, 0} } },
239 { 10, 0, 0, 1.0L, 0,{ {151,24},{ 0, 0} } },
240 { 11, 0, 0, 1.0L, 0,{ {181,24},{ 0, 0} } },
241 { 12, 0, 0, 1.0L, 0,{ {211,24},{ 0, 0} } },
242 { 13, 0, 0, 1.0L, 0,{ {241, 8},{ 0, 0} } },
243 { 14, 0, 0, 1.0L, 0,{ {249,16},{ 0, 0} } },
248 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
249 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
250 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
251 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
252 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
253 { 5, 0, 0, 1.0L, 0,{ { 61, 2},{ 0, 0} } },
254 { 6, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
255 { 7, -30, 0, 1.0L, 1,{ { 69, 8},{ 0, 0} } },
256 { 8, -27, -1, 1.0L, 1,{ { 77, 8},{ 0, 0} } },
257 { 9, -24, -2, 1.0L, 1,{ { 91, 8},{ 0, 0} } },
258 { 10, -24, -3, 1.0L, 1,{ { 99, 8},{ 0, 0} } },
259 { 11, 11, 0, 1.0L, 1,{ {107, 8},{ 0, 0} } },
260 { 12, 14, -1, 1.0L, 1,{ {121, 8},{ 0, 0} } },
261 { 13, 16, -2, 1.0L, 1,{ {129, 8},{ 0, 0} } },
262 { 14, 16, -3, 1.0L, 1,{ {137, 8},{ 0, 0} } },
263 { 15, -30, 0, 1.0L, 1,{ {181,24},{211, 8} } },
264 { 16, -50, 0, 1.0L, 1,{ {151,24},{ 0, 0} } },
265 { 17, 12, 0, 1.0L, 0,{ {219, 8},{ 0, 0} } },
266 { 18, 0, 0, 1.0L, 0,{ {227, 8},{ 0, 0} } },
267 { 19, 0, 0, 1.0L, 1,{ {241, 8},{ 0, 0} } },
268 { 20, 0, 0, 1.0L, 0,{ {249, 8},{ 0, 0} } },
269 { 21, 0, 0, 1.0L, 0,{ {257, 8},{ 0, 0} } },
270 { 22, 0, 0, 1.0L, 1,{ {271, 8},{ 0, 0} } },
275 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
276 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
277 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
278 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
279 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
280 { 5, 0, 0, 1.0L, 0,{ { 61, 2},{ 0, 0} } },
281 { 6, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
282 { 7, 0, 0, 1.0L, 0,{ { 69, 4},{ 0, 0} } },
283 { 8, 0, 0, 1.0L, 0,{ { 73, 4},{ 0, 0} } },
284 { 9, 0, 0, 1.0L, 0,{ { 77, 4},{ 0, 0} } },
285 { 10, 0, 0, 1.0L, 0,{ { 81, 4},{ 0, 0} } },
286 { 11, 0, 0, 1.0L, 0,{ { 91, 4},{ 0, 0} } },
287 { 12, 0, 0, 1.0L, 0,{ { 95, 4},{ 0, 0} } },
288 { 13, 0, 0, 1.0L, 0,{ { 99, 4},{ 0, 0} } },
289 { 14, 0, 0, 1.0L, 0,{ {103, 4},{ 0, 0} } },
290 { 15, 0, 0, 1.0L, 0,{ {107, 4},{ 0, 0} } },
291 { 16, 0, 0, 1.0L, 0,{ {111, 4},{ 0, 0} } },
292 { 17, 0, 0, 1.0L, 0,{ {121, 4},{ 0, 0} } },
293 { 18, 0, 0, 1.0L, 0,{ {125, 4},{ 0, 0} } },
294 { 19, 0, 0, 1.0L, 0,{ {129, 4},{ 0, 0} } },
295 { 20, 0, 0, 1.0L, 0,{ {133, 4},{ 0, 0} } },
296 { 21, 0, 0, 1.0L, 0,{ {137, 4},{ 0, 0} } },
297 { 22, 0, 0, 1.0L, 0,{ {141, 4},{ 0, 0} } },
298 { 23, 0, 0, 1.0L, 0,{ {151, 4},{ 0, 0} } },
299 { 24, 0, 0, 1.0L, 0,{ {155, 4},{ 0, 0} } },
300 { 25, 0, 0, 1.0L, 0,{ {159, 4},{ 0, 0} } },
301 { 26, 0, 0, 1.0L, 0,{ {163, 4},{ 0, 0} } },
302 { 27, 0, 0, 1.0L, 0,{ {167, 4},{ 0, 0} } },
303 { 28, 0, 0, 1.0L, 0,{ {171, 4},{ 0, 0} } },
304 { 29, 0, 0, 1.0L, 0,{ {181, 4},{ 0, 0} } },
305 { 30, 0, 0, 1.0L, 0,{ {185, 4},{ 0, 0} } },
306 { 31, 0, 0, 1.0L, 0,{ {189, 4},{ 0, 0} } },
307 { 32, 0, 0, 1.0L, 0,{ {193, 4},{ 0, 0} } },
308 { 33, 0, 0, 1.0L, 0,{ {197, 4},{ 0, 0} } },
309 { 34, 0, 0, 1.0L, 0,{ {201, 4},{ 0, 0} } },
310 { 35, 0, 0, 1.0L, 0,{ {211, 4},{ 0, 0} } },
311 { 36, 0, 0, 1.0L, 0,{ {215, 4},{ 0, 0} } },
312 { 37, 0, 0, 1.0L, 0,{ {219, 4},{ 0, 0} } },
313 { 38, 0, 0, 1.0L, 0,{ {223, 4},{ 0, 0} } },
314 { 39, 0, 0, 1.0L, 0,{ {229, 6},{ 0, 0} } },
315 { 40, 0, 0, 1.0L, 0,{ {241, 6},{ 0, 0} } },
316 { 41, 0, 0, 1.0L, 0,{ {247, 6},{ 0, 0} } },
317 { 42, 0, 0, 1.0L, 0,{ {253, 6},{ 0, 0} } },
318 { 43, 0, 0, 1.0L, 0,{ {259, 6},{ 0, 0} } },
319 { 44, 0, 0, 1.0L, 0,{ {271, 6},{ 0, 0} } },
320 { 45, 0, 0, 1.0L, 0,{ {277, 6},{ 0, 0} } },
321 { 46, 0, 0, 1.0L, 0,{ {283, 6},{ 0, 0} } },
326 { 0, 0, 0, 1.0L, 0,{ { 1, 8},{ 0, 0} } },
327 { 1, 0, 0, 1.0L, 0,{ { 9,14},{ 0, 0} } },
328 { 2, 0, 0, 6.0L, 0,{ { 31,17},{ 0, 0} } },
329 { 3, 0, 0, 1.0L, 0,{ { 48, 2},{ 0, 0} } },
330 { 4, 0, 0, 1.0L, 0,{ { 50, 3},{ 0, 0} } },
331 { 5, 0, 0, 1.0L, 0,{ { 61, 2},{ 0, 0} } },
332 { 6, 0, 0, 1.0L, 0,{ { 63, 6},{ 0, 0} } },
333 { 7, 0, 0, 1.0L, 0,{ { 69, 8},{ 0, 0} } },
334 { 8, 0, 0, 1.0L, 0,{ { 77, 8},{ 0, 0} } },
335 { 9, 0, 0, 1.0L, 0,{ { 91, 8},{ 0, 0} } },
336 { 10, 0, 0, 1.0L, 0,{ { 99, 8},{ 0, 0} } },
337 { 11, 0, 0, 1.0L, 0,{ {107, 8},{ 0, 0} } },
338 { 12, 0, 0, 1.0L, 0,{ {121, 8},{ 0, 0} } },
339 { 13, 0, 0, 1.0L, 0,{ {129, 8},{ 0, 0} } },
340 { 14, 0, 0, 1.0L, 0,{ {137, 8},{ 0, 0} } },
341 { 15, 0, 0, 1.0L, 0,{ {151, 8},{ 0, 0} } },
342 { 16, 0, 0, 1.0L, 0,{ {159, 8},{ 0, 0} } },
343 { 17, 0, 0, 1.0L, 0,{ {167, 8},{ 0, 0} } },
344 { 18, 0, 0, 1.0L, 0,{ {181, 8},{ 0, 0} } },
345 { 19, 0, 0, 1.0L, 0,{ {189, 8},{ 0, 0} } },
346 { 20, 0, 0, 1.0L, 0,{ {197, 8},{ 0, 0} } },
347 { 21, 0, 0, 1.0L, 0,{ {211, 8},{ 0, 0} } },
348 { 22, 0, 0, 1.0L, 0,{ {219, 8},{ 0, 0} } },
349 { 23, 0, 0, 1.0L, 0,{ {227, 8},{ 0, 0} } },
350 { 24, 0, 0, 1.0L, 0,{ {241, 8},{ 0, 0} } },
351 { 25, 0, 0, 1.0L, 0,{ {249, 8},{ 0, 0} } },
352 { 26, 0, 0, 1.0L, 0,{ {257, 8},{ 0, 0} } },
353 { 27, 0, 0, 1.0L, 0,{ {271, 8},{ 0, 0} } },
354 { 28, 0, 0, 1.0L, 0,{ {279, 8},{ 0, 0} } }
381 for (
int n=0;n<10;++n)
382 tinput[n] =
static_cast<uint32_t
>( input[n] );
383 short tgpsWeek = gpsWeek;
384 return( subframeConvert( tinput, tgpsWeek, output ));
392 short patId = -2, i = 2;
395 for (i=0; i< 20; i++)
399 if ((patId = getSubframePattern(input)) == 0)
412 output[18]=
static_cast<double>( gpsWeek );
418 if (!convert8bit(gpsWeek, &output[18]))
421 if (!convert8bit(gpsWeek, &output[20]))
428 short week10Bit =
static_cast<uint32_t
>( output[5] );
430 static_cast<double>( convertXBit(gpsWeek, week10Bit, BITS10) );
439 short tgpsWeek =
static_cast<short>( gpsWeek );
440 short toutput =
static_cast<short> ( *output );
441 short retArg = convertXBit( tgpsWeek, toutput, BITS8 );
442 *output =
static_cast<double>(retArg);
451 short tgpsWeek =
static_cast<short>( gpsWeek );
452 short toutput =
static_cast<short> ( *output );
453 short retArg = convertXBit( tgpsWeek, toutput, BITS10 );
454 *output =
static_cast<double>(retArg);
458 static short LIMIT[] = { 127, 511 };
459 static short RANGE[] = { 256, 1024 };
462 short incompleteGPSWeek,
465 short extension = fullGPSWeek - (fullGPSWeek %
RANGE[type]);
466 short target = extension + incompleteGPSWeek;
468 short diff = target - fullGPSWeek;
469 if (diff>
LIMIT[type])
470 target -=
RANGE[type];
471 else if (diff< -
LIMIT[type])
472 target +=
RANGE[type];
482 for (
int n=0;n<10;++n)
483 tinput[n] =
static_cast<uint32_t
>( input[n] );
484 return( getSubframePattern( tinput ));
494 = { 5, 6, 6, 6, 10, 8, 6, 7, 7, 7, 7, 7, 9 };
501 itemp &= 0x00000007L;
502 iret =
static_cast<short>( itemp );
504 if ( iret < 1 || iret > 5 )
513 itemp &= 0x0000003FL;
514 svid =
static_cast<short>( itemp );
518 iret = patId[
svid-51];
530 if ((svpgid >= 1) && (svpgid <= 24))
586 static const short sf4pg[25] = { 57, 25, 26, 27, 28, 57, 29, 30, 31, 32,
587 57, 62, 52, 53, 54, 57, 55, 56, 58, 59,
588 57, 60, 61, 62, 63 };
592 if ((page < 1) || (page > 25) || (subframe < 4) || (subframe > 5))
597 svpgid = sf4pg[page-1];
609 short& subframe,
short& page)
612 subframe = ((zcount % 20) / 4);
615 unsigned long mod500 = zcount % 500;
625 page = ((mod500 - 12) / 20) + 1;
628 page = (mod500 > 0) ? ((mod500 - 16) / 20) + 1 : 25;
661 uint32_t bmask[6] = { 0x3B1F3480L, 0x1D8F9A40L, 0x2EC7CD00L,
662 0x1763E680L, 0x2BB1F340L, 0x0B7A89C0L };
666 uint32_t D29 =
getd29(psfword);
667 uint32_t D30 =
getd30(psfword);
673 if (D30 && !knownUpright)
690 uint32_t bmask[6] = { 0x3B1F3480L, 0x1D8F9A40L, 0x2EC7CD00L,
691 0x1763E680L, 0x2BB1F340L, 0x0B7A89C0L };
695 uint32_t D29 =
getd29(psfword);
696 uint32_t D30 =
getd30(psfword);
717 for (
int n=0;n<10;++n)
temp[n] = input[n];
730 ((sf[0] & 0x0000003f) ==
computeParity(sf[0], 0, knownUpright)) &&
731 ((sf[1] & 0x0000003f) ==
computeParity(sf[1], sf[0], knownUpright)) &&
732 ((sf[2] & 0x0000003f) ==
computeParity(sf[2], sf[1], knownUpright)) &&
733 ((sf[3] & 0x0000003f) ==
computeParity(sf[3], sf[2], knownUpright)) &&
734 ((sf[4] & 0x0000003f) ==
computeParity(sf[4], sf[3], knownUpright)) &&
735 ((sf[5] & 0x0000003f) ==
computeParity(sf[5], sf[4], knownUpright)) &&
736 ((sf[6] & 0x0000003f) ==
computeParity(sf[6], sf[5], knownUpright)) &&
737 ((sf[7] & 0x0000003f) ==
computeParity(sf[7], sf[6], knownUpright)) &&
738 ((sf[8] & 0x0000003f) ==
computeParity(sf[8], sf[7], knownUpright)) &&
739 ((sf[9] & 0x0000003f) ==
computeParity(sf[9], sf[8], knownUpright));
748 short i, n, bit1, nword, nbit;
761 if (dq.fmt[n].startBit == 0)
763 bit1 = dq.fmt[n].startBit;
764 nword = (bit1-1) / 30;
765 nbit = (bit1 % 30) + 1;
767 b =
const_cast<uint32_t *
>( input ) + nword;
768 for (i=0;i<dq.fmt[n].numBits;i++)
771 mask = 0x80000000L >> nbit++;
785 nbit = 32 - (dq.fmt[0].numBits + dq.fmt[1].numBits);
794 dval = dval * dq.scale;
795 dval = dval *
PItab[ dq.powPI+3 ];
796 dval =
LDEXP(dval,dq.pow2);
797 output[dq.outIndex] = dval;
802 for(
short pattern = 1; pattern <= 10; pattern++)
804 s.setf(std::ios::fixed, std::ios::floatfield);
805 s.setf(std::ios::right, std::ios::adjustfield);
808 s <<
"****************************************"
809 <<
"*****************************************"
811 <<
"Pattern : " << pattern
812 << std::endl << std::endl
815 <<
" n OutIndex pow2 powPI Scale Signq Start #bits Start #bits"
825 s << std::dec << std::setw(2) << n <<
" " << std::setw(3) << p->
outIndex
826 <<
" " << std::setw(3) << p->
pow2
827 <<
" " << std::setw(3) << p->
powPI
828 <<
" " << std::setw(3) << p->
scale
829 <<
" " << std::setw(3) << p->
signq
839 s <<
"Index Power Value\n";
841 for(
int i = 0; i < 7; i++)
843 s <<
" " << i <<
" " << std::setw(2) << x <<
" " << std::setw(8) << std::setprecision(5) <<
PItab[i] << std::endl;
858 uint32_t toeSOW, offset;
862 InvalidParameter exc(
"getNMCTValidity called using non-subframe 2"
872 aodo = ((
sf2[9] >> 8) & 0x001f) * 900;
873 toeSOW = ((
sf2[9] >> 14) & 0xffff) << 4;
875 if ((totWS.sow - toeSOW) >
HALFWEEK)
877 else if ((totWS.sow - toeSOW) < -
HALFWEEK)
882 offset = toeSOW % 7200;
886 tnmct = toe - offset + 7200 - aodo;
887 return aodo != 27900;