diff --git a/.hgsubstate b/.hgsubstate --- a/.hgsubstate +++ b/.hgsubstate @@ -1,2 +1,2 @@ -0f2eb26d750be2b6d8a3f5dee479b4575d3b93be LFR_basic-parameters +cc82265fd480dbd0344bbf888476c76602b3e9c0 LFR_basic-parameters 95a8d83f1d0c59f28a679e66e23464f21c12dd8a header/lfr_common_headers diff --git a/src/processing/avf0_prc0.c b/src/processing/avf0_prc0.c --- a/src/processing/avf0_prc0.c +++ b/src/processing/avf0_prc0.c @@ -279,7 +279,7 @@ rtems_task prc0_task( rtems_task_argumen NB_BINS_COMPRESSED_SM_SBM_F0, NB_BINS_TO_AVERAGE_ASM_SBM_F0, ASM_F0_INDICE_START); // 2) compute the BP1 set -// BP1_set( compressed_sm_sbm_f0, k_coeff_intercalib_f0_sbm, NB_BINS_COMPRESSED_SM_SBM_F0, packet_sbm_bp1.data ); + BP1_set( compressed_sm_sbm_f0, k_coeff_intercalib_f0_sbm, NB_BINS_COMPRESSED_SM_SBM_F0, packet_sbm_bp1.data ); // 3) send the BP1 set set_time( packet_sbm_bp1.time, (unsigned char *) &incomingMsg->coarseTimeSBM ); set_time( packet_sbm_bp1.acquisitionTime, (unsigned char *) &incomingMsg->coarseTimeSBM ); @@ -313,7 +313,7 @@ rtems_task prc0_task( rtems_task_argumen NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, ASM_F0_INDICE_START ); // 2) compute the BP1 set -// BP1_set( compressed_sm_norm_f0, k_coeff_intercalib_f0_norm, NB_BINS_COMPRESSED_SM_F0, packet_norm_bp1.data ); + BP1_set( compressed_sm_norm_f0, k_coeff_intercalib_f0_norm, NB_BINS_COMPRESSED_SM_F0, packet_norm_bp1.data ); // 3) send the BP1 set set_time( packet_norm_bp1.time, (unsigned char *) &incomingMsg->coarseTimeNORM ); set_time( packet_norm_bp1.acquisitionTime, (unsigned char *) &incomingMsg->coarseTimeNORM ); diff --git a/src/processing/avf1_prc1.c b/src/processing/avf1_prc1.c --- a/src/processing/avf1_prc1.c +++ b/src/processing/avf1_prc1.c @@ -21,7 +21,10 @@ ring_node_asm asm_ring_burst_sbm_f1 [ NB ring_node ring_to_send_asm_f1 [ NB_RING_NODES_ASM_F1 ]; int buffer_asm_f1 [ NB_RING_NODES_ASM_F1 * TOTAL_SIZE_SM ]; -float asm_f1_reorganized [ TOTAL_SIZE_SM ]; +float asm_f1_patched_norm [ TOTAL_SIZE_SM ]; +float asm_f1_patched_burst_sbm [ TOTAL_SIZE_SM ]; +float asm_f1_reorganized [ TOTAL_SIZE_SM ]; + char asm_f1_char [ TOTAL_SIZE_SM * 2 ]; float compressed_sm_norm_f1[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F1]; float compressed_sm_sbm_f1 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 ]; @@ -253,6 +256,9 @@ rtems_task prc1_task( rtems_task_argumen incomingMsg = (asm_msg*) incomingData; + ASM_patch( incomingMsg->norm->matrix, asm_f1_patched_norm ); + ASM_patch( incomingMsg->burst_sbm->matrix, asm_f1_patched_burst_sbm ); + localTime = getTimeAsUnsignedLongLongInt( ); //*********** //*********** @@ -263,7 +269,7 @@ rtems_task prc1_task( rtems_task_argumen { sid = getSID( incomingMsg->event ); // 1) compress the matrix for Basic Parameters calculation - ASM_compress_reorganize_and_divide( incomingMsg->burst_sbm->matrix, compressed_sm_sbm_f1, + ASM_compress_reorganize_and_divide( asm_f1_patched_burst_sbm, compressed_sm_sbm_f1, nb_sm_before_f1.burst_sbm_bp1, NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1, ASM_F1_INDICE_START); @@ -297,12 +303,12 @@ rtems_task prc1_task( rtems_task_argumen if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1) { // 1) compress the matrix for Basic Parameters calculation - ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f1, + ASM_compress_reorganize_and_divide( asm_f1_patched_norm, compressed_sm_norm_f1, nb_sm_before_f1.norm_bp1, NB_BINS_COMPRESSED_SM_F1, NB_BINS_TO_AVERAGE_ASM_F1, ASM_F1_INDICE_START ); // 2) compute the BP1 set -// BP1_set( compressed_sm_norm_f1, k_coeff_intercalib_f1_norm, NB_BINS_COMPRESSED_SM_F1, packet_norm_bp1.data ); + BP1_set( compressed_sm_norm_f1, k_coeff_intercalib_f1_norm, NB_BINS_COMPRESSED_SM_F1, packet_norm_bp1.data ); // 3) send the BP1 set set_time( packet_norm_bp1.time, (unsigned char *) &incomingMsg->coarseTimeNORM ); set_time( packet_norm_bp1.acquisitionTime, (unsigned char *) &incomingMsg->coarseTimeNORM ); @@ -325,7 +331,7 @@ rtems_task prc1_task( rtems_task_argumen if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F1) { // 1) reorganize the ASM and divide - ASM_reorganize_and_divide( incomingMsg->norm->matrix, + ASM_reorganize_and_divide( asm_f1_patched_norm, asm_f1_reorganized, nb_sm_before_f1.norm_bp1 ); // 2) convert the float array in a char array diff --git a/src/processing/avf2_prc2.c b/src/processing/avf2_prc2.c --- a/src/processing/avf2_prc2.c +++ b/src/processing/avf2_prc2.c @@ -20,7 +20,9 @@ ring_node_asm asm_ring_norm_f2 [ NB_ ring_node ring_to_send_asm_f2 [ NB_RING_NODES_ASM_F2 ]; int buffer_asm_f2 [ NB_RING_NODES_ASM_F2 * TOTAL_SIZE_SM ]; -float asm_f2_reorganized [ TOTAL_SIZE_SM ]; +float asm_f2_patched_norm [ TOTAL_SIZE_SM ]; +float asm_f2_reorganized [ TOTAL_SIZE_SM ]; + char asm_f2_char [ TOTAL_SIZE_SM * 2 ]; float compressed_sm_norm_f2[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F2]; @@ -188,6 +190,8 @@ rtems_task prc2_task( rtems_task_argumen incomingMsg = (asm_msg*) incomingData; + ASM_patch( incomingMsg->norm->matrix, asm_f2_patched_norm ); + localTime = getTimeAsUnsignedLongLongInt( ); //***** @@ -196,7 +200,7 @@ rtems_task prc2_task( rtems_task_argumen //***** //***** // 1) compress the matrix for Basic Parameters calculation - ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f2, + ASM_compress_reorganize_and_divide( asm_f2_patched_norm, compressed_sm_norm_f2, nb_sm_before_f2.norm_bp1, NB_BINS_COMPRESSED_SM_F2, NB_BINS_TO_AVERAGE_ASM_F2, ASM_F2_INDICE_START ); @@ -204,7 +208,7 @@ rtems_task prc2_task( rtems_task_argumen if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F2) { // 1) compute the BP1 set -// BP1_set( compressed_sm_norm_f2, k_coeff_intercalib_f2, NB_BINS_COMPRESSED_SM_F2, packet_norm_bp1.data ); + BP1_set( compressed_sm_norm_f2, k_coeff_intercalib_f2, NB_BINS_COMPRESSED_SM_F2, packet_norm_bp1.data ); // 2) send the BP1 set set_time( packet_norm_bp1.time, (unsigned char *) &incomingMsg->coarseTimeNORM ); set_time( packet_norm_bp1.acquisitionTime, (unsigned char *) &incomingMsg->coarseTimeNORM ); @@ -228,7 +232,7 @@ rtems_task prc2_task( rtems_task_argumen if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F2) { // 1) reorganize the ASM and divide - ASM_reorganize_and_divide( incomingMsg->norm->matrix, + ASM_reorganize_and_divide( asm_f2_patched_norm, asm_f2_reorganized, nb_sm_before_f2.norm_bp1 ); // 2) convert the float array in a char array