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

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

archediab 29

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