|
@@
-1017,40
+1017,31
void setFBinMask( unsigned char *fbins_m
|
|
1017
|
closestBin = binAbove;
|
|
1017
|
closestBin = binAbove;
|
|
1018
|
}
|
|
1018
|
}
|
|
1019
|
|
|
1019
|
|
|
1020
|
// compute the fi interval [fi - Delta_f * 0.285, fi + Delta_f * 0.285]
|
|
1020
|
// compute the fi interval [fi - deltaFreq * 0.285, fi + deltaFreq * 0.285]
|
|
1021
|
fi = closestBin * deltaFreq;
|
|
1021
|
fi = closestBin * deltaFreq;
|
|
1022
|
|
|
|
|
|
1023
|
fi_min = fi - (deltaFreq * 0.285);
|
|
1022
|
fi_min = fi - (deltaFreq * 0.285);
|
|
1024
|
if ( fi_min < 0 )
|
|
1023
|
fi_MAX = fi + (deltaFreq * 0.285);
|
|
1025
|
{
|
|
|
|
|
1026
|
fi_min = 0;
|
|
|
|
|
1027
|
}
|
|
|
|
|
1028
|
else if ( fi_min > (deltaFreq * 127) )
|
|
|
|
|
1029
|
{
|
|
|
|
|
1030
|
fi_min = -1;
|
|
|
|
|
1031
|
}
|
|
|
|
|
1032
|
|
|
1024
|
|
|
1033
|
fi_MAX = fi + (deltaFreq * 0.285);
|
|
1025
|
//**************************************************************************************
|
|
1034
|
if ( fi_MAX > (deltaFreq*127) )
|
|
1026
|
// be careful here, one shall take into account that the bin 0 IS DROPPED in the spectra
|
|
1035
|
{
|
|
1027
|
// thus, the index 0 in a mask corresponds to the bin 1 of the spectrum
|
|
1036
|
fi_MAX = -1;
|
|
1028
|
//**************************************************************************************
|
|
1037
|
}
|
|
|
|
|
1038
|
|
|
1029
|
|
|
1039
|
// 1. IF [ f_RW_min, f_RW_MAX] is included in [ fi_min; fi_MAX ]
|
|
1030
|
// 1. IF [ f_RW_min, f_RW_MAX] is included in [ fi_min; fi_MAX ]
|
|
1040
|
// => remove f_(i), f_(i-1) and f_(i+1)
|
|
1031
|
// => remove f_(i), f_(i-1) and f_(i+1)
|
|
1041
|
if ( ( f_RW_min > fi_min ) && ( f_RW_MAX < fi_MAX ) )
|
|
1032
|
if ( ( f_RW_min > fi_min ) && ( f_RW_MAX < fi_MAX ) )
|
|
1042
|
{
|
|
1033
|
{
|
|
1043
|
binToRemove[0] = closestBin - 1;
|
|
1034
|
binToRemove[0] = (closestBin - 1) - 1;
|
|
1044
|
binToRemove[1] = closestBin;
|
|
1035
|
binToRemove[1] = (closestBin) - 1;
|
|
1045
|
binToRemove[2] = closestBin + 1;
|
|
1036
|
binToRemove[2] = (closestBin + 1) - 1;
|
|
1046
|
}
|
|
1037
|
}
|
|
1047
|
// 2. ELSE
|
|
1038
|
// 2. ELSE
|
|
1048
|
// => remove the two f_(i) which are around f_RW
|
|
1039
|
// => remove the two f_(i) which are around f_RW
|
|
1049
|
else
|
|
1040
|
else
|
|
1050
|
{
|
|
1041
|
{
|
|
1051
|
binToRemove[0] = binBelow;
|
|
1042
|
binToRemove[0] = (binBelow) - 1;
|
|
1052
|
binToRemove[1] = binAbove;
|
|
1043
|
binToRemove[1] = (binAbove) - 1;
|
|
1053
|
binToRemove[2] = -1;
|
|
1044
|
binToRemove[2] = (-1);
|
|
1054
|
}
|
|
1045
|
}
|
|
1055
|
|
|
1046
|
|
|
1056
|
for (k = 0; k < 3; k++)
|
|
1047
|
for (k = 0; k < 3; k++)
|
|
@@
-1083,15
+1074,15
void build_sy_lfr_rw_mask( unsigned int
|
|
1083
|
switch (channel)
|
|
1074
|
switch (channel)
|
|
1084
|
{
|
|
1075
|
{
|
|
1085
|
case 0:
|
|
1076
|
case 0:
|
|
1086
|
maskPtr = parameter_dump_packet.sy_lfr_rw_mask_f0_word1;
|
|
1077
|
maskPtr = parameter_dump_packet.sy_lfr_rw_mask.fx.f0_word1;
|
|
1087
|
deltaF = 96.;
|
|
1078
|
deltaF = 96.;
|
|
1088
|
break;
|
|
1079
|
break;
|
|
1089
|
case 1:
|
|
1080
|
case 1:
|
|
1090
|
maskPtr = parameter_dump_packet.sy_lfr_rw_mask_f1_word1;
|
|
1081
|
maskPtr = parameter_dump_packet.sy_lfr_rw_mask.fx.f1_word1;
|
|
1091
|
deltaF = 16.;
|
|
1082
|
deltaF = 16.;
|
|
1092
|
break;
|
|
1083
|
break;
|
|
1093
|
case 2:
|
|
1084
|
case 2:
|
|
1094
|
maskPtr = parameter_dump_packet.sy_lfr_rw_mask_f2_word1;
|
|
1085
|
maskPtr = parameter_dump_packet.sy_lfr_rw_mask.fx.f2_word1;
|
|
1095
|
deltaF = 1.;
|
|
1086
|
deltaF = 1.;
|
|
1096
|
break;
|
|
1087
|
break;
|
|
1097
|
default:
|
|
1088
|
default:
|
|
@@
-1157,12
+1148,12
void merge_fbins_masks( void )
|
|
1157
|
unsigned char *rw_mask_f1;
|
|
1148
|
unsigned char *rw_mask_f1;
|
|
1158
|
unsigned char *rw_mask_f2;
|
|
1149
|
unsigned char *rw_mask_f2;
|
|
1159
|
|
|
1150
|
|
|
1160
|
fbins_f0 = parameter_dump_packet.sy_lfr_fbins_f0_word1;
|
|
1151
|
fbins_f0 = parameter_dump_packet.sy_lfr_fbins.fx.f0_word1;
|
|
1161
|
fbins_f1 = parameter_dump_packet.sy_lfr_fbins_f1_word1;
|
|
1152
|
fbins_f1 = parameter_dump_packet.sy_lfr_fbins.fx.f1_word1;
|
|
1162
|
fbins_f2 = parameter_dump_packet.sy_lfr_fbins_f2_word1;
|
|
1153
|
fbins_f2 = parameter_dump_packet.sy_lfr_fbins.fx.f2_word1;
|
|
1163
|
rw_mask_f0 = parameter_dump_packet.sy_lfr_rw_mask_f0_word1;
|
|
1154
|
rw_mask_f0 = parameter_dump_packet.sy_lfr_rw_mask.fx.f0_word1;
|
|
1164
|
rw_mask_f1 = parameter_dump_packet.sy_lfr_rw_mask_f1_word1;
|
|
1155
|
rw_mask_f1 = parameter_dump_packet.sy_lfr_rw_mask.fx.f1_word1;
|
|
1165
|
rw_mask_f2 = parameter_dump_packet.sy_lfr_rw_mask_f2_word1;
|
|
1156
|
rw_mask_f2 = parameter_dump_packet.sy_lfr_rw_mask.fx.f2_word1;
|
|
1166
|
|
|
1157
|
|
|
1167
|
for( k=0; k < 16; k++ )
|
|
1158
|
for( k=0; k < 16; k++ )
|
|
1168
|
{
|
|
1159
|
{
|
|
@@
-1184,7
+1175,7
int set_sy_lfr_fbins( ccsdsTelecommandPa
|
|
1184
|
|
|
1175
|
|
|
1185
|
status = LFR_SUCCESSFUL;
|
|
1176
|
status = LFR_SUCCESSFUL;
|
|
1186
|
|
|
1177
|
|
|
1187
|
fbins_mask_dump = parameter_dump_packet.sy_lfr_fbins_f0_word1;
|
|
1178
|
fbins_mask_dump = parameter_dump_packet.sy_lfr_fbins.raw;
|
|
1188
|
fbins_mask_TC = TC->dataAndCRC;
|
|
1179
|
fbins_mask_TC = TC->dataAndCRC;
|
|
1189
|
|
|
1180
|
|
|
1190
|
for (k=0; k < NB_FBINS_MASKS * NB_BYTES_PER_FBINS_MASK; k++)
|
|
1181
|
for (k=0; k < NB_FBINS_MASKS * NB_BYTES_PER_FBINS_MASK; k++)
|
|
@@
-1465,7
+1456,7
void init_parameter_dump( void )
|
|
1465
|
// FBINS MASKS
|
|
1456
|
// FBINS MASKS
|
|
1466
|
for (k=0; k < NB_FBINS_MASKS * NB_BYTES_PER_FBINS_MASK; k++)
|
|
1457
|
for (k=0; k < NB_FBINS_MASKS * NB_BYTES_PER_FBINS_MASK; k++)
|
|
1467
|
{
|
|
1458
|
{
|
|
1468
|
parameter_dump_packet.sy_lfr_fbins_f0_word1[k] = 0xff;
|
|
1459
|
parameter_dump_packet.sy_lfr_fbins.raw[k] = 0xff;
|
|
1469
|
}
|
|
1460
|
}
|
|
1470
|
|
|
1461
|
|
|
1471
|
// PAS FILTER PARAMETERS
|
|
1462
|
// PAS FILTER PARAMETERS
|
|
@@
-1480,7
+1471,7
void init_parameter_dump( void )
|
|
1480
|
// LFR_RW_MASK
|
|
1471
|
// LFR_RW_MASK
|
|
1481
|
for (k=0; k < NB_FBINS_MASKS * NB_BYTES_PER_FBINS_MASK; k++)
|
|
1472
|
for (k=0; k < NB_FBINS_MASKS * NB_BYTES_PER_FBINS_MASK; k++)
|
|
1482
|
{
|
|
1473
|
{
|
|
1483
|
parameter_dump_packet.sy_lfr_rw_mask_f0_word1[k] = 0xff;
|
|
1474
|
parameter_dump_packet.sy_lfr_rw_mask.raw[k] = 0xff;
|
|
1484
|
}
|
|
1475
|
}
|
|
1485
|
}
|
|
1476
|
}
|
|
1486
|
|
|
1477
|
|