source: Sophya/trunk/Poubelle/archediab.old/archeops.c@ 654

Last change on this file since 654 was 652, checked in by ansari, 26 years ago

archediab 29

File size: 25.9 KB
RevLine 
[649]1
2
3#include "manip.h"
4
[637]5#include "archeops.h"
6
7
[639]8
[649]9/* sauve vol trapani 2eme config de vol */
[637]10
11
[649]12
13/********** coefficients pour les mesures bolo **********************************/
14
15/* toutes les puissances en pW */
16
17/* -1- loi de reponse thermique des bolos avec R en ohms et T en Kelvin */
18
19/* */
20
21/* T = coef2 * ( ln ( R / coef1) ** ( -1 / coef0 ) */
22
23/* */
24
25/* -2- fuite thermique du bolo coef 3,4 */
26
27/* */
28
29/* Ptot = coef3 * ( (10*Tb) ** coef4 - (10*Tcryo) ** coef4 ) */
30
31/* */
32
33/* -3- calcul empirique de Pciel et de tau coef 5,6 */
34
35/* */
36
37/* Pciel = coef5 - Pelec coef5= I * Ai (tables xavier) */
38
39/* tau = - ln ( 1 + Pciel / coef6 ) coef6= I * Bi (tables xavier) */
40
41/* */
42
43/* Pour les thermometres 1 à 4 (germanium et carbone Allan-Bradley) */
44
45/* les coefficients sont utilisés differemment, ils permettent de convertir */
46
47/* R vers T ( c(6) est un offset sur la mesure de R par rapport aux mesures 4 fils)*/
48
49/* llR= log(log(R - c(6))-c(0)) */
50
51/* T = exp(c(1) + c(2)* llR + c(3)* llR* llR + c(4)* llR* llR* llR + */
52
53/* c(5)* llR* llR* llR* llR) */
54
55/* */
56
57/* version vol Trapani */
58
59/* on corrige le biais de temperature coef2=1.1 old, coef3=old/1.1^coef4 */
60
61/* */
62
63/* */
64
65/* */
66
67/* */
68
69/* */
70
71/****************************************************************************************/
72
73
74
75
76
[637]77/**************************************************************************************/
[649]78
[637]79/* */
[649]80
[637]81/* pour les MLPA : gain = 100 diviseur = 101 ou 330 */
[649]82
[637]83/* pour les bebodiff : gain = diviseur = 100Kohm / R preampli */
[649]84
[637]85/* pour les bebodiff : la capa est corrigee d'un facteur 0.868 */
[649]86
[637]87/* pour les cartes modifiees : mettre diviseur=0 */
[649]88
[637]89/* et capa = la resistance de chage en Megohm */
[649]90
[637]91/* */
[649]92
[637]93/**************************************************************************************/
94
95
[649]96
97
98
[645]99/* numero_nom, on/off , 0 = MLPA , N° bolo , gain_pa , capa*1000 , diviseur , coef*10000 */
[649]100
[639]101/* , 0 ou 1 , 2..8 = BEBO , hard , , 4700 , 333 , */
[649]102
[639]103/* 10 = Bediff , , , */
[637]104
[649]105
106
[639]107/* pour les bediff (code 10) le n° de bolo est N° de bebo*8 + numero dans la bebo */
[649]108
[639]109/* soit : 1 2 3 4 5 6 .. 9 10 11 12 13 14 .. 17 18 19 20 21 22 .. etc */
[637]110
111
[649]112
113
114
[637]115/*debut_param*/
[649]116
[637]117/*---------------------------------- fenetre : -----------------------------------*/
118
119
[649]120
121/* ------------------------ configuration de vol 5 juillet 99-----------------------------*/
122
[651]123/* ---------------------- modifié les indices de bolo le 15 septembre 1999-------------------*/
124
[652]125param_bolo parametr={29,24,36,88,18,
[649]126
127
128
[639]129{
[637]130
[651]131{ 11 , 2,10, 1 , 200, 22000 , 200 }, /* 0 */
[637]132
[649]133{ 9 , 1,10, 2 , 200, 22000 , 200 },
[637]134
[649]135{ 8 , 1,10, 3 , 200, 22000 , 200 },
[637]136
[649]137{ 14 , 2,10, 4 , 200, 22000 , 200 },
[643]138
139
[649]140
[651]141{ 5 , 1,10, 5 ,1000, 4700 , 1000 }, /* 4 */
[649]142
143{ 0 , 2,10, 6 ,1000, 4700 , 1000 },
144
145{ 10 , 1,10, 9 ,1000, 4700 , 1000 },
146
147{ 0 , 2,10,10, 1000, 4700 , 1000 },
148
149
150
[651]151{ 2 , 1,10,11, 1000, 4700 , 1000 }, /* 8 */
[649]152
153{ 4 , 1,10,12, 1000, 4700 , 1000 },
154
155{ 7 , 2,10,13, 1000, 4700 , 1000 },
156
157{ 1 , 1,10,14, 1000, 4700 , 1000 },
158
159
160
[651]161{ 13 , 1,10,17, 1000, 4700 , 1000 }, /* 12 */
[649]162
163{ 3 , 1,10,18, 1000, 4700 , 1000 },
164
165{ 12 , 1,10,19, 1000, 4700 , 1000 },
166
167{ 6 , 1,10,20, 1000, 4700 , 1000 },
168
169
170
[651]171{ 15 , 1,10,21, 200, 22000 , 200 }, /* 16 */
[649]172
173{ 16 , 1,10,22, 200, 22000 , 200 },
174
175{ 17 , 1,10,25, 500, 22000 , 500 },
176
177{ 18 , 2,10,26, 500, 22000 , 500 },
178
179
180
[651]181{ 20 , 3,10,27, 1000, 22000 , 0 }, /* 20 */
[649]182
183{ 21 , 3,10,28, 1000, 1000 , 0 },
184
185{ 22 , 3,10,29, 1000, 1000 , 0 },
186
187{ 23 , 3,10,30, 1000, 1000 , 0 },
188
189
190
[652]191{ 0 , 3,10,30, 1000, 1000 , 0 }, /* 24 */
192
193{ 0 , 3,10,30, 1000, 1000 , 0 },
194
195{ 0 , 3,10,30, 1000, 1000 , 0 },
196
197{ 0 , 3,10,30, 1000, 1000 , 0 },
198
199
200
201{ 0 , 3,10,30, 1000, 1000 , 0 }, /* 28 */
202
203{ 0 , 3,10,30, 1000, 1000 , 0 },
204
205{ 0 , 3,10,30, 1000, 1000 , 0 },
206
207{ 0 , 3,10,30, 1000, 1000 , 0 },
208
209
210
211{ 0 , 3,10,30, 1000, 1000 , 0 }, /* 32 */
212
213{ 0 , 3,10,30, 1000, 1000 , 0 },
214
215{ 0 , 3,10,30, 1000, 1000 , 0 },
216
217{ 0 , 3,10,30, 1000, 1000 , 0 },
218
219
220
[643]221},
[649]222
[643]223{
224
[649]225{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 0 */
226
227{ "ch1-bolo1" , { 5000 , 600000 , 154000, 63039, 25000, 0, 0} }, /* 1 */
228
229{ "ch1-bolo2" , { 5000 , 600000 , 154000, 47279, 25000, 0, 0} },
230
231{ "ch1-bolo3" , { 5000 , 600000 , 154000, 51219, 25000, 0, 0} },
232
233{ "ch2-bolo4" , { 5000 , 600000 , 154000, 70919, 25000, 0, 0} },
234
235{ "ch2-bolo5" , { 5000 , 600000 , 154000, 78799, 25000, 0, 0} },
236
237{ "ch3-bolo6" , { 5000 , 600000 , 154000, 86678, 25000, 0, 0} },
238
239
240
241{ "Dum100mK1" , { 5000 , 588000 , 125000, 0,0,0,0} }, /* 7 */
242
[645]243{ "Dum100mK2" , { 5000 , 588000 , 125000, 0,0,0,0} },
[643]244
[649]245/*{ "Dum100mK3" , { 5000 , 1361800 , 125000, 0,0,0,0} }, */
246
247{ "Dum100mK4" , { 5000 , 1361800 , 125000, 0,0,0,0} }, /* 9 */
248
249/*{ "Dum100mK5" , { 5000 , 1361800 , 125000, 0,0,0,0} }, */
250
251{ "Dum100mK6" , { 5000 , 1361800 , 125000, 0,0,0,0} },
252
253
254
255{ "Lou100mK1" , { 5000 , 5680000 , 560000, 0,0,0,0} }, /* 11 */
256
[645]257{ "Lou100mK2" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[643]258
[649]259{ "Lou100mK3" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[643]260
[649]261{ "Lou100mK4" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[643]262
263
[649]264
265{ "Lou1.6K5 " , { 5000 , 0 , 0, 0,0,0,0} }, /* 15 */
266
267{ "Lou1.6K6 " , { 5000 , 0 , 0, 0,0,0,0} },
268
269{ "Lou10K7 " , { 5000 , 0 , 0, 0,0,0,0} },
270
271{ "Lou10K8 " , { 5000 , 0 , 0, 0,0,0,0} },
272
273
274
275{ "R10MOhm " , { 5000 , 0 , 0, 0,0,0,0} }, /* 19 */
276
277
278
279/* La germanium doit toujours etre en premier par rapport aux autres thermos absolus */
280
281{ "germanium" , { 0 , 30719 , -910 , -16389 , 2927 , 0, 0} }, /* 20 */
282
283{ "therm_4k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 52500} },
284
285{ "therm_1.6k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 566700} },
286
287{ "therm_10k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 138100} },
288
289
290
[652]291{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 24 */
292
293{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
294
295{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
296
297{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
298
299
300
301{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 28 */
302
303{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
304
305{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
306
307{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
308
309
310
311{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 32 */
312
313{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
314
315{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
316
317{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
318
319
320
321{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 36 */
322
323{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
324
325{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
326
327{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
328
329
330
[637]331}
[643]332
[649]333
334
[637]335};
[649]336
[637]337/*fin_param*/
338
[649]339
340
[645]341/* Definition Mai-Juin 1999
[649]342
[645]343{
[649]344
[645]345{ "v1-bedif1" , 1,10,1 , 200, 22000 , 200, { 5000 , 123100 , 334200,0,0,0,0} },
[649]346
[645]347{ "v1-bedif2" , 1,10,2 , 200, 22000 , 200, { 500 , 136180 , 9010,0,0,0,0} },
[649]348
[645]349{ "v1-bedif3" , 1,10,3 , 200, 22000 , 200, { 500 , 136180 , 9010,0,0,0,0} },
[649]350
[645]351{ "v1-bedif4" , 1,10,4 , 200, 22000 , 200, { 5000 , 123100 , 334200,0,0,0,0} },
[649]352
[645]353{ "v1-bedif5" , 1,10,5 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]354
[645]355{ "v1-bedif6" , 1,10,6 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[637]356
[649]357
358
[645]359{ "v1-bedif7" , 1,10,9 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]360
[645]361{ "v1-bedif8" , 1,10,10, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]362
[645]363{ "v1-bedif9" , 1,10,11, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]364
[645]365{ "v1-bedif10" , 1,10,12, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]366
[645]367{ "v1-bedif11" , 1,10,13, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]368
[645]369{ "v1-bedif12" , 1,10,14, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[637]370
[649]371
372
[645]373{ "v1-bedif13" , 1,10,17, 1000, 100000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]374
[645]375{ "v1-bedif14" , 1,10,18, 1000, 470000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]376
[645]377{ "bedif15" , 1,10,19, 1000, 470000 , 1000, { 500 , 58800 , 12500,0,0,0,0} },
[649]378
[645]379{ "bedif16" , 1,10,20, 1000,2200000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]380
[645]381{ "bedif17" , 1,10,21, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]382
[645]383{ "bedif18" , 1,10,22, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
384
[649]385
386
[645]387{ "v1-bedif19" , 2,10,25, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]388
[645]389{ "v1-bedif20" , 2,10,26, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]390
[645]391{ "germanium" , 3,10,27, 1000, 22000 , 0, { 3500 , 17100 , 646500,0,0,0,0} },
[649]392
[645]393{ "therm_4k" , 3,10,28, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
[649]394
[645]395{ "therm_1.6k" , 3,10,29, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
[649]396
[645]397{ "therm_10k" , 3,10,30, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
398
[649]399
400
[645]401}*/
402
[649]403
404
[637]405/* bolos campagne 1998-1999 */
[649]406
[637]407/*
[649]408
[637]409reg_NbSi.J, 1, 0, 1, 100, 4.7, 333, .5 ,519.6 , 8.286
[649]410
[637]411v1-231...L, 1, 0, 2, 100, 4.7, 333, .5 , 1.7 , 32.41 , 0.333 , 10 , 20.30 , 11.41
[649]412
[637]413v1-232...N, 1, 0, 3, 100, 4.7, 333,
[649]414
[637]415v1-237...E, 1, 0, 4, 100, 4.7, 333,
416
[649]417
418
[637]419reg_JamieO, 1, 0, 5, 100, 4.7, 101,
420
[649]421
422
[637]423V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5 ,433.8 , 9.25
[649]424
[637]425V2-230...B, 1, 0, 7, 100, 4.7, 333, .5 , 8.26 , 26.61 , 5.10 , 7 , 9.354 , 1.026
[649]426
[637]427V2-205...Q, 1, 0, 8, 100, 4.7, 333, .518 , 81 , 25.2
[649]428
[637]429V2-208...P, 1, 0, 9, 100, 4.7, 333, .5 , 12.31 , 33.42 , 0.627 , 6.5 , 8.113 , 2.958
430
[649]431
432
[637]433*/
[649]434
[637]435/*bolos campagne 1997-1998 */
[649]436
[637]437/*
438
[649]439
440
[637]441v1-208...J, 1, 0, 1, 100, 4.7, 333, .5 , 12.31 , 33.42
[649]442
[637]443v1-232...L, 1, 0, 2, 100, 4.7, 333,
[649]444
[637]445v1-205...N, 1, 0, 3, 100, 4.7, 333, .518 , 81 , 25.2
[649]446
[637]447v1-NbSi..E, 1, 0, 4, 100, 4.7, 333, .5 ,519.6 , 8.286
[649]448
[637]449Jamie....O, 1, 0, 5, 100, 4.7, 101,
[649]450
[637]451V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5 ,433.8 , 9.25
[649]452
[637]453V2-224...B, 1, 0, 7, 100, 4.7, 333, .5 ,3.43 , 26.6
[649]454
[637]455V2-230...Q, 1, 0, 8, 100, 4.7, 333, .5 , 8.26 , 26.61
[649]456
[637]457V2-231...P, 1, 0, 9, 100, 4.7, 333, .5 , 1.7 , 32.41
458
[649]459
460
[637]461*/
462
463
[649]464
465
466
[643]467int mode_transmission_telemesure[nb_modes_telemesure][nb_type_blocks]= {
[637]468
[649]469
470
[643]471/* enregisteur de bord flash : plafond standard nominal */
[637]472
[649]473/* 0*/ { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
[637]474
[643]475
[649]476
477/* 1*/ { 0,10,10, 1, 10, 3, 0, 0, 0, 1, 0, 0, 1, 0, 4,2500, 0, 0, 0, 0},
478
479
480
481/* 2*/ { 0,10,05,01, 10,06, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
482
483
484
[643]485/* 3*/ { 0,10, 1,25, 10, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0},
486
[649]487
488
[643]489/* 4*/ { 0,10,15,50, 10,25, 0, 0, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
490
[649]491
492
[643]493/* 5*/ { 0,10,15,50, 10,25, 0, 0, 0, 0, 1, 0, 0, 0, 0,2500, 0, 0, 0, 0},
494
[649]495
496
[643]497/* 6*/ { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
498
499
500
[649]501/* 7*/ { 0,10,15,50,100,50, 1, 1, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
[643]502
[649]503
504
505/* 8*/ { 0,10,15,50,100,50, 1, 1, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
506
507
508
509/* 9*/ { 0,10, 1, 1,100, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0}
510
511
512
[643]513 };
514
515
516
[649]517
518
519
520
[643]521int mode_transmission_flash[nb_modes_flash][nb_type_blocks]= {
522
523
[649]524
525
526
[643]527/* enregisteur de bord flash : nominal */
[649]528
[643]529/* 0*/ { 0,50,15,25, 10,25, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0} ,
530
[649]531
532
[643]533/* enregisteur de bord flash : minimum */
[649]534
[643]535/* 1*/ { 0,50,50,50,50,100, 0, 0, 0, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0} ,
536
[649]537
538
[643]539/* enregisteur de bord flash : rien */
[649]540
[643]541/* 2*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} };
542
543
544
545
546
547
548
549
550
[649]551/*debut_nom_reglage*/
[643]552
[649]553/* 0->1 - demarrage par defaut - Nominal*/
[643]554
[649]555/* 1->2 - idem*/
[643]556
[649]557/* 2->3 - faible courant*/
[643]558
[649]559/* 3->4 - fort courant*/
[643]560
[649]561/* 4->5 - non fffdéfini*/
[643]562
[649]563/* 5->6 - non défini*/
[643]564
[649]565/* 6->7 - non défini*/
[643]566
[649]567/* 7->8 - non défini*/
[643]568
[637]569/*fin_nom_reglage*/
570
571
572
573
574
575
576
[639]577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
[649]622
623
624
625
626
627
628
629
630
631
632
633
634
[637]635reglage_bolo reglage_standard[8]={{
636
637
[649]638
639
640
[637]641/*debut reglage 0 */
[649]642
[639]643#ifdef programme
[649]644
645{32,76,8,1},{
646
[639]647{20,0}
[649]648
649,{1311522837,256000}
650
651,{1048576021,256004}
652
[637]653,{20,0}
[649]654
655,{1048576021,256001}
656
[637]657,{20,0}
[649]658
659,{262144021,128003}
660
[639]661,{20,0}
[649]662
663,{262144021,128001}
664
665,{262144021,128001}
666
[639]667,{20,0}
[649]668
669,{1048576021,256257}
670
671,{1048576021,256003}
672
673,{262144021,128001}
674
675,{262144789,128001}
676
677,{262144021,128001}
678
679,{100663317,256002}
680
681,{100716053,155650}
682
683,{1048576277,256003}
684
[639]685,{20,0}
[649]686
687,{1024021,0}
688
689,{262165,0}
690
691,{65557,0}
692
693,{1024020,0}
694
[637]695},{
[649]696
697{1,21,16,4}
698
699,{1,21,13,4}
700
701,{1,21,20,4}
702
703,{1,21,20,4}
704
705,{0,21,0,4}
706
707,{0,21,0,4}
708
[637]709},{
[649]710
711{3,1,21,24,21,24,0}
712
[637]713,{0,1,9,1,0,0,0}
[649]714
[637]715,{0,1,9,1,0,0,0}
[649]716
717,{6,1,9,34,30,0,65326}
718
719},{5,3,129,108,0,126,104,88}
720
[639]721#else
[649]722
723{1,8,76,32},{
724
[639]725{20,0}
[649]726
727,{1311522837,256000}
728
729,{1048576021,256004}
730
[639]731,{20,0}
[649]732
733,{1048576021,256001}
734
[639]735,{20,0}
[649]736
737,{262144021,128003}
738
[639]739,{20,0}
[649]740
741,{262144021,128001}
742
743,{262144021,128001}
744
[639]745,{20,0}
[649]746
747,{1048576021,256257}
748
749,{1048576021,256003}
750
751,{262144021,128001}
752
753,{262144789,128001}
754
755,{262144021,128001}
756
757,{100663317,256002}
758
759,{100716053,155650}
760
761,{1048576277,256003}
762
[639]763,{20,0}
[649]764
765,{1024021,0}
766
767,{262165,0}
768
769,{65557,0}
770
771,{1024020,0}
772
[639]773},{
[649]774
775{4,16,21,1}
776
777,{4,13,21,1}
778
779,{4,20,21,1}
780
781,{4,20,21,1}
782
783,{4,0,21,0}
784
785,{4,0,21,0}
786
[639]787},{
[649]788
789{24,21,1,3,0,24,21}
790
[639]791,{1,9,1,0,0,0,0}
[649]792
[639]793,{1,9,1,0,0,0,0}
[649]794
795,{34,9,1,6,65326,0,30}
796
797},{108,129,3,5,88,104,126,0}
798
[639]799#endif
[649]800
[637]801/*fin_reglage*/
802
[649]803
804
805
806
[637]807},{
808
[649]809
810
[637]811/*debut reglage 1 */
[649]812
[639]813#ifdef programme
[649]814
815{32,76,8,1},{
816
[639]817{20,0}
[649]818
819,{1311522837,256000}
820
821,{1048576021,256004}
822
[637]823,{20,0}
[649]824
825,{1048576021,256001}
826
[637]827,{20,0}
[649]828
829,{262144021,128003}
830
[639]831,{20,0}
[649]832
833,{262144021,128001}
834
835,{262144021,128001}
836
[639]837,{20,0}
[649]838
839,{1048576021,256257}
840
841,{1048576021,256003}
842
843,{262144021,128001}
844
845,{262144789,128001}
846
847,{262144021,128001}
848
849,{100663317,256002}
850
851,{100716053,155650}
852
853,{1048576277,256003}
854
[639]855,{20,0}
[649]856
857,{1024021,0}
858
859,{262165,0}
860
861,{65557,0}
862
863,{1024020,0}
864
[637]865},{
[649]866
867{1,21,16,4}
868
869,{1,21,13,4}
870
871,{1,21,20,4}
872
873,{1,21,20,4}
874
875,{0,21,0,4}
876
877,{0,21,0,4}
878
[637]879},{
[649]880
881{3,1,21,24,21,24,0}
882
[637]883,{0,1,9,1,0,0,0}
[649]884
[637]885,{0,1,9,1,0,0,0}
[649]886
887,{6,1,9,34,30,0,65326}
888
889},{5,3,129,108,0,126,104,88}
890
[639]891#else
[649]892
893{1,8,76,32},{
894
[639]895{20,0}
[649]896
897,{1311522837,256000}
898
899,{1048576021,256004}
900
[639]901,{20,0}
[649]902
903,{1048576021,256001}
904
[639]905,{20,0}
[649]906
907,{262144021,128003}
908
[639]909,{20,0}
[649]910
911,{262144021,128001}
912
913,{262144021,128001}
914
[639]915,{20,0}
[649]916
917,{1048576021,256257}
918
919,{1048576021,256003}
920
921,{262144021,128001}
922
923,{262144789,128001}
924
925,{262144021,128001}
926
927,{100663317,256002}
928
929,{100716053,155650}
930
931,{1048576277,256003}
932
[639]933,{20,0}
[649]934
935,{1024021,0}
936
937,{262165,0}
938
939,{65557,0}
940
941,{1024020,0}
942
[639]943},{
[649]944
945{4,16,21,1}
946
947,{4,13,21,1}
948
949,{4,20,21,1}
950
951,{4,20,21,1}
952
953,{4,0,21,0}
954
955,{4,0,21,0}
956
[639]957},{
[649]958
959{24,21,1,3,0,24,21}
960
[639]961,{1,9,1,0,0,0,0}
[649]962
[639]963,{1,9,1,0,0,0,0}
[649]964
965,{34,9,1,6,65326,0,30}
966
967},{108,129,3,5,88,104,126,0}
968
[639]969#endif
[649]970
[637]971/*fin_reglage*/
972
[649]973
974
[637]975},{
976
[649]977
978
[637]979/*debut reglage 2 */
[649]980
[639]981#ifdef programme
[649]982
983{32,76,8,1},{
984
985{20,0}
986
987,{100721941,256000}
988
989,{1048607509,256004}
990
991,{20,0}
992
993,{1048586773,256003}
994
995,{20,0}
996
997,{50335509,128001}
998
999,{20,0}
1000
1001,{50331669,128001}
1002
1003,{50336789,128001}
1004
1005,{20,0}
1006
1007,{1048622101,256259}
1008
1009,{1048635413,256003}
1010
1011,{50331669,128001}
1012
1013,{50352661,128001}
1014
1015,{50337813,128001}
1016
1017,{100665109,256002}
1018
1019,{100664597,155650}
1020
1021,{1048600341,256003}
1022
1023,{20,0}
1024
1025,{1024021,0}
1026
1027,{65557,0}
1028
1029,{65557,0}
1030
1031,{262165,0}
1032
[637]1033},{
[649]1034
1035{1,21,11,4}
1036
1037,{1,21,13,4}
1038
1039,{1,21,20,4}
1040
1041,{1,21,20,4}
1042
1043,{0,20,0,1}
1044
1045,{0,20,0,1}
1046
[637]1047},{
[649]1048
1049{3,1,21,24,21,24,0}
1050
1051,{0,1,9,1,0,0,0}
1052
1053,{0,1,9,1,0,0,0}
1054
1055,{6,17,0,34,30,0,65386}
1056
1057},{5,3,129,108,0,126,104,88}
1058
[639]1059#else
[649]1060
1061{1,8,76,32},{
1062
1063{20,0}
1064
1065,{100721941,256000}
1066
1067,{1048607509,256004}
1068
1069,{20,0}
1070
1071,{1048586773,256003}
1072
1073,{20,0}
1074
1075,{50335509,128001}
1076
1077,{20,0}
1078
1079,{50331669,128001}
1080
1081,{50336789,128001}
1082
1083,{20,0}
1084
1085,{1048622101,256259}
1086
1087,{1048635413,256003}
1088
1089,{50331669,128001}
1090
1091,{50352661,128001}
1092
1093,{50337813,128001}
1094
1095,{100665109,256002}
1096
1097,{100664597,155650}
1098
1099,{1048600341,256003}
1100
1101,{20,0}
1102
1103,{1024021,0}
1104
1105,{65557,0}
1106
1107,{65557,0}
1108
1109,{262165,0}
1110
[639]1111},{
[649]1112
1113{4,11,21,1}
1114
1115,{4,13,21,1}
1116
1117,{4,20,21,1}
1118
1119,{4,20,21,1}
1120
1121,{1,0,20,0}
1122
1123,{1,0,20,0}
1124
[639]1125},{
[649]1126
1127{24,21,1,3,0,24,21}
1128
1129,{1,9,1,0,0,0,0}
1130
1131,{1,9,1,0,0,0,0}
1132
1133,{34,0,17,6,65386,0,30}
1134
1135},{108,129,3,5,88,104,126,0}
1136
[639]1137#endif
[649]1138
[637]1139/*fin_reglage*/
1140
[649]1141
1142
[637]1143},{
1144
[649]1145
1146
[637]1147/*debut reglage 3 */
[649]1148
[639]1149#ifdef programme
[649]1150
1151{32,76,8,1},{
1152
[639]1153{20,0}
[649]1154
1155,{100721941,256000}
1156
1157,{1048607509,256004}
1158
[637]1159,{20,0}
[649]1160
1161,{1048586773,256003}
1162
[637]1163,{20,0}
[649]1164
1165,{524291861,128001}
1166
[639]1167,{20,0}
[649]1168
1169,{524288021,128001}
1170
1171,{524293141,128001}
1172
[639]1173,{20,0}
[649]1174
1175,{1048622101,256259}
1176
1177,{1048635413,256003}
1178
1179,{524288021,128001}
1180
1181,{524309013,128001}
1182
1183,{524294165,128001}
1184
1185,{100665109,256002}
1186
1187,{100664597,155650}
1188
1189,{1048600341,256003}
1190
[639]1191,{20,0}
[649]1192
1193,{1024021,0}
1194
1195,{65557,0}
1196
1197,{65557,0}
1198
1199,{65557,0}
1200
[637]1201},{
[649]1202
1203{1,21,18,4}
1204
1205,{1,21,13,4}
1206
1207,{1,21,20,4}
1208
1209,{1,21,20,4}
1210
1211,{0,20,0,1}
1212
1213,{0,20,0,1}
1214
[637]1215},{
[649]1216
1217{3,1,21,24,21,24,0}
1218
[639]1219,{0,1,9,1,0,0,0}
[649]1220
[639]1221,{0,1,9,1,0,0,0}
[649]1222
1223,{6,17,0,34,30,0,65386}
1224
1225},{5,3,129,108,0,126,104,88}
1226
[639]1227#else
[649]1228
1229{1,8,76,32},{
1230
[639]1231{20,0}
[649]1232
1233,{100721941,256000}
1234
1235,{1048607509,256004}
1236
[639]1237,{20,0}
[649]1238
1239,{1048586773,256003}
1240
[639]1241,{20,0}
[649]1242
1243,{524291861,128001}
1244
[639]1245,{20,0}
[649]1246
1247,{524288021,128001}
1248
1249,{524293141,128001}
1250
[639]1251,{20,0}
[649]1252
1253,{1048622101,256259}
1254
1255,{1048635413,256003}
1256
1257,{524288021,128001}
1258
1259,{524309013,128001}
1260
1261,{524294165,128001}
1262
1263,{100665109,256002}
1264
1265,{100664597,155650}
1266
1267,{1048600341,256003}
1268
[639]1269,{20,0}
[649]1270
1271,{1024021,0}
1272
1273,{65557,0}
1274
1275,{65557,0}
1276
1277,{65557,0}
1278
[639]1279},{
[649]1280
1281{4,18,21,1}
1282
1283,{4,13,21,1}
1284
1285,{4,20,21,1}
1286
1287,{4,20,21,1}
1288
1289,{1,0,20,0}
1290
1291,{1,0,20,0}
1292
[639]1293},{
[649]1294
1295{24,21,1,3,0,24,21}
1296
[639]1297,{1,9,1,0,0,0,0}
[649]1298
[639]1299,{1,9,1,0,0,0,0}
[649]1300
1301,{34,0,17,6,65386,0,30}
1302
1303},{108,129,3,5,88,104,126,0}
1304
[639]1305#endif
[649]1306
[637]1307/*fin_reglage*/
1308
[649]1309
1310
[637]1311},{
1312
[649]1313
1314
[637]1315/*debut reglage 4 */
[649]1316
[639]1317#ifdef programme
[649]1318
1319{39,62,9,1},{
1320
[639]1321{20,0}
[649]1322
1323,{-100659180,229382}
1324
1325,{-100659436,294918}
1326
[637]1327,{20,0}
[649]1328
1329,{-100663276,221189}
1330
1331,{-100663276,5}
1332
1333,{-100659436,245762}
1334
1335,{-100663276,5}
1336
1337,{-100658154,245761}
1338
1339,{-100658156,253954}
1340
[637]1341,{20,0}
[649]1342
1343,{-100663276,204805}
1344
1345,{-100663276,16389}
1346
1347,{-100656874,1}
1348
1349,{-100656874,16385}
1350
1351,{-100663276,3}
1352
1353,{-100506347,6}
1354
1355,{-100509675,6}
1356
1357,{-100372972,6}
1358
1359,{2097174,0}
1360
[639]1361,{1024022,0}
[649]1362
1363,{16406,0}
1364
1365,{4117,0}
1366
1367,{262164,0}
1368
[639]1369},{
[649]1370
1371{2,22,24,1}
1372
1373,{1,20,24,4}
1374
1375,{0,20,24,4}
1376
1377,{0,20,24,3}
1378
1379,{0,20,24,4}
1380
1381,{0,20,24,4}
1382
[639]1383},{
[649]1384
[639]1385{0,1,9,1,0,0,0}
[649]1386
[639]1387,{0,1,9,1,0,0,0}
[649]1388
[639]1389,{0,1,9,1,0,0,0}
[649]1390
[639]1391,{0,1,9,1,0,0,0}
[649]1392
1393},{2,3,129,108,2,126,104,88}
1394
[639]1395#else
[649]1396
1397{1,9,62,39},{
1398
[639]1399{20,0}
[649]1400
1401,{-100659180,229382}
1402
1403,{-100659436,294918}
1404
[639]1405,{20,0}
[649]1406
1407,{-100663276,221189}
1408
1409,{-100663276,5}
1410
1411,{-100659436,245762}
1412
1413,{-100663276,5}
1414
1415,{-100658154,245761}
1416
1417,{-100658156,253954}
1418
[639]1419,{20,0}
[649]1420
1421,{-100663276,204805}
1422
1423,{-100663276,16389}
1424
1425,{-100656874,1}
1426
1427,{-100656874,16385}
1428
1429,{-100663276,3}
1430
1431,{-100506347,6}
1432
1433,{-100509675,6}
1434
1435,{-100372972,6}
1436
1437,{2097174,0}
1438
[639]1439,{1024022,0}
[649]1440
1441,{16406,0}
1442
1443,{4117,0}
1444
1445,{262164,0}
1446
[639]1447},{
[649]1448
1449{1,24,22,2}
1450
1451,{4,24,20,1}
1452
1453,{4,24,20,0}
1454
1455,{3,24,20,0}
1456
1457,{4,24,20,0}
1458
1459,{4,24,20,0}
1460
[639]1461},{
[649]1462
[639]1463{1,9,1,0,0,0,0}
[649]1464
[639]1465,{1,9,1,0,0,0,0}
[649]1466
[639]1467,{1,9,1,0,0,0,0}
[649]1468
[639]1469,{1,9,1,0,0,0,0}
[649]1470
1471},{108,129,3,2,88,104,126,2}
1472
[639]1473#endif
[649]1474
[639]1475/*fin_reglage*/
1476
[649]1477
1478
[639]1479},{
1480
[649]1481
1482
[639]1483/*debut reglage 5 */
[649]1484
[639]1485#ifdef programme
[649]1486
1487{39,68,9,1},{
1488
1489{20,0}
1490
1491,{1048982293,229382}
1492
1493,{1049128469,253958}
1494
1495,{20,0}
1496
1497,{1048966677,245765}
1498
1499,{20,0}
1500
1501,{262157846,245762}
1502
1503,{1048919829,5}
1504
1505,{262156054,245761}
1506
1507,{262154006,253954}
1508
1509,{20,0}
1510
1511,{1049123349,229381}
1512
1513,{1049157141,237573}
1514
1515,{262154262,1}
1516
1517,{262158614,16385}
1518
1519,{262149654,3}
1520
1521,{262750740,237572}
1522
1523,{262606612,122884}
1524
1525,{-1174095083,139270}
1526
1527,{20,0}
1528
1529,{16406,0}
1530
1531,{16406,0}
1532
1533,{4117,0}
1534
1535,{262164,0}
1536
[637]1537},{
[649]1538
1539{1,22,16,1}
1540
1541,{1,22,16,4}
1542
1543,{1,22,16,4}
1544
1545,{1,20,16,3}
1546
1547,{1,21,20,4}
1548
1549,{1,21,20,4}
1550
[637]1551},{
[649]1552
1553{0,1,9,1,0,0,0}
1554
1555,{0,1,9,1,0,0,0}
1556
1557,{0,1,9,1,0,0,0}
1558
1559,{0,1,9,1,0,0,0}
1560
1561},{2,3,129,108,3,126,104,88}
1562
[639]1563#else
[649]1564
1565{1,9,68,39},{
1566
1567{20,0}
1568
1569,{1048982293,229382}
1570
1571,{1049128469,253958}
1572
1573,{20,0}
1574
1575,{1048966677,245765}
1576
1577,{20,0}
1578
1579,{262157846,245762}
1580
1581,{1048919829,5}
1582
1583,{262156054,245761}
1584
1585,{262154006,253954}
1586
1587,{20,0}
1588
1589,{1049123349,229381}
1590
1591,{1049157141,237573}
1592
1593,{262154262,1}
1594
1595,{262158614,16385}
1596
1597,{262149654,3}
1598
1599,{262750740,237572}
1600
1601,{262606612,122884}
1602
1603,{-1174095083,139270}
1604
1605,{20,0}
1606
1607,{16406,0}
1608
1609,{16406,0}
1610
1611,{4117,0}
1612
1613,{262164,0}
1614
[639]1615},{
[649]1616
1617{1,16,22,1}
1618
1619,{4,16,22,1}
1620
1621,{4,16,22,1}
1622
1623,{3,16,20,1}
1624
1625,{4,20,21,1}
1626
1627,{4,20,21,1}
1628
[639]1629},{
[649]1630
1631{1,9,1,0,0,0,0}
1632
1633,{1,9,1,0,0,0,0}
1634
1635,{1,9,1,0,0,0,0}
1636
1637,{1,9,1,0,0,0,0}
1638
1639},{108,129,3,2,88,104,126,3}
1640
[639]1641#endif
[649]1642
[637]1643/*fin_reglage*/
1644
[649]1645
1646
[637]1647},{
1648
[649]1649
1650
[639]1651/*debut reglage 6 */
[649]1652
[639]1653#ifdef programme
[649]1654
[643]1655{197,191,175,185},{
[649]1656
[639]1657{0,0}
[649]1658
[637]1659,{0,0}
[649]1660
[637]1661,{0,0}
[649]1662
[637]1663,{0,0}
[649]1664
[637]1665,{0,0}
[649]1666
[637]1667,{0,0}
[649]1668
[637]1669,{0,0}
[649]1670
[639]1671,{0,0}
[649]1672
[639]1673,{0,0}
[649]1674
[639]1675,{0,0}
[649]1676
[639]1677,{0,0}
[649]1678
[639]1679,{0,0}
[649]1680
[639]1681,{0,0}
[649]1682
[639]1683,{0,0}
[649]1684
[639]1685,{0,0}
[649]1686
[639]1687,{0,0}
[649]1688
[639]1689,{0,0}
[649]1690
[639]1691,{0,0}
[649]1692
[639]1693,{0,0}
[649]1694
[639]1695,{0,0}
[649]1696
[639]1697,{0,0}
[649]1698
[639]1699,{0,0}
[649]1700
[639]1701,{0,0}
[649]1702
[639]1703,{0,0}
[649]1704
[637]1705},{
[649]1706
[639]1707{106,98,93,71}
[649]1708
[639]1709,{66,74,87,66}
[649]1710
[639]1711,{48,46,38,33}
[649]1712
[639]1713,{40,41,33,26}
[649]1714
[639]1715,{25,29,40,57}
[649]1716
[639]1717,{63,62,71,80}
[649]1718
[637]1719},{
[649]1720
[639]1721{83,79,75,75,92,112,31100}
[649]1722
[639]1723,{125,126,117,113,107,94,20315}
[649]1724
[639]1725,{108,116,122,124,117,120,32117}
[649]1726
[639]1727,{110,99,94,98,107,93,17217}
[649]1728
[639]1729},{88,82,94,108,111,126,104,88}
[649]1730
[639]1731#else
[649]1732
[643]1733{185,175,191,197},{
[649]1734
[639]1735{0,0}
[649]1736
[639]1737,{0,0}
[649]1738
[639]1739,{0,0}
[649]1740
[639]1741,{0,0}
[649]1742
[639]1743,{0,0}
[649]1744
[639]1745,{0,0}
[649]1746
[639]1747,{0,0}
[649]1748
[639]1749,{0,0}
[649]1750
[639]1751,{0,0}
[649]1752
[639]1753,{0,0}
[649]1754
[639]1755,{0,0}
[649]1756
[639]1757,{0,0}
[649]1758
[639]1759,{0,0}
[649]1760
[639]1761,{0,0}
[649]1762
[639]1763,{0,0}
[649]1764
[639]1765,{0,0}
[649]1766
[639]1767,{0,0}
[649]1768
[639]1769,{0,0}
[649]1770
[639]1771,{0,0}
[649]1772
[639]1773,{0,0}
[649]1774
[639]1775,{0,0}
[649]1776
[639]1777,{0,0}
[649]1778
[639]1779,{0,0}
[649]1780
[639]1781,{0,0}
[649]1782
[639]1783},{
[649]1784
[639]1785{71,93,98,106}
[649]1786
[639]1787,{66,87,74,66}
[649]1788
[639]1789,{33,38,46,48}
[649]1790
[639]1791,{26,33,41,40}
[649]1792
[639]1793,{57,40,29,25}
[649]1794
[639]1795,{80,71,62,63}
[649]1796
[639]1797},{
[649]1798
[639]1799{75,75,79,83,31100,112,92}
[649]1800
[639]1801,{113,117,126,125,20315,94,107}
[649]1802
[639]1803,{124,122,116,108,32117,120,117}
[649]1804
[639]1805,{98,94,99,110,17217,93,107}
[649]1806
[639]1807},{108,94,82,88,88,104,126,111}
[649]1808
[639]1809#endif
[649]1810
[637]1811/*fin_reglage*/
1812
[649]1813
1814
[637]1815},{
1816
[649]1817
1818
[637]1819/*debut reglage 7 */
[649]1820
[639]1821#ifdef programme
[649]1822
[643]1823{197,191,175,185},{
[649]1824
[639]1825{0,0}
[649]1826
[639]1827,{0,0}
[649]1828
[639]1829,{0,0}
[649]1830
[639]1831,{0,0}
[649]1832
[639]1833,{0,0}
[649]1834
[639]1835,{0,0}
[649]1836
[639]1837,{0,0}
[649]1838
[639]1839,{0,0}
[649]1840
[639]1841,{0,0}
[649]1842
[639]1843,{0,0}
[649]1844
[639]1845,{0,0}
[649]1846
[639]1847,{0,0}
[649]1848
[639]1849,{0,0}
[649]1850
[639]1851,{0,0}
[649]1852
[639]1853,{0,0}
[649]1854
[639]1855,{0,0}
[649]1856
[639]1857,{0,0}
[649]1858
[639]1859,{0,0}
[649]1860
[639]1861,{0,0}
[649]1862
[639]1863,{0,0}
[649]1864
[639]1865,{0,0}
[649]1866
[639]1867,{0,0}
[649]1868
[639]1869,{0,0}
[649]1870
[639]1871,{0,0}
[649]1872
[639]1873},{
[649]1874
[639]1875{106,98,93,71}
[649]1876
[639]1877,{66,74,87,66}
[649]1878
[639]1879,{48,46,38,33}
[649]1880
[639]1881,{40,41,33,26}
[649]1882
[639]1883,{25,29,40,57}
[649]1884
[639]1885,{63,62,71,80}
[649]1886
[639]1887},{
[649]1888
[639]1889{83,79,75,75,92,112,31100}
[649]1890
[639]1891,{125,126,117,113,107,94,20315}
[649]1892
[639]1893,{108,116,122,124,117,120,32117}
[649]1894
[639]1895,{110,99,94,98,107,93,17217}
[649]1896
[639]1897},{88,82,94,108,111,126,104,88}
[649]1898
[639]1899#else
[649]1900
[643]1901{185,175,191,197},{
[649]1902
[639]1903{0,0}
[649]1904
[639]1905,{0,0}
[649]1906
[639]1907,{0,0}
[649]1908
[639]1909,{0,0}
[649]1910
[639]1911,{0,0}
[649]1912
[639]1913,{0,0}
[649]1914
[639]1915,{0,0}
[649]1916
[639]1917,{0,0}
[649]1918
[639]1919,{0,0}
[649]1920
[639]1921,{0,0}
[649]1922
[639]1923,{0,0}
[649]1924
[639]1925,{0,0}
[649]1926
[639]1927,{0,0}
[649]1928
[639]1929,{0,0}
[649]1930
[639]1931,{0,0}
[649]1932
[639]1933,{0,0}
[649]1934
[639]1935,{0,0}
[649]1936
[639]1937,{0,0}
[649]1938
[639]1939,{0,0}
[649]1940
[639]1941,{0,0}
[649]1942
[639]1943,{0,0}
[649]1944
[639]1945,{0,0}
[649]1946
[639]1947,{0,0}
[649]1948
[639]1949,{0,0}
[649]1950
[639]1951},{
[649]1952
[639]1953{71,93,98,106}
[649]1954
[639]1955,{66,87,74,66}
[649]1956
[639]1957,{33,38,46,48}
[649]1958
[639]1959,{26,33,41,40}
[649]1960
[639]1961,{57,40,29,25}
[649]1962
[639]1963,{80,71,62,63}
[649]1964
[639]1965},{
[649]1966
[639]1967{75,75,79,83,31100,112,92}
[649]1968
[639]1969,{113,117,126,125,20315,94,107}
[649]1970
[639]1971,{124,122,116,108,32117,120,117}
[649]1972
[639]1973,{98,94,99,110,17217,93,107}
[649]1974
[639]1975},{108,94,82,88,88,104,126,111}
[649]1976
[639]1977#endif
[649]1978
[637]1979/*fin_reglage*/
1980
[649]1981
1982
[637]1983} };
1984
[649]1985
1986
1987
[637]1988
1989
1990
[649]1991
1992
[637]1993int calcul_somme_block(block_type_modele* blk,int longueur)
[649]1994
[637]1995{
[649]1996
[637]1997int i,so=0;;
[649]1998
[637]1999for(i=0;i<(longueur/4-4);i++) so^=(int)blk->mot[i];
[649]2000
[637]2001/* somme sur tous les mots internes : on exclus le dbut, les codes et la fin */
[649]2002
[637]2003return((so^(so>>16))&0xffff);
[649]2004
[637]2005}
2006
2007
2008
2009
[649]2010
2011
2012
2013
2014
[637]2015void valide_block(block_type_modele* blk,int type,int block_num)
[649]2016
[637]2017{
[649]2018
[637]2019int somme,longueur;
[649]2020
[637]2021def_long_block
[649]2022
[637]2023longueur=long_block[type];
[649]2024
[637]2025/*printf("valide block adresse %x type %d numblock %d longueur=%d \n" */
[649]2026
[637]2027/* ,(unsigned)blk,type,block_num,longueur);*/
[649]2028
[637]2029blk->debut = debut_block_mesure;
[649]2030
2031somme=0;blk->code1 = (((long)longueur)<<16) | somme;
2032
[637]2033blk->code2 = (((long)block_num) & 0xffffff ) | ( (((long)type)<<24)&0xff000000 );
2034
[649]2035
2036
[637]2037blk->mot[longueur/4-4] = fin_block_mesure;
[649]2038
2039
2040
2041#if defined(_ECC_LIB_H_)
2042
2043{
2044
2045int place_ecc;
2046
2047place_ecc=(longueur-4-ECC_SIZE-SIZE_HEAD-((longueur-4-SIZE_HEAD)/ECC_TOTAL)*ECC_SIZE)/4;
2048
2049SetEcc( blk, (unsigned char *) &(blk->mot[place_ecc] ) ) ;
2050
2051}
2052
2053#endif
2054
2055
2056
[637]2057somme=calcul_somme_block(blk,longueur);
[649]2058
[637]2059blk->code1 = (((long)longueur)<<16) | somme;
[649]2060
2061/* l'ecc est faux car on a change la somme: mettre la somme a zero avant de tester ecc */
2062
[637]2063}
2064
2065
2066
[649]2067/* Quand on est sur une machine swappee, on ne cherche pas a verifier */
[637]2068
[649]2069/* le checksum, puisqu'on a modifie les blocs, sans swapper par exemple */
2070
2071/* les chars des noms de bolometres et des chaines GPS... */
2072
2073#ifdef __alpha
2074
2075#define SWAP
2076
2077#endif
2078
2079#if defined(Linux) || defined(linux)
2080
2081#define SWAP
2082
2083#endif
2084
2085
2086
2087
2088
2089
2090
[637]2091int verifie_block(block_type_modele* blk)
[649]2092
[637]2093{
[649]2094
[637]2095int type,lg,som;
[649]2096
[637]2097def_long_block
[649]2098
[637]2099if(blk->debut != debut_block_mesure) return(block_debut_erreur);
[649]2100
[637]2101type=type_block(blk); if( (type<0) ||(type>=nb_type_blocks) ) return(block_type_inconnu);
[649]2102
[637]2103lg=longueur_block(blk); if( lg != long_block[type] ) return(block_longueur_erreur);
[649]2104
[637]2105if( blk->mot[(lg/4)-4] != fin_block_mesure) return(block_fin_erreur);
[649]2106
2107#ifndef SWAP
2108
[637]2109som=calcul_somme_block(blk,lg); if( som!= somme_block(blk)) return(block_somme_erreur);
[649]2110
2111#endif
2112
[637]2113return(block_correct);
[649]2114
[637]2115}
2116
2117
[649]2118
2119
2120
[637]2121int verifie_block_printf(block_type_modele* blk)
[649]2122
[637]2123{
[649]2124
[637]2125int type,lg,som;
[649]2126
[637]2127def_long_block
[649]2128
[637]2129def_nom_block
[649]2130
[637]2131if(blk->debut != debut_block_mesure)
[649]2132
[637]2133 {
[649]2134
[637]2135 printf(" erreur dans le code debut de block \n");
[649]2136
[637]2137 return(block_debut_erreur);
[649]2138
[637]2139 }
2140
[649]2141
2142
[637]2143type=type_block(blk);
[649]2144
[637]2145if( (type<0) || (type>nb_type_blocks) )
[649]2146
[637]2147 {
[649]2148
[637]2149 printf(" block de type %d inconnu\n",type);
[649]2150
[637]2151 return(block_type_inconnu);
[649]2152
[637]2153 }
2154
[649]2155
2156
[637]2157lg=longueur_block(blk);
[649]2158
[637]2159if( lg!=long_block[type] )
[649]2160
[637]2161 {
[649]2162
[637]2163 printf(" block type %s erreur de longueur (nominal=%d , dans le block=%d \n"
[649]2164
[637]2165 ,nom_block[type],long_block[type],lg);
[649]2166
[637]2167 return(block_longueur_erreur);
[649]2168
[637]2169 }
2170
[649]2171
2172
[637]2173som=calcul_somme_block(blk,lg);
[649]2174
[637]2175if( som!=somme_block(blk) )
[649]2176
[637]2177 {
[649]2178
[637]2179 printf(" block type %s : erreur de somme (calculee=%d , dans le block=%d \n"
[649]2180
[637]2181 ,nom_block[type],som,somme_block(blk) );
[649]2182
[637]2183 return(block_somme_erreur);
[649]2184
[637]2185 }
[649]2186
[637]2187
[649]2188
[637]2189if(blk->mot[(lg/4)-4] != fin_block_mesure)
[649]2190
[637]2191 {
[649]2192
[637]2193 printf(" block type %s erreur de code fin de block : trouve %x au lieu de %x \n"
[649]2194
[637]2195 ,nom_block[type],(int)blk->mot[(lg/4)-4],fin_block_mesure);
[649]2196
[637]2197 return(block_fin_erreur);
[649]2198
[637]2199 }
2200
[649]2201
2202
[637]2203return(block_correct);
[649]2204
[637]2205}
2206
2207
2208
2209
2210
[649]2211
2212
2213
2214
2215
2216
Note: See TracBrowser for help on using the repository browser.