Ignore:
Timestamp:
Nov 25, 1999, 2:56:34 PM (26 years ago)
Author:
ansari
Message:

archediab 28 vol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archediab.old/archeops.c

    r645 r649  
    1 #include "manip.h"
     1
     2
     3#include "manip.h"     
     4
    25#include "archeops.h"
    36
    47
    58
    6 /**********  coefficients  pour  les  mesures  bolo    ********************************/
    7 /*                         toutes les puissances en pW                                */
    8 /*      -1-     loi de reponse thermique des bolos  avec R en ohms et T en Kelvin     */
     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
    979/*                                                                                    */
    10 /*      T =  coef2  *   (   ln (  R / coef1) **  ( -1 / coef0 )                       */
     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
    1191/*                                                                                    */
    12 /*      -2-     fuite thermique du bolo   coef 3,4                                    */
    13 /*                                                                                    */
    14 /*      Ptot =  coef3  *  ( (10*Tb) ** coef4    -    (10*Tcryo)  **  coef4 )          */
    15 /*                                                                                    */
    16 /*      -3-     calcul empirique de Pciel et de  tau      coef  5,6                   */
    17 /*                                                                                    */
    18 /*      Pciel   =       coef5   - Pelec         coef5= I * Ai (tables xavier)         */
    19 /*      tau     =       - ln ( 1 +  Pciel / coef6 )     coef6= I * Bi (tables xavier) */
    20 /*                                                                                    */
    21 /* Pour les thermometres 1 à 4 (germanium et carbone Allan-Bradley)                   */
    22 /* les coefficients sont utilisés differemment, ills permettent de convertir          */
    23 /* R vers T                                                                           */
    24 /*   llR= log(log(R)-c(0))                                                            */
    25 /*    T = exp(c(1) + c(2)* llR + c(3)* llR* llR + c(4)* llR* llR* llR +               */
    26 /*            c(5)* llR* llR* llR* llR)                                               */
    27 /*                                                                                    */
     92
    2893/**************************************************************************************/
    2994
    3095
    31 /**************************************************************************************/
    32 /*                                                                                    */
    33 /*   pour les MLPA      :  gain = 100   diviseur = 101  ou  330                       */
    34 /*   pour les bebodiff  :  gain = diviseur = 100Kohm / R preampli                     */
    35 /*   pour les bebodiff  :  la capa est corrigee d'un facteur 0.868                    */
    36 /*   pour les cartes modifiees : mettre diviseur=0                                    */
    37 /*                         et capa = la resistance de chage en Megohm                 */
    38 /*                                                                                    */
    39 /**************************************************************************************/
     96
    4097
    4198
    4299/*  numero_nom,  on/off  ,  0 = MLPA       , N° bolo , gain_pa  , capa*1000 , diviseur , coef*10000 */
     100
    43101/*       ,  0 ou 1  ,  2..8 = BEBO    ,  hard   ,           ,  4700     ,  333     ,            */
     102
    44103/*                     10 = Bediff    ,         ,           ,                                   */
    45104
     105
     106
    46107/* pour les bediff (code 10)  le n° de bolo est  N° de bebo*8  +  numero dans la bebo           */
     108
    47109/*  soit :  1 2 3 4 5 6  ..  9 10 11 12 13 14 .. 17 18 19 20 21 22 .. etc                       */
    48110
    49111
     112
     113
     114
    50115/*debut_param*/
     116
    51117/*----------------------------------  fenetre :  -----------------------------------*/
    52118
    53 param_bolo  parametr={27,24,36,88,18,
     119
     120
     121/* ------------------------ configuration de vol 5 juillet 99-----------------------------*/
     122
     123param_bolo  parametr={28,24,36,88,18,
     124
     125
    54126
    55127{
    56 {  0    , 2,10,1 ,  200, 22000  ,  200 },       
    57 { 10    , 1,10,2 ,  200, 22000  ,  200 },
    58 {  8    , 1,10,3 ,  200, 22000  ,  200 },
    59 {  0    , 2,10,4 ,  200, 22000  ,  200 },
    60 
    61 {  2    , 1,10,5 , 1000, 4700   , 1000 },
    62 {  0    , 2,10,6 , 1000, 4700   , 1000 },
    63 {  4    , 1,10,9 , 1000, 4700   , 1000 },
    64 {  0    , 2,10,10, 1000, 4700   , 1000 },
    65 
    66 { 10    , 1,10,11, 1000, 4700   , 1000 },
    67 {  7    , 1,10,12, 1000, 4700   , 1000 },
    68 {  0    , 1,10,13, 1000, 4700   , 1000 },
    69 { 17    , 1,10,14, 1000, 4700   , 1000 },
    70 
    71 {  3    , 1,10,17, 1000, 4700   , 1000 },
    72 {  1    , 1,10,18, 1000, 4700   , 1000 },
    73 {  5    , 1,10,19, 1000, 4700   , 1000 },
    74 {  0    , 1,10,20, 1000, 4700   , 1000 },
    75 
    76 { 13    , 1,10,21,  500, 22000  ,  500 },
    77 { 14    , 1,10,22,  500, 22000  ,  500 },
    78 { 15    , 1,10,25,  500, 22000  ,  500 },
    79 { 16    , 1,10,26,  500, 22000  ,  500 },
    80 
    81 { 21    , 3,10,27, 1000, 22000  ,    0 },
    82 { 22    , 3,10,28, 1000, 1000   ,    0 },
    83 { 23    , 3,10,29, 1000, 1000   ,    0 },
    84 { 19    , 3,10,30, 1000, 1000   ,    0 },
     128
     129{ 11    , 2,10, 1 , 200, 22000  ,  200 },       /*      1       */
     130
     131{  9    , 1,10, 2 , 200, 22000  ,  200 },
     132
     133{  8    , 1,10, 3 , 200, 22000  ,  200 },
     134
     135{ 14    , 2,10, 4 , 200, 22000  ,  200 },
     136
     137
     138
     139{  5    , 1,10, 5 ,1000,  4700  , 1000 },       /*      5       */
     140
     141{  0    , 2,10, 6 ,1000,  4700  , 1000 },
     142
     143{ 10    , 1,10, 9 ,1000,  4700  , 1000 },
     144
     145{  0    , 2,10,10, 1000,  4700  , 1000 },
     146
     147
     148
     149{  2    , 1,10,11, 1000,  4700  , 1000 },       /*      9       */
     150
     151{  4    , 1,10,12, 1000,  4700  , 1000 },
     152
     153{  7    , 2,10,13, 1000,  4700  , 1000 },
     154
     155{  1    , 1,10,14, 1000,  4700  , 1000 },
     156
     157
     158
     159{ 13    , 1,10,17, 1000,  4700  , 1000 },       /*      13      */
     160
     161{  3    , 1,10,18, 1000,  4700  , 1000 },
     162
     163{ 12            , 1,10,19, 1000,  4700  , 1000 },
     164
     165{  6    , 1,10,20, 1000,  4700  , 1000 },
     166
     167
     168
     169{ 15    , 1,10,21,  200, 22000  ,  200 },       /*      17      */
     170
     171{ 16    , 1,10,22,  200, 22000  ,  200 },
     172
     173{ 17    , 1,10,25,  500, 22000  ,  500 },
     174
     175{ 18    , 2,10,26,  500, 22000  ,  500 },
     176
     177
     178
     179{ 20    , 3,10,27, 1000, 22000  ,    0 },       /*      21      */
     180
     181{ 21    , 3,10,28, 1000,  1000  ,    0 },
     182
     183{ 22    , 3,10,29, 1000,  1000  ,    0 },
     184
     185{ 23    , 3,10,30, 1000,  1000  ,    0 },
     186
     187
    85188
    86189},
     190
    87191{
    88 { "Niente"    , { 5000  ,  0 , 0,   0,0,0,0} },                 
    89 { "ch1-bolo1"  , { 5000  ,  600000 , 140000,  80000, 25000, 0, 0}  },           
    90 { "ch1-bolo2"  , { 5000  ,  600000 , 140000,  60000, 25000, 0, 0}  },
    91 { "ch1-bolo3"  , { 5000  ,  600000 , 140000,  65000, 25000, 0, 0}  },
    92 { "ch2-bolo4"  , { 5000  ,  600000 , 140000,  90000, 25000, 0, 0}  },
    93 
    94 { "ch2-bolo5"  , { 5000  ,  600000 , 140000, 100000, 25000, 0, 0}  },   
    95 { "ch2-bolo6"  , { 5000  ,  600000 , 140000, 110000, 25000, 0, 0}  },
    96 { "Dum100mK1"  , { 5000  ,  588000 , 125000,  0,0,0,0} },
     192
     193{ "Niente   "    , { 5000  ,  0 , 0,   0,0,0,0} },                      /*      0       */
     194
     195{ "ch1-bolo1"  , { 5000  ,  600000 , 154000,  63039, 25000, 0, 0}  },           /*      1       */     
     196
     197{ "ch1-bolo2"  , { 5000  ,  600000 , 154000,  47279, 25000, 0, 0}  },
     198
     199{ "ch1-bolo3"  , { 5000  ,  600000 , 154000,  51219, 25000, 0, 0}  },
     200
     201{ "ch2-bolo4"  , { 5000  ,  600000 , 154000,  70919, 25000, 0, 0}  },
     202
     203{ "ch2-bolo5"  , { 5000  ,  600000 , 154000,  78799, 25000, 0, 0}  },   
     204
     205{ "ch3-bolo6"  , { 5000  ,  600000 , 154000,  86678, 25000, 0, 0}  },
     206
     207
     208
     209{ "Dum100mK1"  , { 5000  ,  588000 , 125000,  0,0,0,0} },                               /*      7       */
     210
    97211{ "Dum100mK2"  , { 5000  ,  588000 , 125000,  0,0,0,0} },
    98212
    99 { "Dum100mK3"  , { 5000  , 1361800 , 125000,  0,0,0,0} },               
    100 { "Dum100mK4"  , { 5000  , 1361800 , 125000,  0,0,0,0} },               
    101 { "Lou100mK1"  , { 5000  , 5680000 , 560000,  0,0,0,0} },
     213/*{ "Dum100mK3"  , { 5000  , 1361800 , 125000,  0,0,0,0} },             */
     214
     215{ "Dum100mK4"  , { 5000  , 1361800 , 125000,  0,0,0,0} },                           /* 9 */
     216
     217/*{ "Dum100mK5"  , { 5000  , 1361800 , 125000,  0,0,0,0} },             */
     218
     219{ "Dum100mK6"  , { 5000  , 1361800 , 125000,  0,0,0,0} },               
     220
     221
     222
     223{ "Lou100mK1"  , { 5000  , 5680000 , 560000,  0,0,0,0} },                   /* 11 */
     224
    102225{ "Lou100mK2"  , { 5000  , 5680000 , 560000,  0,0,0,0} },
    103226
    104 { "Lou1.6K5"   , { 5000  ,  0 , 0,   0,0,0,0} }, 
    105 { "Lou1.6K6"   , { 5000  ,  0 , 0,   0,0,0,0} }, 
    106 { "Lou10K7"    , { 5000  ,  0 , 0,   0,0,0,0} }, 
    107 { "Lou10K8"    , { 5000  ,  0 , 0,   0,0,0,0} },
    108 
    109 { "R10MOhm"    , { 5000  ,  0 , 0,   0,0,0,0} }, 
    110 { "bedif18"     , { 5000  , 123100 , 334200,  0,0,0,0} },
    111 { "v1-bedif19"  , { 5000  , 123100 , 334200,  0,0,0,0} },
    112 { "therm_10k"   , { 45000 ,  28907 , 16028 , -1327 , 1472 , 872, 0} },         
    113 
    114 { "germanium"   , {     0 ,  30719 ,  -910 ,-16389 , 2927 ,   0, 0} },   
    115 { "therm_4k"    , { 45000 ,  28907 , 16028 , -1327 , 1472 , 872, 0} },
    116 { "therm_1.6k"  , { 45000 ,  28907 , 16028 , -1327 , 1472 , 872, 0} },
     227{ "Lou100mK3"  , { 5000  , 5680000 , 560000,  0,0,0,0} },
     228
     229{ "Lou100mK4"  , { 5000  , 5680000 , 560000,  0,0,0,0} },
     230
     231
     232
     233{ "Lou1.6K5 "  , { 5000  ,  0 , 0,   0,0,0,0} },                                                /*      15      */
     234
     235{ "Lou1.6K6 "  , { 5000  ,  0 , 0,   0,0,0,0} }, 
     236
     237{ "Lou10K7  "  , { 5000  ,  0 , 0,   0,0,0,0} }, 
     238
     239{ "Lou10K8  "  , { 5000  ,  0 , 0,   0,0,0,0} },
     240
     241
     242
     243{ "R10MOhm  "  , { 5000  ,  0 , 0,   0,0,0,0} },                                                        /*      19      */
     244
     245
     246
     247/* La germanium doit toujours etre en premier par rapport aux autres thermos absolus */
     248
     249{ "germanium"  , {     0 ,  30719 ,   -910 , -16389 , 2927 ,   0,      0} }, /* 20      */
     250
     251{ "therm_4k"   , { 45000 ,  28907 , -16028 ,  -1327 , 1472 , 872,  52500} },
     252
     253{ "therm_1.6k" , { 45000 ,  28907 , -16028 ,  -1327 , 1472 , 872, 566700} },
     254
     255{ "therm_10k"  , { 45000 ,  28907 , -16028 ,  -1327 , 1472 , 872, 138100} },
     256
     257
    117258
    118259}
    119260
     261
     262
    120263};
     264
    121265/*fin_param*/
    122266
     267
     268
    123269/* Definition Mai-Juin 1999
     270
    124271{
     272
    125273{ "v1-bedif1"  , 1,10,1 ,  200, 22000   ,  200,  { 5000  , 123100 , 334200,0,0,0,0} },         
     274
    126275{ "v1-bedif2"  , 1,10,2 ,  200, 22000   ,  200,  {  500  , 136180 ,   9010,0,0,0,0} },
     276
    127277{ "v1-bedif3"  , 1,10,3 ,  200, 22000   ,  200,  {  500  , 136180 ,   9010,0,0,0,0} },
     278
    128279{ "v1-bedif4"  , 1,10,4 ,  200, 22000   ,  200,  { 5000  , 123100 , 334200,0,0,0,0} },
     280
    129281{ "v1-bedif5"  , 1,10,5 , 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     282
    130283{ "v1-bedif6"  , 1,10,6 , 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
    131284
     285
     286
    132287{ "v1-bedif7"  , 1,10,9 , 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     288
    133289{ "v1-bedif8"  , 1,10,10, 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     290
    134291{ "v1-bedif9"  , 1,10,11, 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     292
    135293{ "v1-bedif10" , 1,10,12, 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     294
    136295{ "v1-bedif11" , 1,10,13, 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     296
    137297{ "v1-bedif12" , 1,10,14, 1000, 4700    , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
    138298
     299
     300
    139301{ "v1-bedif13"  , 1,10,17, 1000, 100000 , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     302
    140303{ "v1-bedif14"  , 1,10,18, 1000, 470000 , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     304
    141305{ "bedif15"     , 1,10,19, 1000, 470000 , 1000,  {  500  ,  58800 ,  12500,0,0,0,0} },
     306
    142307{ "bedif16"     , 1,10,20, 1000,2200000 , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     308
    143309{ "bedif17"     , 1,10,21, 1000, 4700   , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     310
    144311{ "bedif18"     , 1,10,22, 1000, 4700   , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
    145312
     313
     314
    146315{ "v1-bedif19"  , 2,10,25, 1000, 4700   , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     316
    147317{ "v1-bedif20"  , 2,10,26, 1000, 4700   , 1000,  { 5000  , 123100 , 334200,0,0,0,0} },
     318
    148319{ "germanium"   , 3,10,27, 1000, 22000  ,    0,  { 3500  ,  17100 , 646500,0,0,0,0} },
     320
    149321{ "therm_4k"    , 3,10,28, 1000, 1000   ,    0,  {12000  ,1804000 ,  72800,0,0,0,0} },
     322
    150323{ "therm_1.6k"  , 3,10,29, 1000, 1000   ,    0,  {12000  ,1804000 ,  72800,0,0,0,0} },
     324
    151325{ "therm_10k"   , 3,10,30, 1000, 1000   ,    0,  {12000  ,1804000 ,  72800,0,0,0,0} },
    152326
     327
     328
    153329}*/
    154330
     331
     332
    155333/* bolos campagne 1998-1999     */
     334
    156335/*
     336
    157337reg_NbSi.J, 1, 0, 1, 100, 4.7, 333,     .5                      ,519.6  , 8.286
     338
    158339v1-231...L, 1, 0, 2, 100, 4.7, 333, .5   , 1.7   , 32.41 , 0.333 , 10  , 20.30  ,  11.41               
     340
    159341v1-232...N, 1, 0, 3, 100, 4.7, 333,             
     342
    160343v1-237...E, 1, 0, 4, 100, 4.7, 333,
    161344
     345
     346
    162347reg_JamieO, 1, 0, 5, 100, 4.7, 101,
    163348
     349
     350
    164351V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5   ,433.8  , 9.25
     352
    165353V2-230...B, 1, 0, 7, 100, 4.7, 333, .5   , 8.26  , 26.61 , 5.10  ,  7  , 9.354   ,  1.026
     354
    166355V2-205...Q, 1, 0, 8, 100, 4.7, 333,     .518 , 81    , 25.2
     356
    167357V2-208...P, 1, 0, 9, 100, 4.7, 333, .5   , 12.31 , 33.42 , 0.627 , 6.5 , 8.113   ,  2.958
    168358
     359
     360
    169361*/
     362
    170363/*bolos campagne 1997-1998      */
     364
    171365/*
    172366
     367
     368
    173369v1-208...J, 1, 0, 1, 100, 4.7, 333, .5   , 12.31 , 33.42               
     370
    174371v1-232...L, 1, 0, 2, 100, 4.7, 333,             
     372
    175373v1-205...N, 1, 0, 3, 100, 4.7, 333,     .518 , 81    , 25.2     
     374
    176375v1-NbSi..E, 1, 0, 4, 100, 4.7, 333,     .5                      ,519.6  , 8.286
     376
    177377Jamie....O, 1, 0, 5, 100, 4.7, 101,
     378
    178379V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5   ,433.8  , 9.25
     380
    179381V2-224...B, 1, 0, 7, 100, 4.7, 333, .5   ,3.43   , 26.6
     382
    180383V2-230...Q, 1, 0, 8, 100, 4.7, 333, .5   , 8.26  , 26.61
     384
    181385V2-231...P, 1, 0, 9, 100, 4.7, 333, .5   , 1.7   , 32.41
    182386
     387
     388
    183389*/
    184390
    185391
     392
     393
     394
    186395int mode_transmission_telemesure[nb_modes_telemesure][nb_type_blocks]= {
    187396
     397
     398
    188399/* enregisteur de bord flash :  plafond standard nominal        */
    189 /* 0*/  { 0,10,15,50, 10,50, 0, 0, 0, 0, 0, 0, 1, 1, 1,2500, 0, 0, 0, 0},
    190 
    191 /* 1*/  { 0,10,10, 1, 10, 3, 0, 0, 0, 0, 0, 0, 1, 1, 4,2500, 0, 0, 0, 0},
    192 
    193 /* 2*/  { 0,10,05,01, 10,06, 0, 0, 0, 0, 0, 0, 1, 1, 2,2500, 0, 0, 0, 0},
     400
     401/* 0*/  { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
     402
     403
     404
     405/* 1*/  { 0,10,10, 1, 10, 3, 0, 0, 0, 1, 0, 0, 1, 0, 4,2500, 0, 0, 0, 0},
     406
     407
     408
     409/* 2*/  { 0,10,05,01, 10,06, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
     410
     411
    194412
    195413/* 3*/  { 0,10, 1,25, 10, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0},
    196414
     415
     416
    197417/* 4*/  { 0,10,15,50, 10,25, 0, 0, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
    198418
     419
     420
    199421/* 5*/  { 0,10,15,50, 10,25, 0, 0, 0, 0, 1, 0, 0, 0, 0,2500, 0, 0, 0, 0},
    200422
     423
     424
    201425/* 6*/  { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
    202426
    203 /* 7*/  { 0,10,15,50,100,50,1, 1, 0, 0, 0, 0, 1, 1, 1,2500, 0, 0, 0, 0},
    204 
    205 /* 8*/  { 0,10,15,50,100,50,1, 1, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
    206 
    207 /* 9*/  { 0,10, 1, 1,100, 1,0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0}
     427
     428
     429/* 7*/  { 0,10,15,50,100,50, 1, 1, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
     430
     431
     432
     433/* 8*/  { 0,10,15,50,100,50, 1, 1, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
     434
     435
     436
     437/* 9*/  { 0,10, 1, 1,100, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0}
     438
     439
    208440
    209441 };
     
    211443
    212444
     445
     446
     447
     448
    213449int mode_transmission_flash[nb_modes_flash][nb_type_blocks]= {
    214450
    215451
     452
     453
     454
    216455/* enregisteur de bord flash : nominal  */
     456
    217457/* 0*/  { 0,50,15,25, 10,25, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0} ,
    218458
     459
     460
    219461/* enregisteur de bord flash : minimum  */
     462
    220463/* 1*/  { 0,50,50,50,50,100, 0, 0, 0, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0} ,
    221464
     465
     466
    222467/* enregisteur de bord flash :  rien    */
     468
    223469/* 2*/  { 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0} };
    224470
     
    231477
    232478
    233 
    234 
    235 
    236 
    237 
    238 
    239 
    240 
    241 
    242 
    243479/*debut_nom_reglage*/
    244 /* 0->a chaud complet*/
    245 /* 1->a froid pour V(I)*/
    246 /* 2->cc*/
    247 /* 3->a chaud complet*/
    248 /* 4->chaud avec synchro*/
    249 /* 5->reglage 5  */
    250 /* 6->reglage 6  */
    251 /* 7->reglage 7  */
     480
     481/* 0->1 - demarrage par defaut - Nominal*/
     482
     483/* 1->2 - idem*/
     484
     485/* 2->3 - faible courant*/
     486
     487/* 3->4 - fort courant*/
     488
     489/* 4->5 - non fffdéfini*/
     490
     491/* 5->6 - non défini*/
     492
     493/* 6->7 - non défini*/
     494
     495/* 7->8 - non défini*/
     496
    252497/*fin_nom_reglage*/
    253498
     
    303548
    304549
     550
     551
     552
     553
     554
     555
     556
     557
     558
     559
     560
     561
     562
    305563reglage_bolo  reglage_standard[8]={{
    306564
    307565
     566
     567
     568
    308569/*debut reglage 0 */
     570
    309571#ifdef programme
    310 {30,76,9,1},{
     572
     573{32,76,8,1},{
     574
    311575{20,0}
    312 ,{-1148225771,229380}
    313 ,{-1148367339,294916}
    314 ,{20,0}
    315 ,{21,221185}
    316 ,{21,0}
    317 ,{21,245761}
    318 ,{20,0}
    319 ,{21,245761}
    320 ,{277,253953}
    321 ,{20,0}
    322 ,{21,204801}
    323 ,{21,19457}
    324 ,{21,1}
    325 ,{11501589,8708}
    326 ,{20,0}
    327 ,{-100647916,0}
    328 ,{1015828,0}
    329 ,{20,0}
    330 ,{20,0}
     576
     577,{1311522837,256000}
     578
     579,{1048576021,256004}
     580
     581,{20,0}
     582
     583,{1048576021,256001}
     584
     585,{20,0}
     586
     587,{262144021,128003}
     588
     589,{20,0}
     590
     591,{262144021,128001}
     592
     593,{262144021,128001}
     594
     595,{20,0}
     596
     597,{1048576021,256257}
     598
     599,{1048576021,256003}
     600
     601,{262144021,128001}
     602
     603,{262144789,128001}
     604
     605,{262144021,128001}
     606
     607,{100663317,256002}
     608
     609,{100716053,155650}
     610
     611,{1048576277,256003}
     612
     613,{20,0}
     614
     615,{1024021,0}
     616
     617,{262165,0}
     618
     619,{65557,0}
     620
     621,{1024020,0}
     622
     623},{
     624
     625{1,21,16,4}
     626
     627,{1,21,13,4}
     628
     629,{1,21,20,4}
     630
     631,{1,21,20,4}
     632
     633,{0,21,0,4}
     634
     635,{0,21,0,4}
     636
     637},{
     638
     639{3,1,21,24,21,24,0}
     640
     641,{0,1,9,1,0,0,0}
     642
     643,{0,1,9,1,0,0,0}
     644
     645,{6,1,9,34,30,0,65326}
     646
     647},{5,3,129,108,0,126,104,88}
     648
     649#else
     650
     651{1,8,76,32},{
     652
     653{20,0}
     654
     655,{1311522837,256000}
     656
     657,{1048576021,256004}
     658
     659,{20,0}
     660
     661,{1048576021,256001}
     662
     663,{20,0}
     664
     665,{262144021,128003}
     666
     667,{20,0}
     668
     669,{262144021,128001}
     670
     671,{262144021,128001}
     672
     673,{20,0}
     674
     675,{1048576021,256257}
     676
     677,{1048576021,256003}
     678
     679,{262144021,128001}
     680
     681,{262144789,128001}
     682
     683,{262144021,128001}
     684
     685,{100663317,256002}
     686
     687,{100716053,155650}
     688
     689,{1048576277,256003}
     690
     691,{20,0}
     692
     693,{1024021,0}
     694
     695,{262165,0}
     696
     697,{65557,0}
     698
     699,{1024020,0}
     700
     701},{
     702
     703{4,16,21,1}
     704
     705,{4,13,21,1}
     706
     707,{4,20,21,1}
     708
     709,{4,20,21,1}
     710
     711,{4,0,21,0}
     712
     713,{4,0,21,0}
     714
     715},{
     716
     717{24,21,1,3,0,24,21}
     718
     719,{1,9,1,0,0,0,0}
     720
     721,{1,9,1,0,0,0,0}
     722
     723,{34,9,1,6,65326,0,30}
     724
     725},{108,129,3,5,88,104,126,0}
     726
     727#endif
     728
     729/*fin_reglage*/
     730
     731
     732
     733
     734
     735},{
     736
     737
     738
     739/*debut reglage 1 */
     740
     741#ifdef programme
     742
     743{32,76,8,1},{
     744
     745{20,0}
     746
     747,{1311522837,256000}
     748
     749,{1048576021,256004}
     750
     751,{20,0}
     752
     753,{1048576021,256001}
     754
     755,{20,0}
     756
     757,{262144021,128003}
     758
     759,{20,0}
     760
     761,{262144021,128001}
     762
     763,{262144021,128001}
     764
     765,{20,0}
     766
     767,{1048576021,256257}
     768
     769,{1048576021,256003}
     770
     771,{262144021,128001}
     772
     773,{262144789,128001}
     774
     775,{262144021,128001}
     776
     777,{100663317,256002}
     778
     779,{100716053,155650}
     780
     781,{1048576277,256003}
     782
     783,{20,0}
     784
     785,{1024021,0}
     786
     787,{262165,0}
     788
     789,{65557,0}
     790
     791,{1024020,0}
     792
     793},{
     794
     795{1,21,16,4}
     796
     797,{1,21,13,4}
     798
     799,{1,21,20,4}
     800
     801,{1,21,20,4}
     802
     803,{0,21,0,4}
     804
     805,{0,21,0,4}
     806
     807},{
     808
     809{3,1,21,24,21,24,0}
     810
     811,{0,1,9,1,0,0,0}
     812
     813,{0,1,9,1,0,0,0}
     814
     815,{6,1,9,34,30,0,65326}
     816
     817},{5,3,129,108,0,126,104,88}
     818
     819#else
     820
     821{1,8,76,32},{
     822
     823{20,0}
     824
     825,{1311522837,256000}
     826
     827,{1048576021,256004}
     828
     829,{20,0}
     830
     831,{1048576021,256001}
     832
     833,{20,0}
     834
     835,{262144021,128003}
     836
     837,{20,0}
     838
     839,{262144021,128001}
     840
     841,{262144021,128001}
     842
     843,{20,0}
     844
     845,{1048576021,256257}
     846
     847,{1048576021,256003}
     848
     849,{262144021,128001}
     850
     851,{262144789,128001}
     852
     853,{262144021,128001}
     854
     855,{100663317,256002}
     856
     857,{100716053,155650}
     858
     859,{1048576277,256003}
     860
     861,{20,0}
     862
     863,{1024021,0}
     864
     865,{262165,0}
     866
     867,{65557,0}
     868
     869,{1024020,0}
     870
     871},{
     872
     873{4,16,21,1}
     874
     875,{4,13,21,1}
     876
     877,{4,20,21,1}
     878
     879,{4,20,21,1}
     880
     881,{4,0,21,0}
     882
     883,{4,0,21,0}
     884
     885},{
     886
     887{24,21,1,3,0,24,21}
     888
     889,{1,9,1,0,0,0,0}
     890
     891,{1,9,1,0,0,0,0}
     892
     893,{34,9,1,6,65326,0,30}
     894
     895},{108,129,3,5,88,104,126,0}
     896
     897#endif
     898
     899/*fin_reglage*/
     900
     901
     902
     903},{
     904
     905
     906
     907/*debut reglage 2 */
     908
     909#ifdef programme
     910
     911{32,76,8,1},{
     912
     913{20,0}
     914
     915,{100721941,256000}
     916
     917,{1048607509,256004}
     918
     919,{20,0}
     920
     921,{1048586773,256003}
     922
     923,{20,0}
     924
     925,{50335509,128001}
     926
     927,{20,0}
     928
     929,{50331669,128001}
     930
     931,{50336789,128001}
     932
     933,{20,0}
     934
     935,{1048622101,256259}
     936
     937,{1048635413,256003}
     938
     939,{50331669,128001}
     940
     941,{50352661,128001}
     942
     943,{50337813,128001}
     944
     945,{100665109,256002}
     946
     947,{100664597,155650}
     948
     949,{1048600341,256003}
     950
     951,{20,0}
     952
     953,{1024021,0}
     954
     955,{65557,0}
     956
     957,{65557,0}
     958
     959,{262165,0}
     960
     961},{
     962
     963{1,21,11,4}
     964
     965,{1,21,13,4}
     966
     967,{1,21,20,4}
     968
     969,{1,21,20,4}
     970
     971,{0,20,0,1}
     972
     973,{0,20,0,1}
     974
     975},{
     976
     977{3,1,21,24,21,24,0}
     978
     979,{0,1,9,1,0,0,0}
     980
     981,{0,1,9,1,0,0,0}
     982
     983,{6,17,0,34,30,0,65386}
     984
     985},{5,3,129,108,0,126,104,88}
     986
     987#else
     988
     989{1,8,76,32},{
     990
     991{20,0}
     992
     993,{100721941,256000}
     994
     995,{1048607509,256004}
     996
     997,{20,0}
     998
     999,{1048586773,256003}
     1000
     1001,{20,0}
     1002
     1003,{50335509,128001}
     1004
     1005,{20,0}
     1006
     1007,{50331669,128001}
     1008
     1009,{50336789,128001}
     1010
     1011,{20,0}
     1012
     1013,{1048622101,256259}
     1014
     1015,{1048635413,256003}
     1016
     1017,{50331669,128001}
     1018
     1019,{50352661,128001}
     1020
     1021,{50337813,128001}
     1022
     1023,{100665109,256002}
     1024
     1025,{100664597,155650}
     1026
     1027,{1048600341,256003}
     1028
     1029,{20,0}
     1030
     1031,{1024021,0}
     1032
     1033,{65557,0}
     1034
     1035,{65557,0}
     1036
     1037,{262165,0}
     1038
     1039},{
     1040
     1041{4,11,21,1}
     1042
     1043,{4,13,21,1}
     1044
     1045,{4,20,21,1}
     1046
     1047,{4,20,21,1}
     1048
     1049,{1,0,20,0}
     1050
     1051,{1,0,20,0}
     1052
     1053},{
     1054
     1055{24,21,1,3,0,24,21}
     1056
     1057,{1,9,1,0,0,0,0}
     1058
     1059,{1,9,1,0,0,0,0}
     1060
     1061,{34,0,17,6,65386,0,30}
     1062
     1063},{108,129,3,5,88,104,126,0}
     1064
     1065#endif
     1066
     1067/*fin_reglage*/
     1068
     1069
     1070
     1071},{
     1072
     1073
     1074
     1075/*debut reglage 3 */
     1076
     1077#ifdef programme
     1078
     1079{32,76,8,1},{
     1080
     1081{20,0}
     1082
     1083,{100721941,256000}
     1084
     1085,{1048607509,256004}
     1086
     1087,{20,0}
     1088
     1089,{1048586773,256003}
     1090
     1091,{20,0}
     1092
     1093,{524291861,128001}
     1094
     1095,{20,0}
     1096
     1097,{524288021,128001}
     1098
     1099,{524293141,128001}
     1100
     1101,{20,0}
     1102
     1103,{1048622101,256259}
     1104
     1105,{1048635413,256003}
     1106
     1107,{524288021,128001}
     1108
     1109,{524309013,128001}
     1110
     1111,{524294165,128001}
     1112
     1113,{100665109,256002}
     1114
     1115,{100664597,155650}
     1116
     1117,{1048600341,256003}
     1118
     1119,{20,0}
     1120
     1121,{1024021,0}
     1122
     1123,{65557,0}
     1124
     1125,{65557,0}
     1126
     1127,{65557,0}
     1128
     1129},{
     1130
     1131{1,21,18,4}
     1132
     1133,{1,21,13,4}
     1134
     1135,{1,21,20,4}
     1136
     1137,{1,21,20,4}
     1138
     1139,{0,20,0,1}
     1140
     1141,{0,20,0,1}
     1142
     1143},{
     1144
     1145{3,1,21,24,21,24,0}
     1146
     1147,{0,1,9,1,0,0,0}
     1148
     1149,{0,1,9,1,0,0,0}
     1150
     1151,{6,17,0,34,30,0,65386}
     1152
     1153},{5,3,129,108,0,126,104,88}
     1154
     1155#else
     1156
     1157{1,8,76,32},{
     1158
     1159{20,0}
     1160
     1161,{100721941,256000}
     1162
     1163,{1048607509,256004}
     1164
     1165,{20,0}
     1166
     1167,{1048586773,256003}
     1168
     1169,{20,0}
     1170
     1171,{524291861,128001}
     1172
     1173,{20,0}
     1174
     1175,{524288021,128001}
     1176
     1177,{524293141,128001}
     1178
     1179,{20,0}
     1180
     1181,{1048622101,256259}
     1182
     1183,{1048635413,256003}
     1184
     1185,{524288021,128001}
     1186
     1187,{524309013,128001}
     1188
     1189,{524294165,128001}
     1190
     1191,{100665109,256002}
     1192
     1193,{100664597,155650}
     1194
     1195,{1048600341,256003}
     1196
     1197,{20,0}
     1198
     1199,{1024021,0}
     1200
     1201,{65557,0}
     1202
     1203,{65557,0}
     1204
     1205,{65557,0}
     1206
     1207},{
     1208
     1209{4,18,21,1}
     1210
     1211,{4,13,21,1}
     1212
     1213,{4,20,21,1}
     1214
     1215,{4,20,21,1}
     1216
     1217,{1,0,20,0}
     1218
     1219,{1,0,20,0}
     1220
     1221},{
     1222
     1223{24,21,1,3,0,24,21}
     1224
     1225,{1,9,1,0,0,0,0}
     1226
     1227,{1,9,1,0,0,0,0}
     1228
     1229,{34,0,17,6,65386,0,30}
     1230
     1231},{108,129,3,5,88,104,126,0}
     1232
     1233#endif
     1234
     1235/*fin_reglage*/
     1236
     1237
     1238
     1239},{
     1240
     1241
     1242
     1243/*debut reglage 4 */
     1244
     1245#ifdef programme
     1246
     1247{39,62,9,1},{
     1248
     1249{20,0}
     1250
     1251,{-100659180,229382}
     1252
     1253,{-100659436,294918}
     1254
     1255,{20,0}
     1256
     1257,{-100663276,221189}
     1258
     1259,{-100663276,5}
     1260
     1261,{-100659436,245762}
     1262
     1263,{-100663276,5}
     1264
     1265,{-100658154,245761}
     1266
     1267,{-100658156,253954}
     1268
     1269,{20,0}
     1270
     1271,{-100663276,204805}
     1272
     1273,{-100663276,16389}
     1274
     1275,{-100656874,1}
     1276
     1277,{-100656874,16385}
     1278
     1279,{-100663276,3}
     1280
     1281,{-100506347,6}
     1282
     1283,{-100509675,6}
     1284
     1285,{-100372972,6}
     1286
     1287,{2097174,0}
     1288
    3311289,{1024022,0}
    332 ,{25622,0}
    333 ,{-100395499,0}
    334 ,{25622,0}
    335 },{
    336 {0,0,128,1}
    337 ,{0,0,128,4}
    338 ,{0,0,128,4}
    339 ,{0,0,128,3}
    340 ,{0,0,128,4}
    341 ,{0,0,128,4}
    342 },{
     1290
     1291,{16406,0}
     1292
     1293,{4117,0}
     1294
     1295,{262164,0}
     1296
     1297},{
     1298
     1299{2,22,24,1}
     1300
     1301,{1,20,24,4}
     1302
     1303,{0,20,24,4}
     1304
     1305,{0,20,24,3}
     1306
     1307,{0,20,24,4}
     1308
     1309,{0,20,24,4}
     1310
     1311},{
     1312
    3431313{0,1,9,1,0,0,0}
     1314
    3441315,{0,1,9,1,0,0,0}
     1316
    3451317,{0,1,9,1,0,0,0}
     1318
    3461319,{0,1,9,1,0,0,0}
    347 },{1,3,129,108,3,126,104,88}
     1320
     1321},{2,3,129,108,2,126,104,88}
     1322
    3481323#else
    349 {1,9,76,30},{
     1324
     1325{1,9,62,39},{
     1326
    3501327{20,0}
    351 ,{-1148225771,229380}
    352 ,{-1148367339,294916}
    353 ,{20,0}
    354 ,{21,221185}
    355 ,{21,0}
    356 ,{21,245761}
    357 ,{20,0}
    358 ,{21,245761}
    359 ,{277,253953}
    360 ,{20,0}
    361 ,{21,204801}
    362 ,{21,19457}
    363 ,{21,1}
    364 ,{11501589,8708}
    365 ,{20,0}
    366 ,{-100647916,0}
    367 ,{1015828,0}
    368 ,{20,0}
    369 ,{20,0}
     1328
     1329,{-100659180,229382}
     1330
     1331,{-100659436,294918}
     1332
     1333,{20,0}
     1334
     1335,{-100663276,221189}
     1336
     1337,{-100663276,5}
     1338
     1339,{-100659436,245762}
     1340
     1341,{-100663276,5}
     1342
     1343,{-100658154,245761}
     1344
     1345,{-100658156,253954}
     1346
     1347,{20,0}
     1348
     1349,{-100663276,204805}
     1350
     1351,{-100663276,16389}
     1352
     1353,{-100656874,1}
     1354
     1355,{-100656874,16385}
     1356
     1357,{-100663276,3}
     1358
     1359,{-100506347,6}
     1360
     1361,{-100509675,6}
     1362
     1363,{-100372972,6}
     1364
     1365,{2097174,0}
     1366
    3701367,{1024022,0}
    371 ,{25622,0}
    372 ,{-100395499,0}
    373 ,{25622,0}
    374 },{
    375 {1,128,0,0}
    376 ,{4,128,0,0}
    377 ,{4,128,0,0}
    378 ,{3,128,0,0}
    379 ,{4,128,0,0}
    380 ,{4,128,0,0}
    381 },{
     1368
     1369,{16406,0}
     1370
     1371,{4117,0}
     1372
     1373,{262164,0}
     1374
     1375},{
     1376
     1377{1,24,22,2}
     1378
     1379,{4,24,20,1}
     1380
     1381,{4,24,20,0}
     1382
     1383,{3,24,20,0}
     1384
     1385,{4,24,20,0}
     1386
     1387,{4,24,20,0}
     1388
     1389},{
     1390
    3821391{1,9,1,0,0,0,0}
     1392
    3831393,{1,9,1,0,0,0,0}
     1394
    3841395,{1,9,1,0,0,0,0}
     1396
    3851397,{1,9,1,0,0,0,0}
    386 },{108,129,3,1,88,104,126,3}
     1398
     1399},{108,129,3,2,88,104,126,2}
     1400
    3871401#endif
     1402
    3881403/*fin_reglage*/
    3891404
    390 },{
    391 
    392 /*debut reglage 1 */
     1405
     1406
     1407},{
     1408
     1409
     1410
     1411/*debut reglage 5 */
     1412
    3931413#ifdef programme
    394 {31,76,9,1},{
     1414
     1415{39,68,9,1},{
     1416
    3951417{20,0}
    396 ,{-1148225771,229380}
    397 ,{-1148367339,294916}
    398 ,{20,0}
    399 ,{2127959573,221185}
    400 ,{21,0}
    401 ,{2127892757,245761}
    402 ,{20,0}
    403 ,{2127991317,245761}
    404 ,{2127996181,253953}
    405 ,{20,0}
    406 ,{2128584725,204801}
    407 ,{2127780885,19457}
    408 ,{2127795221,1}
    409 ,{11501589,8708}
    410 ,{20,0}
    411 ,{-100647916,0}
    412 ,{1015828,0}
    413 ,{20,0}
    414 ,{20,0}
    415 ,{12822,0}
    416 ,{25622,0}
    417 ,{-100660714,0}
    418 ,{25622,0}
    419 },{
    420 {2,21,25,1}
    421 ,{0,20,0,4}
    422 ,{0,20,0,4}
    423 ,{0,21,23,3}
    424 ,{0,20,0,4}
    425 ,{0,20,0,4}
    426 },{
     1418
     1419,{1048982293,229382}
     1420
     1421,{1049128469,253958}
     1422
     1423,{20,0}
     1424
     1425,{1048966677,245765}
     1426
     1427,{20,0}
     1428
     1429,{262157846,245762}
     1430
     1431,{1048919829,5}
     1432
     1433,{262156054,245761}
     1434
     1435,{262154006,253954}
     1436
     1437,{20,0}
     1438
     1439,{1049123349,229381}
     1440
     1441,{1049157141,237573}
     1442
     1443,{262154262,1}
     1444
     1445,{262158614,16385}
     1446
     1447,{262149654,3}
     1448
     1449,{262750740,237572}
     1450
     1451,{262606612,122884}
     1452
     1453,{-1174095083,139270}
     1454
     1455,{20,0}
     1456
     1457,{16406,0}
     1458
     1459,{16406,0}
     1460
     1461,{4117,0}
     1462
     1463,{262164,0}
     1464
     1465},{
     1466
     1467{1,22,16,1}
     1468
     1469,{1,22,16,4}
     1470
     1471,{1,22,16,4}
     1472
     1473,{1,20,16,3}
     1474
     1475,{1,21,20,4}
     1476
     1477,{1,21,20,4}
     1478
     1479},{
     1480
    4271481{0,1,9,1,0,0,0}
     1482
    4281483,{0,1,9,1,0,0,0}
     1484
    4291485,{0,1,9,1,0,0,0}
     1486
    4301487,{0,1,9,1,0,0,0}
    431 },{129,3,129,108,3,126,104,88}
     1488
     1489},{2,3,129,108,3,126,104,88}
     1490
    4321491#else
    433 {1,9,76,31},{
     1492
     1493{1,9,68,39},{
     1494
    4341495{20,0}
    435 ,{-1148225771,229380}
    436 ,{-1148367339,294916}
    437 ,{20,0}
    438 ,{2127959573,221185}
    439 ,{21,0}
    440 ,{2127892757,245761}
    441 ,{20,0}
    442 ,{2127991317,245761}
    443 ,{2127996181,253953}
    444 ,{20,0}
    445 ,{2128584725,204801}
    446 ,{2127780885,19457}
    447 ,{2127795221,1}
    448 ,{11501589,8708}
    449 ,{20,0}
    450 ,{-100647916,0}
    451 ,{1015828,0}
    452 ,{20,0}
    453 ,{20,0}
    454 ,{12822,0}
    455 ,{25622,0}
    456 ,{-100660714,0}
    457 ,{25622,0}
    458 },{
    459 {1,25,21,2}
    460 ,{4,0,20,0}
    461 ,{4,0,20,0}
    462 ,{3,23,21,0}
    463 ,{4,0,20,0}
    464 ,{4,0,20,0}
    465 },{
     1496
     1497,{1048982293,229382}
     1498
     1499,{1049128469,253958}
     1500
     1501,{20,0}
     1502
     1503,{1048966677,245765}
     1504
     1505,{20,0}
     1506
     1507,{262157846,245762}
     1508
     1509,{1048919829,5}
     1510
     1511,{262156054,245761}
     1512
     1513,{262154006,253954}
     1514
     1515,{20,0}
     1516
     1517,{1049123349,229381}
     1518
     1519,{1049157141,237573}
     1520
     1521,{262154262,1}
     1522
     1523,{262158614,16385}
     1524
     1525,{262149654,3}
     1526
     1527,{262750740,237572}
     1528
     1529,{262606612,122884}
     1530
     1531,{-1174095083,139270}
     1532
     1533,{20,0}
     1534
     1535,{16406,0}
     1536
     1537,{16406,0}
     1538
     1539,{4117,0}
     1540
     1541,{262164,0}
     1542
     1543},{
     1544
     1545{1,16,22,1}
     1546
     1547,{4,16,22,1}
     1548
     1549,{4,16,22,1}
     1550
     1551,{3,16,20,1}
     1552
     1553,{4,20,21,1}
     1554
     1555,{4,20,21,1}
     1556
     1557},{
     1558
    4661559{1,9,1,0,0,0,0}
     1560
    4671561,{1,9,1,0,0,0,0}
     1562
    4681563,{1,9,1,0,0,0,0}
     1564
    4691565,{1,9,1,0,0,0,0}
    470 },{108,129,3,129,88,104,126,3}
     1566
     1567},{108,129,3,2,88,104,126,3}
     1568
    4711569#endif
     1570
    4721571/*fin_reglage*/
    4731572
    474 },{
    475 
    476 /*debut reglage 2 */
     1573
     1574
     1575},{
     1576
     1577
     1578
     1579/*debut reglage 6 */
     1580
    4771581#ifdef programme
     1582
    4781583{197,191,175,185},{
     1584
    4791585{0,0}
    480 ,{0,0}
    481 ,{0,0}
    482 ,{0,0}
    483 ,{0,0}
    484 ,{0,0}
    485 ,{0,0}
    486 ,{0,0}
    487 ,{0,0}
    488 ,{0,0}
    489 ,{0,0}
    490 ,{0,0}
    491 ,{0,0}
    492 ,{0,0}
    493 ,{0,0}
    494 ,{0,0}
    495 ,{0,0}
    496 ,{0,0}
    497 ,{0,0}
    498 ,{0,0}
    499 ,{0,0}
    500 ,{0,0}
    501 ,{0,0}
    502 ,{0,0}
    503 },{
     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},{
     1634
    5041635{106,98,93,71}
     1636
    5051637,{66,74,87,66}
     1638
    5061639,{48,46,38,33}
     1640
    5071641,{40,41,33,26}
     1642
    5081643,{25,29,40,57}
     1644
    5091645,{63,62,71,80}
    510 },{
     1646
     1647},{
     1648
    5111649{83,79,75,75,92,112,31100}
     1650
    5121651,{125,126,117,113,107,94,20315}
     1652
    5131653,{108,116,122,124,117,120,32117}
     1654
    5141655,{110,99,94,98,107,93,17217}
     1656
    5151657},{88,82,94,108,111,126,104,88}
     1658
    5161659#else
     1660
    5171661{185,175,191,197},{
     1662
    5181663{0,0}
    519 ,{0,0}
    520 ,{0,0}
    521 ,{0,0}
    522 ,{0,0}
    523 ,{0,0}
    524 ,{0,0}
    525 ,{0,0}
    526 ,{0,0}
    527 ,{0,0}
    528 ,{0,0}
    529 ,{0,0}
    530 ,{0,0}
    531 ,{0,0}
    532 ,{0,0}
    533 ,{0,0}
    534 ,{0,0}
    535 ,{0,0}
    536 ,{0,0}
    537 ,{0,0}
    538 ,{0,0}
    539 ,{0,0}
    540 ,{0,0}
    541 ,{0,0}
    542 },{
     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},{
     1712
    5431713{71,93,98,106}
     1714
    5441715,{66,87,74,66}
     1716
    5451717,{33,38,46,48}
     1718
    5461719,{26,33,41,40}
     1720
    5471721,{57,40,29,25}
     1722
    5481723,{80,71,62,63}
    549 },{
     1724
     1725},{
     1726
    5501727{75,75,79,83,31100,112,92}
     1728
    5511729,{113,117,126,125,20315,94,107}
     1730
    5521731,{124,122,116,108,32117,120,117}
     1732
    5531733,{98,94,99,110,17217,93,107}
     1734
    5541735},{108,94,82,88,88,104,126,111}
     1736
    5551737#endif
     1738
    5561739/*fin_reglage*/
    5571740
    558 },{
    559 
    560 /*debut reglage 3 */
     1741
     1742
     1743},{
     1744
     1745
     1746
     1747/*debut reglage 7 */
     1748
    5611749#ifdef programme
    562 {30,76,9,1},{
    563 {20,0}
    564 ,{-1149239274,229380}
    565 ,{-1149239275,294916}
    566 ,{20,0}
    567 ,{20,221185}
    568 ,{21,0}
    569 ,{20,245761}
    570 ,{20,0}
    571 ,{20,245761}
    572 ,{276,253953}
    573 ,{20,0}
    574 ,{20,204801}
    575 ,{20,19457}
    576 ,{20,1}
    577 ,{10486037,8708}
    578 ,{20,0}
    579 ,{-100647916,0}
    580 ,{1015828,0}
    581 ,{20,0}
    582 ,{20,0}
    583 ,{1024022,0}
    584 ,{25622,0}
    585 ,{-100660714,0}
    586 ,{25622,0}
    587 },{
    588 {0,20,0,1}
    589 ,{0,20,0,4}
    590 ,{0,20,0,4}
    591 ,{2,20,0,3}
    592 ,{0,20,0,4}
    593 ,{0,20,0,4}
    594 },{
    595 {0,1,9,1,0,0,0}
    596 ,{0,1,9,1,0,0,0}
    597 ,{0,1,9,1,0,0,0}
    598 ,{0,1,9,1,0,0,0}
    599 },{1,3,129,108,3,126,104,88}
     1750
     1751{197,191,175,185},{
     1752
     1753{0,0}
     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},{
     1802
     1803{106,98,93,71}
     1804
     1805,{66,74,87,66}
     1806
     1807,{48,46,38,33}
     1808
     1809,{40,41,33,26}
     1810
     1811,{25,29,40,57}
     1812
     1813,{63,62,71,80}
     1814
     1815},{
     1816
     1817{83,79,75,75,92,112,31100}
     1818
     1819,{125,126,117,113,107,94,20315}
     1820
     1821,{108,116,122,124,117,120,32117}
     1822
     1823,{110,99,94,98,107,93,17217}
     1824
     1825},{88,82,94,108,111,126,104,88}
     1826
    6001827#else
    601 {1,9,76,30},{
    602 {20,0}
    603 ,{-1149239274,229380}
    604 ,{-1149239275,294916}
    605 ,{20,0}
    606 ,{20,221185}
    607 ,{21,0}
    608 ,{20,245761}
    609 ,{20,0}
    610 ,{20,245761}
    611 ,{276,253953}
    612 ,{20,0}
    613 ,{20,204801}
    614 ,{20,19457}
    615 ,{20,1}
    616 ,{10486037,8708}
    617 ,{20,0}
    618 ,{-100647916,0}
    619 ,{1015828,0}
    620 ,{20,0}
    621 ,{20,0}
    622 ,{1024022,0}
    623 ,{25622,0}
    624 ,{-100660714,0}
    625 ,{25622,0}
    626 },{
    627 {1,0,20,0}
    628 ,{4,0,20,0}
    629 ,{4,0,20,0}
    630 ,{3,0,20,2}
    631 ,{4,0,20,0}
    632 ,{4,0,20,0}
    633 },{
    634 {1,9,1,0,0,0,0}
    635 ,{1,9,1,0,0,0,0}
    636 ,{1,9,1,0,0,0,0}
    637 ,{1,9,1,0,0,0,0}
    638 },{108,129,3,1,88,104,126,3}
     1828
     1829{185,175,191,197},{
     1830
     1831{0,0}
     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},{
     1880
     1881{71,93,98,106}
     1882
     1883,{66,87,74,66}
     1884
     1885,{33,38,46,48}
     1886
     1887,{26,33,41,40}
     1888
     1889,{57,40,29,25}
     1890
     1891,{80,71,62,63}
     1892
     1893},{
     1894
     1895{75,75,79,83,31100,112,92}
     1896
     1897,{113,117,126,125,20315,94,107}
     1898
     1899,{124,122,116,108,32117,120,117}
     1900
     1901,{98,94,99,110,17217,93,107}
     1902
     1903},{108,94,82,88,88,104,126,111}
     1904
    6391905#endif
     1906
    6401907/*fin_reglage*/
    6411908
    642 },{
    643 
    644 /*debut reglage 4 */
    645 #ifdef programme
    646 {30,76,9,1},{
    647 {20,0}
    648 ,{-1148225771,229380}
    649 ,{-1148367339,294916}
    650 ,{20,0}
    651 ,{21,221185}
    652 ,{21,0}
    653 ,{21,245761}
    654 ,{20,0}
    655 ,{21,245761}
    656 ,{277,253953}
    657 ,{20,0}
    658 ,{21,204801}
    659 ,{21,19457}
    660 ,{21,1}
    661 ,{11501589,8708}
    662 ,{20,0}
    663 ,{-100647916,0}
    664 ,{1015828,0}
    665 ,{20,0}
    666 ,{20,0}
    667 ,{1024022,0}
    668 ,{25622,0}
    669 ,{-100395499,0}
    670 ,{25622,0}
    671 },{
    672 {0,0,128,1}
    673 ,{0,0,128,4}
    674 ,{0,0,128,4}
    675 ,{0,0,128,3}
    676 ,{0,0,128,4}
    677 ,{0,0,128,4}
    678 },{
    679 {0,1,9,1,0,0,0}
    680 ,{0,1,9,1,0,0,0}
    681 ,{0,1,9,1,0,0,0}
    682 ,{0,1,9,1,0,0,0}
    683 },{1,3,129,108,3,126,104,88}
    684 #else
    685 {1,9,76,30},{
    686 {20,0}
    687 ,{-1148225771,229380}
    688 ,{-1148367339,294916}
    689 ,{20,0}
    690 ,{21,221185}
    691 ,{21,0}
    692 ,{21,245761}
    693 ,{20,0}
    694 ,{21,245761}
    695 ,{277,253953}
    696 ,{20,0}
    697 ,{21,204801}
    698 ,{21,19457}
    699 ,{21,1}
    700 ,{11501589,8708}
    701 ,{20,0}
    702 ,{-100647916,0}
    703 ,{1015828,0}
    704 ,{20,0}
    705 ,{20,0}
    706 ,{1024022,0}
    707 ,{25622,0}
    708 ,{-100395499,0}
    709 ,{25622,0}
    710 },{
    711 {1,128,0,0}
    712 ,{4,128,0,0}
    713 ,{4,128,0,0}
    714 ,{3,128,0,0}
    715 ,{4,128,0,0}
    716 ,{4,128,0,0}
    717 },{
    718 {1,9,1,0,0,0,0}
    719 ,{1,9,1,0,0,0,0}
    720 ,{1,9,1,0,0,0,0}
    721 ,{1,9,1,0,0,0,0}
    722 },{108,129,3,1,88,104,126,3}
     1909
     1910
     1911} };
     1912
     1913
     1914
     1915/* ------------------------------------   corps  des fonctions   ------------------------------ */
     1916
     1917/* -------------------------------------------------------------------------------------------- */
     1918
     1919
     1920
     1921
     1922
     1923
     1924
     1925unsigned int4   val_long(char x)
     1926
     1927{
     1928
     1929unsigned long a,xl;
     1930
     1931char aa;
     1932
     1933aa=x-2;
     1934
     1935a=aa;
     1936
     1937if(x<3)  xl=x;  else    xl=((a&1) + 2)<<(a>>1);
     1938
     1939return(xl);
     1940
     1941}
     1942
     1943
     1944
     1945
     1946
     1947double  val_double(char x)
     1948
     1949{
     1950
     1951unsigned long a,xl;
     1952
     1953if(x<0) x=-x;   a=x;    if(!a)  xl=0;   else    xl=((a&1) + 2)<<(a>>1);
     1954
     1955if(x>0) return(1e-4*(double)xl);        else    return(-1e-4*(double)xl);
     1956
     1957}
     1958
     1959
     1960
     1961int     new_val_dac(int a,char  code)
     1962
     1963{
     1964
     1965if(code&0x80)   a=(code&0x7f) <<5 ;
     1966
     1967else    {
     1968
     1969        if(code&0x40)   a+=code&0x3f;   
     1970
     1971        else            a-=code&0x3f;   
     1972
     1973        }
     1974
     1975return(a);
     1976
     1977}
     1978
     1979
     1980
     1981
     1982
     1983
     1984
     1985
     1986
     1987int     calcul_somme_block(block_type_modele* blk,int longueur)
     1988
     1989{
     1990
     1991int i,so=0;;
     1992
     1993for(i=0;i<(longueur/4-4);i++)  so^=(int)blk->mot[i];
     1994
     1995/* somme sur tous les mots internes     : on exclus le dbut, les codes et la fin        */
     1996
     1997return((so^(so>>16))&0xffff);
     1998
     1999}
     2000
     2001
     2002
     2003
     2004
     2005
     2006
     2007
     2008
     2009void  valide_block(block_type_modele* blk,int type,int block_num)
     2010
     2011{
     2012
     2013int somme,longueur;
     2014
     2015def_long_block
     2016
     2017longueur=long_block[type];
     2018
     2019/*printf("valide block adresse %x  type %d  numblock %d  longueur=%d \n" */
     2020
     2021/*              ,(unsigned)blk,type,block_num,longueur);*/
     2022
     2023blk->debut              =       debut_block_mesure;
     2024
     2025somme=0;blk->code1              =       (((long)longueur)<<16)  |       somme;
     2026
     2027blk->code2              =       (((long)block_num) & 0xffffff ) | ( (((long)type)<<24)&0xff000000 );
     2028
     2029
     2030
     2031blk->mot[longueur/4-4]  =       fin_block_mesure;
     2032
     2033
     2034
     2035#if defined(_ECC_LIB_H_)
     2036
     2037{
     2038
     2039int place_ecc;
     2040
     2041place_ecc=(longueur-4-ECC_SIZE-SIZE_HEAD-((longueur-4-SIZE_HEAD)/ECC_TOTAL)*ECC_SIZE)/4;
     2042
     2043SetEcc( blk, (unsigned char *) &(blk->mot[place_ecc] ) ) ;
     2044
     2045}
     2046
    7232047#endif
    724 /*fin_reglage*/
    725 
    726 },{
    727 
    728 /*debut reglage 5 */
    729 #ifdef programme
    730 {197,191,175,185},{
    731 {0,0}
    732 ,{0,0}
    733 ,{0,0}
    734 ,{0,0}
    735 ,{0,0}
    736 ,{0,0}
    737 ,{0,0}
    738 ,{0,0}
    739 ,{0,0}
    740 ,{0,0}
    741 ,{0,0}
    742 ,{0,0}
    743 ,{0,0}
    744 ,{0,0}
    745 ,{0,0}
    746 ,{0,0}
    747 ,{0,0}
    748 ,{0,0}
    749 ,{0,0}
    750 ,{0,0}
    751 ,{0,0}
    752 ,{0,0}
    753 ,{0,0}
    754 ,{0,0}
    755 },{
    756 {106,98,93,71}
    757 ,{66,74,87,66}
    758 ,{48,46,38,33}
    759 ,{40,41,33,26}
    760 ,{25,29,40,57}
    761 ,{63,62,71,80}
    762 },{
    763 {83,79,75,75,92,112,31100}
    764 ,{125,126,117,113,107,94,20315}
    765 ,{108,116,122,124,117,120,32117}
    766 ,{110,99,94,98,107,93,17217}
    767 },{88,82,94,108,111,126,104,88}
    768 #else
    769 {185,175,191,197},{
    770 {0,0}
    771 ,{0,0}
    772 ,{0,0}
    773 ,{0,0}
    774 ,{0,0}
    775 ,{0,0}
    776 ,{0,0}
    777 ,{0,0}
    778 ,{0,0}
    779 ,{0,0}
    780 ,{0,0}
    781 ,{0,0}
    782 ,{0,0}
    783 ,{0,0}
    784 ,{0,0}
    785 ,{0,0}
    786 ,{0,0}
    787 ,{0,0}
    788 ,{0,0}
    789 ,{0,0}
    790 ,{0,0}
    791 ,{0,0}
    792 ,{0,0}
    793 ,{0,0}
    794 },{
    795 {71,93,98,106}
    796 ,{66,87,74,66}
    797 ,{33,38,46,48}
    798 ,{26,33,41,40}
    799 ,{57,40,29,25}
    800 ,{80,71,62,63}
    801 },{
    802 {75,75,79,83,31100,112,92}
    803 ,{113,117,126,125,20315,94,107}
    804 ,{124,122,116,108,32117,120,117}
    805 ,{98,94,99,110,17217,93,107}
    806 },{108,94,82,88,88,104,126,111}
     2048
     2049
     2050
     2051somme=calcul_somme_block(blk,longueur);
     2052
     2053blk->code1              =       (((long)longueur)<<16)  |       somme;
     2054
     2055/* l'ecc est faux car on a change la somme: mettre la somme a zero avant de tester ecc  */
     2056
     2057}
     2058
     2059
     2060
     2061/* Quand on est sur une machine swappee, on ne cherche pas a verifier */
     2062
     2063/* le checksum, puisqu'on a modifie les blocs, sans swapper par exemple */
     2064
     2065/* les chars des noms de bolometres et des chaines GPS... */
     2066
     2067#ifdef __alpha
     2068
     2069#define SWAP
     2070
    8072071#endif
    808 /*fin_reglage*/
    809 
    810 },{
    811 
    812 /*debut reglage 6 */
    813 #ifdef programme
    814 {197,191,175,185},{
    815 {0,0}
    816 ,{0,0}
    817 ,{0,0}
    818 ,{0,0}
    819 ,{0,0}
    820 ,{0,0}
    821 ,{0,0}
    822 ,{0,0}
    823 ,{0,0}
    824 ,{0,0}
    825 ,{0,0}
    826 ,{0,0}
    827 ,{0,0}
    828 ,{0,0}
    829 ,{0,0}
    830 ,{0,0}
    831 ,{0,0}
    832 ,{0,0}
    833 ,{0,0}
    834 ,{0,0}
    835 ,{0,0}
    836 ,{0,0}
    837 ,{0,0}
    838 ,{0,0}
    839 },{
    840 {106,98,93,71}
    841 ,{66,74,87,66}
    842 ,{48,46,38,33}
    843 ,{40,41,33,26}
    844 ,{25,29,40,57}
    845 ,{63,62,71,80}
    846 },{
    847 {83,79,75,75,92,112,31100}
    848 ,{125,126,117,113,107,94,20315}
    849 ,{108,116,122,124,117,120,32117}
    850 ,{110,99,94,98,107,93,17217}
    851 },{88,82,94,108,111,126,104,88}
    852 #else
    853 {185,175,191,197},{
    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}
    865 ,{0,0}
    866 ,{0,0}
    867 ,{0,0}
    868 ,{0,0}
    869 ,{0,0}
    870 ,{0,0}
    871 ,{0,0}
    872 ,{0,0}
    873 ,{0,0}
    874 ,{0,0}
    875 ,{0,0}
    876 ,{0,0}
    877 ,{0,0}
    878 },{
    879 {71,93,98,106}
    880 ,{66,87,74,66}
    881 ,{33,38,46,48}
    882 ,{26,33,41,40}
    883 ,{57,40,29,25}
    884 ,{80,71,62,63}
    885 },{
    886 {75,75,79,83,31100,112,92}
    887 ,{113,117,126,125,20315,94,107}
    888 ,{124,122,116,108,32117,120,117}
    889 ,{98,94,99,110,17217,93,107}
    890 },{108,94,82,88,88,104,126,111}
     2072
     2073#if defined(Linux)  || defined(linux)
     2074
     2075#define SWAP
     2076
    8912077#endif
    892 /*fin_reglage*/
    893 
    894 },{
    895 
    896 /*debut reglage 7 */
    897 #ifdef programme
    898 {197,191,175,185},{
    899 {0,0}
    900 ,{0,0}
    901 ,{0,0}
    902 ,{0,0}
    903 ,{0,0}
    904 ,{0,0}
    905 ,{0,0}
    906 ,{0,0}
    907 ,{0,0}
    908 ,{0,0}
    909 ,{0,0}
    910 ,{0,0}
    911 ,{0,0}
    912 ,{0,0}
    913 ,{0,0}
    914 ,{0,0}
    915 ,{0,0}
    916 ,{0,0}
    917 ,{0,0}
    918 ,{0,0}
    919 ,{0,0}
    920 ,{0,0}
    921 ,{0,0}
    922 ,{0,0}
    923 },{
    924 {106,98,93,71}
    925 ,{66,74,87,66}
    926 ,{48,46,38,33}
    927 ,{40,41,33,26}
    928 ,{25,29,40,57}
    929 ,{63,62,71,80}
    930 },{
    931 {83,79,75,75,92,112,31100}
    932 ,{125,126,117,113,107,94,20315}
    933 ,{108,116,122,124,117,120,32117}
    934 ,{110,99,94,98,107,93,17217}
    935 },{88,82,94,108,111,126,104,88}
    936 #else
    937 {185,175,191,197},{
    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 ,{0,0}
    950 ,{0,0}
    951 ,{0,0}
    952 ,{0,0}
    953 ,{0,0}
    954 ,{0,0}
    955 ,{0,0}
    956 ,{0,0}
    957 ,{0,0}
    958 ,{0,0}
    959 ,{0,0}
    960 ,{0,0}
    961 ,{0,0}
    962 },{
    963 {71,93,98,106}
    964 ,{66,87,74,66}
    965 ,{33,38,46,48}
    966 ,{26,33,41,40}
    967 ,{57,40,29,25}
    968 ,{80,71,62,63}
    969 },{
    970 {75,75,79,83,31100,112,92}
    971 ,{113,117,126,125,20315,94,107}
    972 ,{124,122,116,108,32117,120,117}
    973 ,{98,94,99,110,17217,93,107}
    974 },{108,94,82,88,88,104,126,111}
     2078
     2079
     2080
     2081
     2082
     2083
     2084
     2085int  verifie_block(block_type_modele* blk)
     2086
     2087{
     2088
     2089int type,lg,som;
     2090
     2091def_long_block
     2092
     2093if(blk->debut != debut_block_mesure)                                    return(block_debut_erreur);
     2094
     2095type=type_block(blk);           if( (type<0) ||(type>=nb_type_blocks) ) return(block_type_inconnu);     
     2096
     2097lg=longueur_block(blk);         if( lg != long_block[type] )            return(block_longueur_erreur); 
     2098
     2099if( blk->mot[(lg/4)-4]  !=      fin_block_mesure)                       return(block_fin_erreur);       
     2100
     2101#ifndef SWAP
     2102
     2103som=calcul_somme_block(blk,lg); if( som!= somme_block(blk))             return(block_somme_erreur);
     2104
    9752105#endif
    976 /*fin_reglage*/
    977 
    978 } };
    979 
    980 /* ------------------------------------   corps  des fonctions   ------------------------------ */
    981 /* -------------------------------------------------------------------------------------------- */
    982 
    983 
    984 
    985 unsigned long   val_long(char x)
     2106
     2107return(block_correct);
     2108
     2109}
     2110
     2111
     2112
     2113
     2114
     2115int  verifie_block_printf(block_type_modele* blk)
     2116
    9862117{
    987 unsigned long a,xl;
    988 char aa;
    989 aa=x-2;
    990 a=aa;
    991 if(x<3)  xl=x;  else    xl=((a&1) + 2)<<(a>>1);
    992 return(xl);
     2118
     2119int type,lg,som;
     2120
     2121def_long_block
     2122
     2123def_nom_block
     2124
     2125if(blk->debut != debut_block_mesure)
     2126
     2127        {
     2128
     2129        printf(" erreur dans le code debut de block      \n");
     2130
     2131        return(block_debut_erreur);
     2132
     2133        }       
     2134
     2135
     2136
     2137type=type_block(blk);
     2138
     2139if( (type<0) || (type>nb_type_blocks) )
     2140
     2141        {
     2142
     2143        printf(" block de type %d  inconnu\n",type);
     2144
     2145        return(block_type_inconnu);
     2146
     2147        }
     2148
     2149
     2150
     2151lg=longueur_block(blk);
     2152
     2153if( lg!=long_block[type] )     
     2154
     2155        {
     2156
     2157        printf(" block type %s  erreur de longueur (nominal=%d , dans le block=%d \n"
     2158
     2159                        ,nom_block[type],long_block[type],lg);
     2160
     2161        return(block_longueur_erreur);
     2162
     2163        }
     2164
     2165
     2166
     2167som=calcul_somme_block(blk,lg);
     2168
     2169if( som!=somme_block(blk) )     
     2170
     2171        {
     2172
     2173        printf(" block type %s   :  erreur de somme (calculee=%d , dans le block=%d \n"
     2174
     2175                        ,nom_block[type],som,somme_block(blk) );
     2176
     2177        return(block_somme_erreur);
     2178
     2179        }
     2180
     2181       
     2182
     2183if(blk->mot[(lg/4)-4]   != fin_block_mesure)   
     2184
     2185        {
     2186
     2187        printf(" block type %s  erreur de code fin de block : trouve %x au lieu de %x \n"
     2188
     2189                        ,nom_block[type],(int)blk->mot[(lg/4)-4],fin_block_mesure);
     2190
     2191        return(block_fin_erreur);
     2192
     2193        }
     2194
     2195
     2196
     2197return(block_correct);
     2198
    9932199}
    9942200
    9952201
    996 double  val_double(char x)
    997 {
    998 unsigned long a,xl;
    999 if(x<0) x=-x;   a=x;    if(!a)  xl=0;   else    xl=((a&1) + 2)<<(a>>1);
    1000 if(x>0) return(1e-4*(double)xl);        else    return(-1e-4*(double)xl);
    1001 }
    1002 
    1003 int     new_val_dac(int a,char  code)
    1004 {
    1005 if(code&0x80)   a=(code&0x7f) <<5 ;
    1006 else    {
    1007         if(code&0x40)   a+=code&0x3f;   
    1008         else            a-=code&0x3f;   
    1009         }
    1010 return(a);
    1011 }
    1012 
    1013 
    1014 
    1015 
    1016 int     calcul_somme_block(block_type_modele* blk,int longueur)
    1017 {
    1018 int i,so=0;;
    1019 for(i=0;i<(longueur/4-4);i++)  so^=(int)blk->mot[i];
    1020 /* somme sur tous les mots internes     : on exclus le dbut, les codes et la fin        */
    1021 return((so^(so>>16))&0xffff);
    1022 }
    1023 
    1024 
    1025 
    1026 
    1027 void  valide_block(block_type_modele* blk,int type,int block_num)
    1028 {
    1029 int somme,longueur;
    1030 def_long_block
    1031 longueur=long_block[type];
    1032 /*printf("valide block adresse %x  type %d  numblock %d  longueur=%d \n" */
    1033 /*              ,(unsigned)blk,type,block_num,longueur);*/
    1034 blk->debut              =       debut_block_mesure;
    1035 blk->code2              =       (((long)block_num) & 0xffffff ) | ( (((long)type)<<24)&0xff000000 );
    1036 
    1037 blk->mot[longueur/4-4]  =       fin_block_mesure;
    1038 somme=calcul_somme_block(blk,longueur);
    1039 blk->code1              =       (((long)longueur)<<16)  |       somme;
    1040 }
    1041 
    1042 
    1043 
    1044 
    1045 int  verifie_block(block_type_modele* blk)
    1046 {
    1047 int type,lg,som;
    1048 def_long_block
    1049 if(blk->debut != debut_block_mesure)                                    return(block_debut_erreur);
    1050 type=type_block(blk);           if( (type<0) ||(type>=nb_type_blocks) ) return(block_type_inconnu);     
    1051 lg=longueur_block(blk);         if( lg != long_block[type] )            return(block_longueur_erreur); 
    1052 if( blk->mot[(lg/4)-4]  !=      fin_block_mesure)                       return(block_fin_erreur);       
    1053 som=calcul_somme_block(blk,lg); if( som!= somme_block(blk))             return(block_somme_erreur);
    1054 return(block_correct);
    1055 }
    1056 
    1057 
    1058 int  verifie_block_printf(block_type_modele* blk)
    1059 {
    1060 int type,lg,som;
    1061 def_long_block
    1062 def_nom_block
    1063 if(blk->debut != debut_block_mesure)
    1064         {
    1065         printf(" erreur dans le code debut de block      \n");
    1066         return(block_debut_erreur);
    1067         }       
    1068 
    1069 type=type_block(blk);
    1070 if( (type<0) || (type>nb_type_blocks) )
    1071         {
    1072         printf(" block de type %d  inconnu\n",type);
    1073         return(block_type_inconnu);
    1074         }
    1075 
    1076 lg=longueur_block(blk);
    1077 if( lg!=long_block[type] )     
    1078         {
    1079         printf(" block type %s  erreur de longueur (nominal=%d , dans le block=%d \n"
    1080                         ,nom_block[type],long_block[type],lg);
    1081         return(block_longueur_erreur);
    1082         }
    1083 
    1084 som=calcul_somme_block(blk,lg);
    1085 if( som!=somme_block(blk) )     
    1086         {
    1087         printf(" block type %s   :  erreur de somme (calculee=%d , dans le block=%d \n"
    1088                         ,nom_block[type],som,somme_block(blk) );
    1089         return(block_somme_erreur);
    1090         }
    1091        
    1092 if(blk->mot[(lg/4)-4]   != fin_block_mesure)   
    1093         {
    1094         printf(" block type %s  erreur de code fin de block : trouve %x au lieu de %x \n"
    1095                         ,nom_block[type],(int)blk->mot[(lg/4)-4],fin_block_mesure);
    1096         return(block_fin_erreur);
    1097         }
    1098 
    1099 return(block_correct);
    1100 }
    1101 
    1102 
    1103 
    1104 
    1105 
     2202
     2203
     2204
     2205
     2206
     2207
     2208
     2209
     2210
Note: See TracChangeset for help on using the changeset viewer.