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

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

4 bit pour bolo on-of/bolo transmis

File size: 25.3 KB
RevLine 
[649]1
2#include "manip.h"
[637]3#include "archeops.h"
4
[649]5/* sauve vol trapani 2eme config de vol */
[637]6
[649]7/********** coefficients pour les mesures bolo **********************************/
8/* toutes les puissances en pW */
9/* -1- loi de reponse thermique des bolos avec R en ohms et T en Kelvin */
10/* */
11/* T = coef2 * ( ln ( R / coef1) ** ( -1 / coef0 ) */
12/* */
13/* -2- fuite thermique du bolo coef 3,4 */
14/* */
15/* Ptot = coef3 * ( (10*Tb) ** coef4 - (10*Tcryo) ** coef4 ) */
16/* */
17/* -3- calcul empirique de Pciel et de tau coef 5,6 */
18/* */
19/* Pciel = coef5 - Pelec coef5= I * Ai (tables xavier) */
20/* tau = - ln ( 1 + Pciel / coef6 ) coef6= I * Bi (tables xavier) */
21/* */
22/* Pour les thermometres 1 à 4 (germanium et carbone Allan-Bradley) */
23/* les coefficients sont utilisés differemment, ils permettent de convertir */
24/* R vers T ( c(6) est un offset sur la mesure de R par rapport aux mesures 4 fils)*/
25/* llR= log(log(R - c(6))-c(0)) */
26/* T = exp(c(1) + c(2)* llR + c(3)* llR* llR + c(4)* llR* llR* llR + */
27/* c(5)* llR* llR* llR* llR) */
28/* */
29/* version vol Trapani */
30/* on corrige le biais de temperature coef2=1.1 old, coef3=old/1.1^coef4 */
31/* */
32/* */
33/* */
34/* */
35/* */
36/****************************************************************************************/
37
38
[637]39/**************************************************************************************/
40/* */
41/* pour les MLPA : gain = 100 diviseur = 101 ou 330 */
42/* pour les bebodiff : gain = diviseur = 100Kohm / R preampli */
43/* pour les bebodiff : la capa est corrigee d'un facteur 0.868 */
44/* pour les cartes modifiees : mettre diviseur=0 */
45/* et capa = la resistance de chage en Megohm */
46/* */
47/**************************************************************************************/
48
49
[645]50/* numero_nom, on/off , 0 = MLPA , N° bolo , gain_pa , capa*1000 , diviseur , coef*10000 */
[639]51/* , 0 ou 1 , 2..8 = BEBO , hard , , 4700 , 333 , */
52/* 10 = Bediff , , , */
[637]53
[639]54/* pour les bediff (code 10) le n° de bolo est N° de bebo*8 + numero dans la bebo */
55/* soit : 1 2 3 4 5 6 .. 9 10 11 12 13 14 .. 17 18 19 20 21 22 .. etc */
[637]56
57
58/*debut_param*/
59/*---------------------------------- fenetre : -----------------------------------*/
60
[649]61/* ------------------------ configuration de vol 5 juillet 99-----------------------------*/
[651]62/* ---------------------- modifié les indices de bolo le 15 septembre 1999-------------------*/
[657]63/* contient au debut : numero_version,n_max_bolo,n_per_block,n_max_mes_per,nb_bolo */
[651]64
[649]65
[657]66param_bolo parametr={29,36,36,88,0,
[649]67
[657]68/* dans l'ordre : */
69/* 1- numero des caracteristiques du bolo */
70/* 2- transmission du bolo (normal = 7) (non transmis = 5) (thermo = 9) */
71/* 3- 10 = bebo differentielle */
72/* 4- numero de la voie de commande (8*n°bebo + N° dans la bebo) */
73/* 5- gain du preamplificateur */
74/* 6- capacite de modulation (en fF) */
75/* 7- diviseur pour la modulation */
[649]76
[639]77{
[657]78{ 11 , 5,10, 1 , 200, 22000 , 200 }, /* 0 */
79{ 9 , 7,10, 2 , 200, 22000 , 200 },
80{ 8 , 7,10, 3 , 200, 22000 , 200 },
81{ 14 , 5,10, 4 , 200, 22000 , 200 },
[637]82
[657]83{ 5 , 7,10, 5 ,1000, 4700 , 1000 }, /* 4 */
84{ 0 , 5,10, 6 ,1000, 4700 , 1000 },
85{ 10 , 7,10, 9 ,1000, 4700 , 1000 },
86{ 0 , 5,10,10, 1000, 4700 , 1000 },
[637]87
[657]88{ 2 , 7,10,11, 1000, 4700 , 1000 }, /* 8 */
89{ 4 , 7,10,12, 1000, 4700 , 1000 },
90{ 7 , 5,10,13, 1000, 4700 , 1000 },
91{ 1 , 7,10,14, 1000, 4700 , 1000 },
[637]92
[657]93{ 13 , 7,10,17, 1000, 4700 , 1000 }, /* 12 */
94{ 3 , 7,10,18, 1000, 4700 , 1000 },
[649]95{ 12 , 1,10,19, 1000, 4700 , 1000 },
[657]96{ 6 , 7,10,20, 1000, 4700 , 1000 },
[649]97
[657]98{ 15 , 7,10,21, 200, 22000 , 200 }, /* 16 */
99{ 16 , 7,10,22, 200, 22000 , 200 },
100{ 17 , 7,10,25, 500, 22000 , 500 },
101{ 18 , 5,10,26, 500, 22000 , 500 },
[649]102
[657]103{ 20 , 9,10,27, 1000, 22000 , 0 }, /* 20 */
104{ 21 , 9,10,28, 1000, 1000 , 0 },
105{ 22 , 9,10,29, 1000, 1000 , 0 },
106{ 23 , 9,10,30, 1000, 1000 , 0 },
[649]107
[657]108{ 0 , 0,10,30, 1000, 1000 , 0 }, /* 24 */
109{ 0 , 0,10,30, 1000, 1000 , 0 },
110{ 0 , 0,10,30, 1000, 1000 , 0 },
111{ 0 , 0,10,30, 1000, 1000 , 0 },
[649]112
[657]113{ 0 , 0,10,30, 1000, 1000 , 0 }, /* 28 */
114{ 0 , 0,10,30, 1000, 1000 , 0 },
115{ 0 , 0,10,30, 1000, 1000 , 0 },
116{ 0 , 0,10,30, 1000, 1000 , 0 },
[649]117
[657]118{ 0 , 0,10,30, 1000, 1000 , 0 }, /* 32 */
119{ 0 , 0,10,30, 1000, 1000 , 0 },
120{ 0 , 0,10,30, 1000, 1000 , 0 },
121{ 0 , 0,10,30, 1000, 1000 , 0 },
[649]122
[643]123},
124{
[649]125{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 0 */
126{ "ch1-bolo1" , { 5000 , 600000 , 154000, 63039, 25000, 0, 0} }, /* 1 */
127{ "ch1-bolo2" , { 5000 , 600000 , 154000, 47279, 25000, 0, 0} },
128{ "ch1-bolo3" , { 5000 , 600000 , 154000, 51219, 25000, 0, 0} },
129{ "ch2-bolo4" , { 5000 , 600000 , 154000, 70919, 25000, 0, 0} },
130{ "ch2-bolo5" , { 5000 , 600000 , 154000, 78799, 25000, 0, 0} },
131{ "ch3-bolo6" , { 5000 , 600000 , 154000, 86678, 25000, 0, 0} },
132
133{ "Dum100mK1" , { 5000 , 588000 , 125000, 0,0,0,0} }, /* 7 */
[645]134{ "Dum100mK2" , { 5000 , 588000 , 125000, 0,0,0,0} },
[649]135/*{ "Dum100mK3" , { 5000 , 1361800 , 125000, 0,0,0,0} }, */
136{ "Dum100mK4" , { 5000 , 1361800 , 125000, 0,0,0,0} }, /* 9 */
137/*{ "Dum100mK5" , { 5000 , 1361800 , 125000, 0,0,0,0} }, */
138{ "Dum100mK6" , { 5000 , 1361800 , 125000, 0,0,0,0} },
139
140{ "Lou100mK1" , { 5000 , 5680000 , 560000, 0,0,0,0} }, /* 11 */
[645]141{ "Lou100mK2" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[649]142{ "Lou100mK3" , { 5000 , 5680000 , 560000, 0,0,0,0} },
143{ "Lou100mK4" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[643]144
[649]145{ "Lou1.6K5 " , { 5000 , 0 , 0, 0,0,0,0} }, /* 15 */
146{ "Lou1.6K6 " , { 5000 , 0 , 0, 0,0,0,0} },
147{ "Lou10K7 " , { 5000 , 0 , 0, 0,0,0,0} },
148{ "Lou10K8 " , { 5000 , 0 , 0, 0,0,0,0} },
149
150{ "R10MOhm " , { 5000 , 0 , 0, 0,0,0,0} }, /* 19 */
151
152/* La germanium doit toujours etre en premier par rapport aux autres thermos absolus */
153{ "germanium" , { 0 , 30719 , -910 , -16389 , 2927 , 0, 0} }, /* 20 */
154{ "therm_4k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 52500} },
155{ "therm_1.6k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 566700} },
156{ "therm_10k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 138100} },
157
[652]158{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 24 */
159{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
160{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
161{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
162
163{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 28 */
164{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
165{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
166{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
167
168{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 32 */
169{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
170{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
171{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
172
173{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 36 */
174{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
175{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
176{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} },
177
[637]178}
[643]179
[637]180};
181/*fin_param*/
182
[645]183/* Definition Mai-Juin 1999
184{
185{ "v1-bedif1" , 1,10,1 , 200, 22000 , 200, { 5000 , 123100 , 334200,0,0,0,0} },
186{ "v1-bedif2" , 1,10,2 , 200, 22000 , 200, { 500 , 136180 , 9010,0,0,0,0} },
187{ "v1-bedif3" , 1,10,3 , 200, 22000 , 200, { 500 , 136180 , 9010,0,0,0,0} },
188{ "v1-bedif4" , 1,10,4 , 200, 22000 , 200, { 5000 , 123100 , 334200,0,0,0,0} },
189{ "v1-bedif5" , 1,10,5 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
190{ "v1-bedif6" , 1,10,6 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[637]191
[645]192{ "v1-bedif7" , 1,10,9 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
193{ "v1-bedif8" , 1,10,10, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
194{ "v1-bedif9" , 1,10,11, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
195{ "v1-bedif10" , 1,10,12, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
196{ "v1-bedif11" , 1,10,13, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
197{ "v1-bedif12" , 1,10,14, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[637]198
[645]199{ "v1-bedif13" , 1,10,17, 1000, 100000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
200{ "v1-bedif14" , 1,10,18, 1000, 470000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
201{ "bedif15" , 1,10,19, 1000, 470000 , 1000, { 500 , 58800 , 12500,0,0,0,0} },
202{ "bedif16" , 1,10,20, 1000,2200000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
203{ "bedif17" , 1,10,21, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
204{ "bedif18" , 1,10,22, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
205
206{ "v1-bedif19" , 2,10,25, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
207{ "v1-bedif20" , 2,10,26, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
208{ "germanium" , 3,10,27, 1000, 22000 , 0, { 3500 , 17100 , 646500,0,0,0,0} },
209{ "therm_4k" , 3,10,28, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
210{ "therm_1.6k" , 3,10,29, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
211{ "therm_10k" , 3,10,30, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
212
213}*/
214
[637]215/* bolos campagne 1998-1999 */
216/*
217reg_NbSi.J, 1, 0, 1, 100, 4.7, 333, .5 ,519.6 , 8.286
218v1-231...L, 1, 0, 2, 100, 4.7, 333, .5 , 1.7 , 32.41 , 0.333 , 10 , 20.30 , 11.41
219v1-232...N, 1, 0, 3, 100, 4.7, 333,
220v1-237...E, 1, 0, 4, 100, 4.7, 333,
221
222reg_JamieO, 1, 0, 5, 100, 4.7, 101,
223
224V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5 ,433.8 , 9.25
225V2-230...B, 1, 0, 7, 100, 4.7, 333, .5 , 8.26 , 26.61 , 5.10 , 7 , 9.354 , 1.026
226V2-205...Q, 1, 0, 8, 100, 4.7, 333, .518 , 81 , 25.2
227V2-208...P, 1, 0, 9, 100, 4.7, 333, .5 , 12.31 , 33.42 , 0.627 , 6.5 , 8.113 , 2.958
228
229*/
230/*bolos campagne 1997-1998 */
231/*
232
233v1-208...J, 1, 0, 1, 100, 4.7, 333, .5 , 12.31 , 33.42
234v1-232...L, 1, 0, 2, 100, 4.7, 333,
235v1-205...N, 1, 0, 3, 100, 4.7, 333, .518 , 81 , 25.2
236v1-NbSi..E, 1, 0, 4, 100, 4.7, 333, .5 ,519.6 , 8.286
237Jamie....O, 1, 0, 5, 100, 4.7, 101,
238V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5 ,433.8 , 9.25
239V2-224...B, 1, 0, 7, 100, 4.7, 333, .5 ,3.43 , 26.6
240V2-230...Q, 1, 0, 8, 100, 4.7, 333, .5 , 8.26 , 26.61
241V2-231...P, 1, 0, 9, 100, 4.7, 333, .5 , 1.7 , 32.41
242
243*/
244
245
[643]246int mode_transmission_telemesure[nb_modes_telemesure][nb_type_blocks]= {
[637]247
[643]248/* enregisteur de bord flash : plafond standard nominal */
[649]249/* 0*/ { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
[637]250
[649]251/* 1*/ { 0,10,10, 1, 10, 3, 0, 0, 0, 1, 0, 0, 1, 0, 4,2500, 0, 0, 0, 0},
252
253/* 2*/ { 0,10,05,01, 10,06, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
254
[643]255/* 3*/ { 0,10, 1,25, 10, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0},
256
257/* 4*/ { 0,10,15,50, 10,25, 0, 0, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
258
259/* 5*/ { 0,10,15,50, 10,25, 0, 0, 0, 0, 1, 0, 0, 0, 0,2500, 0, 0, 0, 0},
260
261/* 6*/ { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
262
[649]263/* 7*/ { 0,10,15,50,100,50, 1, 1, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
[643]264
[649]265/* 8*/ { 0,10,15,50,100,50, 1, 1, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
266
267/* 9*/ { 0,10, 1, 1,100, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0}
268
[643]269 };
270
271
272
273int mode_transmission_flash[nb_modes_flash][nb_type_blocks]= {
274
275
276/* enregisteur de bord flash : nominal */
277/* 0*/ { 0,50,15,25, 10,25, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0} ,
278
279/* enregisteur de bord flash : minimum */
280/* 1*/ { 0,50,50,50,50,100, 0, 0, 0, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0} ,
281
282/* enregisteur de bord flash : rien */
283/* 2*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} };
284
285
286
287
[649]288/*debut_nom_reglage*/
289/* 0->1 - demarrage par defaut - Nominal*/
290/* 1->2 - idem*/
291/* 2->3 - faible courant*/
292/* 3->4 - fort courant*/
293/* 4->5 - non fffdéfini*/
294/* 5->6 - non défini*/
295/* 6->7 - non défini*/
296/* 7->8 - non défini*/
[637]297/*fin_nom_reglage*/
298
299
300
301
302
303
304
[639]305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
[637]330reglage_bolo reglage_standard[8]={{
331
332
333/*debut reglage 0 */
[639]334#ifdef programme
[649]335{32,76,8,1},{
[639]336{20,0}
[649]337,{1311522837,256000}
338,{1048576021,256004}
[637]339,{20,0}
[649]340,{1048576021,256001}
[637]341,{20,0}
[649]342,{262144021,128003}
[639]343,{20,0}
[649]344,{262144021,128001}
345,{262144021,128001}
[639]346,{20,0}
[649]347,{1048576021,256257}
348,{1048576021,256003}
349,{262144021,128001}
350,{262144789,128001}
351,{262144021,128001}
352,{100663317,256002}
353,{100716053,155650}
354,{1048576277,256003}
[639]355,{20,0}
[649]356,{1024021,0}
357,{262165,0}
358,{65557,0}
359,{1024020,0}
[637]360},{
[649]361{1,21,16,4}
362,{1,21,13,4}
363,{1,21,20,4}
364,{1,21,20,4}
365,{0,21,0,4}
366,{0,21,0,4}
[637]367},{
[649]368{3,1,21,24,21,24,0}
[637]369,{0,1,9,1,0,0,0}
370,{0,1,9,1,0,0,0}
[649]371,{6,1,9,34,30,0,65326}
372},{5,3,129,108,0,126,104,88}
[639]373#else
[649]374{1,8,76,32},{
[639]375{20,0}
[649]376,{1311522837,256000}
377,{1048576021,256004}
[639]378,{20,0}
[649]379,{1048576021,256001}
[639]380,{20,0}
[649]381,{262144021,128003}
[639]382,{20,0}
[649]383,{262144021,128001}
384,{262144021,128001}
[639]385,{20,0}
[649]386,{1048576021,256257}
387,{1048576021,256003}
388,{262144021,128001}
389,{262144789,128001}
390,{262144021,128001}
391,{100663317,256002}
392,{100716053,155650}
393,{1048576277,256003}
[639]394,{20,0}
[649]395,{1024021,0}
396,{262165,0}
397,{65557,0}
398,{1024020,0}
[639]399},{
[649]400{4,16,21,1}
401,{4,13,21,1}
402,{4,20,21,1}
403,{4,20,21,1}
404,{4,0,21,0}
405,{4,0,21,0}
[639]406},{
[649]407{24,21,1,3,0,24,21}
[639]408,{1,9,1,0,0,0,0}
409,{1,9,1,0,0,0,0}
[649]410,{34,9,1,6,65326,0,30}
411},{108,129,3,5,88,104,126,0}
[639]412#endif
[637]413/*fin_reglage*/
414
[649]415
[637]416},{
417
418/*debut reglage 1 */
[639]419#ifdef programme
[649]420{32,76,8,1},{
[639]421{20,0}
[649]422,{1311522837,256000}
423,{1048576021,256004}
[637]424,{20,0}
[649]425,{1048576021,256001}
[637]426,{20,0}
[649]427,{262144021,128003}
[639]428,{20,0}
[649]429,{262144021,128001}
430,{262144021,128001}
[639]431,{20,0}
[649]432,{1048576021,256257}
433,{1048576021,256003}
434,{262144021,128001}
435,{262144789,128001}
436,{262144021,128001}
437,{100663317,256002}
438,{100716053,155650}
439,{1048576277,256003}
[639]440,{20,0}
[649]441,{1024021,0}
442,{262165,0}
443,{65557,0}
444,{1024020,0}
[637]445},{
[649]446{1,21,16,4}
447,{1,21,13,4}
448,{1,21,20,4}
449,{1,21,20,4}
450,{0,21,0,4}
451,{0,21,0,4}
[637]452},{
[649]453{3,1,21,24,21,24,0}
[637]454,{0,1,9,1,0,0,0}
455,{0,1,9,1,0,0,0}
[649]456,{6,1,9,34,30,0,65326}
457},{5,3,129,108,0,126,104,88}
[639]458#else
[649]459{1,8,76,32},{
[639]460{20,0}
[649]461,{1311522837,256000}
462,{1048576021,256004}
[639]463,{20,0}
[649]464,{1048576021,256001}
[639]465,{20,0}
[649]466,{262144021,128003}
[639]467,{20,0}
[649]468,{262144021,128001}
469,{262144021,128001}
[639]470,{20,0}
[649]471,{1048576021,256257}
472,{1048576021,256003}
473,{262144021,128001}
474,{262144789,128001}
475,{262144021,128001}
476,{100663317,256002}
477,{100716053,155650}
478,{1048576277,256003}
[639]479,{20,0}
[649]480,{1024021,0}
481,{262165,0}
482,{65557,0}
483,{1024020,0}
[639]484},{
[649]485{4,16,21,1}
486,{4,13,21,1}
487,{4,20,21,1}
488,{4,20,21,1}
489,{4,0,21,0}
490,{4,0,21,0}
[639]491},{
[649]492{24,21,1,3,0,24,21}
[639]493,{1,9,1,0,0,0,0}
494,{1,9,1,0,0,0,0}
[649]495,{34,9,1,6,65326,0,30}
496},{108,129,3,5,88,104,126,0}
[639]497#endif
[637]498/*fin_reglage*/
499
500},{
501
502/*debut reglage 2 */
[639]503#ifdef programme
[649]504{32,76,8,1},{
505{20,0}
506,{100721941,256000}
507,{1048607509,256004}
508,{20,0}
509,{1048586773,256003}
510,{20,0}
511,{50335509,128001}
512,{20,0}
513,{50331669,128001}
514,{50336789,128001}
515,{20,0}
516,{1048622101,256259}
517,{1048635413,256003}
518,{50331669,128001}
519,{50352661,128001}
520,{50337813,128001}
521,{100665109,256002}
522,{100664597,155650}
523,{1048600341,256003}
524,{20,0}
525,{1024021,0}
526,{65557,0}
527,{65557,0}
528,{262165,0}
[637]529},{
[649]530{1,21,11,4}
531,{1,21,13,4}
532,{1,21,20,4}
533,{1,21,20,4}
534,{0,20,0,1}
535,{0,20,0,1}
[637]536},{
[649]537{3,1,21,24,21,24,0}
538,{0,1,9,1,0,0,0}
539,{0,1,9,1,0,0,0}
540,{6,17,0,34,30,0,65386}
541},{5,3,129,108,0,126,104,88}
[639]542#else
[649]543{1,8,76,32},{
544{20,0}
545,{100721941,256000}
546,{1048607509,256004}
547,{20,0}
548,{1048586773,256003}
549,{20,0}
550,{50335509,128001}
551,{20,0}
552,{50331669,128001}
553,{50336789,128001}
554,{20,0}
555,{1048622101,256259}
556,{1048635413,256003}
557,{50331669,128001}
558,{50352661,128001}
559,{50337813,128001}
560,{100665109,256002}
561,{100664597,155650}
562,{1048600341,256003}
563,{20,0}
564,{1024021,0}
565,{65557,0}
566,{65557,0}
567,{262165,0}
[639]568},{
[649]569{4,11,21,1}
570,{4,13,21,1}
571,{4,20,21,1}
572,{4,20,21,1}
573,{1,0,20,0}
574,{1,0,20,0}
[639]575},{
[649]576{24,21,1,3,0,24,21}
577,{1,9,1,0,0,0,0}
578,{1,9,1,0,0,0,0}
579,{34,0,17,6,65386,0,30}
580},{108,129,3,5,88,104,126,0}
[639]581#endif
[637]582/*fin_reglage*/
583
584},{
585
586/*debut reglage 3 */
[639]587#ifdef programme
[649]588{32,76,8,1},{
[639]589{20,0}
[649]590,{100721941,256000}
591,{1048607509,256004}
[637]592,{20,0}
[649]593,{1048586773,256003}
[637]594,{20,0}
[649]595,{524291861,128001}
[639]596,{20,0}
[649]597,{524288021,128001}
598,{524293141,128001}
[639]599,{20,0}
[649]600,{1048622101,256259}
601,{1048635413,256003}
602,{524288021,128001}
603,{524309013,128001}
604,{524294165,128001}
605,{100665109,256002}
606,{100664597,155650}
607,{1048600341,256003}
[639]608,{20,0}
[649]609,{1024021,0}
610,{65557,0}
611,{65557,0}
612,{65557,0}
[637]613},{
[649]614{1,21,18,4}
615,{1,21,13,4}
616,{1,21,20,4}
617,{1,21,20,4}
618,{0,20,0,1}
619,{0,20,0,1}
[637]620},{
[649]621{3,1,21,24,21,24,0}
[639]622,{0,1,9,1,0,0,0}
623,{0,1,9,1,0,0,0}
[649]624,{6,17,0,34,30,0,65386}
625},{5,3,129,108,0,126,104,88}
[639]626#else
[649]627{1,8,76,32},{
[639]628{20,0}
[649]629,{100721941,256000}
630,{1048607509,256004}
[639]631,{20,0}
[649]632,{1048586773,256003}
[639]633,{20,0}
[649]634,{524291861,128001}
[639]635,{20,0}
[649]636,{524288021,128001}
637,{524293141,128001}
[639]638,{20,0}
[649]639,{1048622101,256259}
640,{1048635413,256003}
641,{524288021,128001}
642,{524309013,128001}
643,{524294165,128001}
644,{100665109,256002}
645,{100664597,155650}
646,{1048600341,256003}
[639]647,{20,0}
[649]648,{1024021,0}
649,{65557,0}
650,{65557,0}
651,{65557,0}
[639]652},{
[649]653{4,18,21,1}
654,{4,13,21,1}
655,{4,20,21,1}
656,{4,20,21,1}
657,{1,0,20,0}
658,{1,0,20,0}
[639]659},{
[649]660{24,21,1,3,0,24,21}
[639]661,{1,9,1,0,0,0,0}
662,{1,9,1,0,0,0,0}
[649]663,{34,0,17,6,65386,0,30}
664},{108,129,3,5,88,104,126,0}
[639]665#endif
[637]666/*fin_reglage*/
667
668},{
669
670/*debut reglage 4 */
[639]671#ifdef programme
[649]672{39,62,9,1},{
[639]673{20,0}
[649]674,{-100659180,229382}
675,{-100659436,294918}
[637]676,{20,0}
[649]677,{-100663276,221189}
678,{-100663276,5}
679,{-100659436,245762}
680,{-100663276,5}
681,{-100658154,245761}
682,{-100658156,253954}
[637]683,{20,0}
[649]684,{-100663276,204805}
685,{-100663276,16389}
686,{-100656874,1}
687,{-100656874,16385}
688,{-100663276,3}
689,{-100506347,6}
690,{-100509675,6}
691,{-100372972,6}
692,{2097174,0}
[639]693,{1024022,0}
[649]694,{16406,0}
695,{4117,0}
696,{262164,0}
[639]697},{
[649]698{2,22,24,1}
699,{1,20,24,4}
700,{0,20,24,4}
701,{0,20,24,3}
702,{0,20,24,4}
703,{0,20,24,4}
[639]704},{
705{0,1,9,1,0,0,0}
706,{0,1,9,1,0,0,0}
707,{0,1,9,1,0,0,0}
708,{0,1,9,1,0,0,0}
[649]709},{2,3,129,108,2,126,104,88}
[639]710#else
[649]711{1,9,62,39},{
[639]712{20,0}
[649]713,{-100659180,229382}
714,{-100659436,294918}
[639]715,{20,0}
[649]716,{-100663276,221189}
717,{-100663276,5}
718,{-100659436,245762}
719,{-100663276,5}
720,{-100658154,245761}
721,{-100658156,253954}
[639]722,{20,0}
[649]723,{-100663276,204805}
724,{-100663276,16389}
725,{-100656874,1}
726,{-100656874,16385}
727,{-100663276,3}
728,{-100506347,6}
729,{-100509675,6}
730,{-100372972,6}
731,{2097174,0}
[639]732,{1024022,0}
[649]733,{16406,0}
734,{4117,0}
735,{262164,0}
[639]736},{
[649]737{1,24,22,2}
738,{4,24,20,1}
739,{4,24,20,0}
740,{3,24,20,0}
741,{4,24,20,0}
742,{4,24,20,0}
[639]743},{
744{1,9,1,0,0,0,0}
745,{1,9,1,0,0,0,0}
746,{1,9,1,0,0,0,0}
747,{1,9,1,0,0,0,0}
[649]748},{108,129,3,2,88,104,126,2}
[639]749#endif
750/*fin_reglage*/
751
752},{
753
754/*debut reglage 5 */
755#ifdef programme
[649]756{39,68,9,1},{
757{20,0}
758,{1048982293,229382}
759,{1049128469,253958}
760,{20,0}
761,{1048966677,245765}
762,{20,0}
763,{262157846,245762}
764,{1048919829,5}
765,{262156054,245761}
766,{262154006,253954}
767,{20,0}
768,{1049123349,229381}
769,{1049157141,237573}
770,{262154262,1}
771,{262158614,16385}
772,{262149654,3}
773,{262750740,237572}
774,{262606612,122884}
775,{-1174095083,139270}
776,{20,0}
777,{16406,0}
778,{16406,0}
779,{4117,0}
780,{262164,0}
[637]781},{
[649]782{1,22,16,1}
783,{1,22,16,4}
784,{1,22,16,4}
785,{1,20,16,3}
786,{1,21,20,4}
787,{1,21,20,4}
[637]788},{
[649]789{0,1,9,1,0,0,0}
790,{0,1,9,1,0,0,0}
791,{0,1,9,1,0,0,0}
792,{0,1,9,1,0,0,0}
793},{2,3,129,108,3,126,104,88}
[639]794#else
[649]795{1,9,68,39},{
796{20,0}
797,{1048982293,229382}
798,{1049128469,253958}
799,{20,0}
800,{1048966677,245765}
801,{20,0}
802,{262157846,245762}
803,{1048919829,5}
804,{262156054,245761}
805,{262154006,253954}
806,{20,0}
807,{1049123349,229381}
808,{1049157141,237573}
809,{262154262,1}
810,{262158614,16385}
811,{262149654,3}
812,{262750740,237572}
813,{262606612,122884}
814,{-1174095083,139270}
815,{20,0}
816,{16406,0}
817,{16406,0}
818,{4117,0}
819,{262164,0}
[639]820},{
[649]821{1,16,22,1}
822,{4,16,22,1}
823,{4,16,22,1}
824,{3,16,20,1}
825,{4,20,21,1}
826,{4,20,21,1}
[639]827},{
[649]828{1,9,1,0,0,0,0}
829,{1,9,1,0,0,0,0}
830,{1,9,1,0,0,0,0}
831,{1,9,1,0,0,0,0}
832},{108,129,3,2,88,104,126,3}
[639]833#endif
[637]834/*fin_reglage*/
835
836},{
837
[639]838/*debut reglage 6 */
839#ifdef programme
[643]840{197,191,175,185},{
[639]841{0,0}
[637]842,{0,0}
843,{0,0}
844,{0,0}
845,{0,0}
846,{0,0}
847,{0,0}
[639]848,{0,0}
849,{0,0}
850,{0,0}
851,{0,0}
852,{0,0}
853,{0,0}
854,{0,0}
855,{0,0}
856,{0,0}
857,{0,0}
858,{0,0}
859,{0,0}
860,{0,0}
861,{0,0}
862,{0,0}
863,{0,0}
864,{0,0}
[637]865},{
[639]866{106,98,93,71}
867,{66,74,87,66}
868,{48,46,38,33}
869,{40,41,33,26}
870,{25,29,40,57}
871,{63,62,71,80}
[637]872},{
[639]873{83,79,75,75,92,112,31100}
874,{125,126,117,113,107,94,20315}
875,{108,116,122,124,117,120,32117}
876,{110,99,94,98,107,93,17217}
877},{88,82,94,108,111,126,104,88}
878#else
[643]879{185,175,191,197},{
[639]880{0,0}
881,{0,0}
882,{0,0}
883,{0,0}
884,{0,0}
885,{0,0}
886,{0,0}
887,{0,0}
888,{0,0}
889,{0,0}
890,{0,0}
891,{0,0}
892,{0,0}
893,{0,0}
894,{0,0}
895,{0,0}
896,{0,0}
897,{0,0}
898,{0,0}
899,{0,0}
900,{0,0}
901,{0,0}
902,{0,0}
903,{0,0}
904},{
905{71,93,98,106}
906,{66,87,74,66}
907,{33,38,46,48}
908,{26,33,41,40}
909,{57,40,29,25}
910,{80,71,62,63}
911},{
912{75,75,79,83,31100,112,92}
913,{113,117,126,125,20315,94,107}
914,{124,122,116,108,32117,120,117}
915,{98,94,99,110,17217,93,107}
916},{108,94,82,88,88,104,126,111}
917#endif
[637]918/*fin_reglage*/
919
920},{
921
922/*debut reglage 7 */
[639]923#ifdef programme
[643]924{197,191,175,185},{
[639]925{0,0}
926,{0,0}
927,{0,0}
928,{0,0}
929,{0,0}
930,{0,0}
931,{0,0}
932,{0,0}
933,{0,0}
934,{0,0}
935,{0,0}
936,{0,0}
937,{0,0}
938,{0,0}
939,{0,0}
940,{0,0}
941,{0,0}
942,{0,0}
943,{0,0}
944,{0,0}
945,{0,0}
946,{0,0}
947,{0,0}
948,{0,0}
949},{
950{106,98,93,71}
951,{66,74,87,66}
952,{48,46,38,33}
953,{40,41,33,26}
954,{25,29,40,57}
955,{63,62,71,80}
956},{
957{83,79,75,75,92,112,31100}
958,{125,126,117,113,107,94,20315}
959,{108,116,122,124,117,120,32117}
960,{110,99,94,98,107,93,17217}
961},{88,82,94,108,111,126,104,88}
962#else
[643]963{185,175,191,197},{
[639]964{0,0}
965,{0,0}
966,{0,0}
967,{0,0}
968,{0,0}
969,{0,0}
970,{0,0}
971,{0,0}
972,{0,0}
973,{0,0}
974,{0,0}
975,{0,0}
976,{0,0}
977,{0,0}
978,{0,0}
979,{0,0}
980,{0,0}
981,{0,0}
982,{0,0}
983,{0,0}
984,{0,0}
985,{0,0}
986,{0,0}
987,{0,0}
988},{
989{71,93,98,106}
990,{66,87,74,66}
991,{33,38,46,48}
992,{26,33,41,40}
993,{57,40,29,25}
994,{80,71,62,63}
995},{
996{75,75,79,83,31100,112,92}
997,{113,117,126,125,20315,94,107}
998,{124,122,116,108,32117,120,117}
999,{98,94,99,110,17217,93,107}
1000},{108,94,82,88,88,104,126,111}
1001#endif
[637]1002/*fin_reglage*/
1003
1004} };
1005
[649]1006
1007
1008
[637]1009int calcul_somme_block(block_type_modele* blk,int longueur)
1010{
1011int i,so=0;;
1012for(i=0;i<(longueur/4-4);i++) so^=(int)blk->mot[i];
1013/* somme sur tous les mots internes : on exclus le dbut, les codes et la fin */
1014return((so^(so>>16))&0xffff);
1015}
1016
1017
1018
1019
1020void valide_block(block_type_modele* blk,int type,int block_num)
1021{
1022int somme,longueur;
1023def_long_block
1024longueur=long_block[type];
1025/*printf("valide block adresse %x type %d numblock %d longueur=%d \n" */
1026/* ,(unsigned)blk,type,block_num,longueur);*/
1027blk->debut = debut_block_mesure;
[649]1028somme=0;blk->code1 = (((long)longueur)<<16) | somme;
[637]1029blk->code2 = (((long)block_num) & 0xffffff ) | ( (((long)type)<<24)&0xff000000 );
1030
1031blk->mot[longueur/4-4] = fin_block_mesure;
[649]1032
1033#if defined(_ECC_LIB_H_)
1034{
1035int place_ecc;
1036place_ecc=(longueur-4-ECC_SIZE-SIZE_HEAD-((longueur-4-SIZE_HEAD)/ECC_TOTAL)*ECC_SIZE)/4;
1037SetEcc( blk, (unsigned char *) &(blk->mot[place_ecc] ) ) ;
1038}
1039#endif
1040
[637]1041somme=calcul_somme_block(blk,longueur);
1042blk->code1 = (((long)longueur)<<16) | somme;
[649]1043/* l'ecc est faux car on a change la somme: mettre la somme a zero avant de tester ecc */
[637]1044}
1045
[649]1046/* Quand on est sur une machine swappee, on ne cherche pas a verifier */
1047/* le checksum, puisqu'on a modifie les blocs, sans swapper par exemple */
1048/* les chars des noms de bolometres et des chaines GPS... */
1049#ifdef __alpha
1050#define SWAP
1051#endif
1052#if defined(Linux) || defined(linux)
1053#define SWAP
1054#endif
1055
1056
1057
[637]1058int verifie_block(block_type_modele* blk)
1059{
1060int type,lg,som;
1061def_long_block
1062if(blk->debut != debut_block_mesure) return(block_debut_erreur);
1063type=type_block(blk); if( (type<0) ||(type>=nb_type_blocks) ) return(block_type_inconnu);
1064lg=longueur_block(blk); if( lg != long_block[type] ) return(block_longueur_erreur);
1065if( blk->mot[(lg/4)-4] != fin_block_mesure) return(block_fin_erreur);
[649]1066#ifndef SWAP
[637]1067som=calcul_somme_block(blk,lg); if( som!= somme_block(blk)) return(block_somme_erreur);
[649]1068#endif
[637]1069return(block_correct);
1070}
1071
1072
1073int verifie_block_printf(block_type_modele* blk)
1074{
1075int type,lg,som;
1076def_long_block
1077def_nom_block
1078if(blk->debut != debut_block_mesure)
1079 {
1080 printf(" erreur dans le code debut de block \n");
1081 return(block_debut_erreur);
1082 }
1083
1084type=type_block(blk);
1085if( (type<0) || (type>nb_type_blocks) )
1086 {
1087 printf(" block de type %d inconnu\n",type);
1088 return(block_type_inconnu);
1089 }
1090
1091lg=longueur_block(blk);
1092if( lg!=long_block[type] )
1093 {
1094 printf(" block type %s erreur de longueur (nominal=%d , dans le block=%d \n"
1095 ,nom_block[type],long_block[type],lg);
1096 return(block_longueur_erreur);
1097 }
1098
1099som=calcul_somme_block(blk,lg);
1100if( som!=somme_block(blk) )
1101 {
1102 printf(" block type %s : erreur de somme (calculee=%d , dans le block=%d \n"
1103 ,nom_block[type],som,somme_block(blk) );
1104 return(block_somme_erreur);
1105 }
1106
1107if(blk->mot[(lg/4)-4] != fin_block_mesure)
1108 {
1109 printf(" block type %s erreur de code fin de block : trouve %x au lieu de %x \n"
1110 ,nom_block[type],(int)blk->mot[(lg/4)-4],fin_block_mesure);
1111 return(block_fin_erreur);
1112 }
1113
1114return(block_correct);
1115}
1116
1117
1118
1119
1120
Note: See TracBrowser for help on using the repository browser.