Project

General

Profile

Bug #867

Fonction setFBinMask: Calcul masque erroné

Added by Veronique bouzid almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Immediate
Category:
R3+
Target version:
-
Start date:
29/12/2016
Due date:
% Done:

0%

Estimated time:
revision:
r0

Description

J ai testé la fonction serFBinMask avec les parametres décrits ci-dessous
setFBinMask( fbins_mask, rw_f, deltaFreq, flag );

rw_f = 96.0
deltaFreq= 96.0

flag=1

Voila la trace du calcul

--> on trouve 3 bins à masquer 0,1,2
Channel = 0 and Freq = 96.000000
binBelow = 1 and binAbove = 1
closestBin = 1
bin0 = 0 and bin1= 1 and bin2= 2

le premier masque calculé pour le bin 0
Byte Range is 15 and previous mask is 0xff (condition initiale)
Byte Range is 15 and mask is 0xfe le maque calculé
au final
Byte Range is 15 and current mask is 0xfe

le masque calculé pour le bin 1
Byte Range is 15 and previous mask is 0xfe
Byte Range is 15 and mask is 0xfc le masque calculé
Byte Range is 15 and current mask is 0xfc

l+e masque calculé pour le bin 2+
Byte Range is 15 and previous mask is 0xfc
Byte Range is 15 and mask is 0xf8 le masque calculé
Byte Range is 15 and current mask is 0xf8

et ensuite le tour en plus lié au k=3
Byte Range is 15 and previous mask is 0xf8
Byte Range is 15 and mask is 0xf8
Byte Range is 15 and current mask is 0xf8

On obtient donc pour rw_f=96 hz et le channel 0, le masque suivant
Byte Range is 15 and current mask is 0xf8 ce qui signifie que les 3

Hors le tableau des frequences à F0 est le suivant
F0
[ 96 192 288 384 480 576 672 768
864 960 1056 1152 1248 1344 1440 1536
1632 1728 1824 1920 2016 2112 2208 2304
2400 2496 2592 2688 2784 2880 2976 3072
3168 3264 3360 3456 3552 3648 3744 3840
3936 4032 4128 4224 4320 4416 4512 4608
4704 4800 4896 4992 5088 5184 5280 5376
5472 5568 5664 5760 5856 5952 6048 6144
6240 6336 6432 6528 6624 6720 6816 6912
7008 7104 7200 7296 7392 7488 7584 7680
7776 7872 7968 8064 8160 8256 8352 8448
8544 8640 8736 8832 8928 9024 9120 9216
9312 9408 9504 9600 9696 9792 9888 9984
10080 10176 10272 10368 10464 10560 10656 10752
10848 10944 11040 11136 11232 11328 11424 11520
11616 11712 11808 11904 12000 12096 12192 12288]

et donc on devrait obtenir comme masque 0xfc puisque que 96 et 192 doivent etre masquées.

Je rappelle que la fréquence 0 n est pas à considérer comme indiqué dans le REQ-RPW-LFR-2407 du document RPW-MEB-LFR-00003 (Technical specifications)


Related issues

Related to Bug #864: Mauvais BIN filtrée suite à reception d'un UPDATE_INFO avec les fréquences RW : décalage de 1Closed2016-12-28

History

#1 Updated by Veronique bouzid almost 5 years ago

  • Related to Bug #864: Mauvais BIN filtrée suite à reception d'un UPDATE_INFO avec les fréquences RW : décalage de 1 added

#2 Updated by Veronique bouzid almost 5 years ago

  • Description updated (diff)

#3 Updated by paul leroy almost 5 years ago

Tout cela est exact et bien analysé, j'ai fait une erreur sur la signification des masques qui a conduit au décalage de 1 rang. J'ai repris la fonction de calcul et je l'ai testée de façon isolée, ça devrait coller maintenant.

Je corrige pour fsw >= 3.1.0.5

#4 Updated by paul leroy almost 5 years ago

  • Status changed from New to Resolved
  • Assignee changed from paul leroy to Veronique bouzid

#5 Updated by Veronique bouzid almost 5 years ago

  • Status changed from Resolved to Closed

Bug corrigé en 3.1.0.6.

Premier test /home/validation/SCRIPT/R3+/test_rw_one_freq_96.py
envoi de la frequence 96hz sur RW1_F1

08:54:42.815826, TC_LFR_UPDATE_INFO, CCSDS_VERSION_NUMBER = 0, PACKET_TYPE: TC_PACKET = 1, DATA_FIELD_HEADER_FLAG: WITH_HEADER = 1, PROCESS_ID: RPW_PID_2 = 76, PACKET_CATEGORY: PRIVATE_SCIENCE_OR_TELECOMMAND = 12, (PACKET_ID=0x1ccc), SEGMENTATION_GROUPING_FLAG: STANDALONE_PACKET = 3, SEQUENCE_CNT=0, (PACKET_SEQUENCE_CONTROL=0xc000), PACKET_LENGTH=103, CCSDS_SECONDARY_HEADER_FLAG=0, PUS_VERSION = 1, ACK_EXECUTION_COMPLETION=1, ACK_EXECUTION_PROGRESS=0, ACK_EXECUTION_START=0, ACK_ACCEPTANCE=1, SERVICE_TYPE: EQ_CONFIGURATION = 181, SERVICE_SUBTYPE: UPDATE_INFO = 51, SOURCE_ID: MISSION_TIMELINE = 110, CP_RPW_SC_RW1_F1=1119879168, CP_RPW_SC_RW1_F2=1073741824, CP_RPW_SC_RW2_F1=1077936128, CP_RPW_SC_RW2_F2=1082130432, CP_RPW_SC_RW3_F1=1084227584, CP_RPW_SC_RW3_F2=1086324736, CP_RPW_SC_RW4_F1=1088421888, CP_RPW_SC_RW4_F2=1090519040, SPARE=0x0, CP_RPW_SC_RW1_F1_FLAG: ENABLED = 1, CP_RPW_SC_RW1_F2_FLAG: DISABLED = 0, CP_RPW_SC_RW2_F1_FLAG: DISABLED = 0, CP_RPW_SC_RW2_F2_FLAG: DISABLED = 0, CP_RPW_SC_RW3_F1_FLAG: DISABLED = 0, CP_RPW_SC_RW3_F2_FLAG: DISABLED = 0, CP_RPW_SC_RW4_F1_FLAG: DISABLED = 0, CP_RPW_SC_RW4_F2_FLAG: DISABLED = 0, CP_RPW_SPARE1: 0, CP_RPW_SPARE2: 0, CP_RPW_SPARE3: 0, CP_RPW_SPARE4: 0, CP_RPW_SPARE5: 0, CP_RPW_SPARE6: 0, CP_RPW_SPARE7: 0, CP_RPW_SPARE8: 0, CP_RPW_SPARE9: 0, CP_RPW_SPARE10: 0, CP_RPW_SPARE11: 0, CP_RPW_SPARE12: 0, CP_RPW_SPARE13: 0, CP_RPW_SPARE14: 0, CP_RPW_SPARE15: 0, CRC = 0x59d2

--> La réponse à TC_LFR_DUMP_PAR

08:54:45.823862, TM_LFR_PARAMETER_DUMP, CCSDS_VERSION_NUMBER = 0, PACKET_TYPE: TM_PACKET = 0, DATA_FIELD_HEADER_FLAG: WITH_HEADER = 1, PROCESS_ID: RPW_PID_2 = 76, PACKET_CATEGORY: DUMP = 6, (PACKET_ID=0xcc6), SEGMENTATION_GROUPING_FLAG: STANDALONE_PACKET = 3, SEQUENCE_CNT=1, (PACKET_SEQUENCE_CONTROL=0xc001), PACKET_LENGTH=141, SPARE_1=0, PUS_VERSION = 1, SPARE_2=0, SERVICE_TYPE: EQ_CONFIGURATION = 181, SERVICE_SUBTYPE: PARAMETER_DUMP = 32, DESTINATION_ID: MISSION_TIMELINE = 110, TIME=0x8000000e1e0c, PA_LFR_HK_SID: LFR_DUMP_SID = 10, SPARE=0x0, SY_LFR_BW=1, SY_LFR_SP0=0, SY_LFR_SP1=0, SY_LFR_R0=0, SY_LFR_R1=0, SY_LFR_R2=0, SY_LFR_N_SWF_L=2048, SY_LFR_N_SWF_P=300(s), SY_LFR_N_ASM_P=3600(s), SY_LFR_N_BP_P0=4(s), SY_LFR_N_BP_P1=20(s), SPARE=0x0, SY_LFR_N_CWF_LONG_F3=0, SPARE=0x0, SY_LFR_B_BP_P0=1(s), SY_LFR_B_BP_P1=5(s), SY_LFR_S1_BP_P0=0.25(s), SY_LFR_S1_BP_P1=1(s), SY_LFR_S2_BP_P0=1(s), SY_LFR_S2_BP_P1=5(s), SY_LFR_FBINS_F0_WORD1=0xffffffff, SY_LFR_FBINS_F0_WORD2=0xffffffff, SY_LFR_FBINS_F0_WORD3=0xffffffff, SY_LFR_FBINS_F0_WORD4=0xffffffff, SY_LFR_FBINS_F1_WORD1=0xffffffff, SY_LFR_FBINS_F1_WORD2=0xffffffff, SY_LFR_FBINS_F1_WORD3=0xffffffff, SY_LFR_FBINS_F1_WORD4=0xffffffff, SY_LFR_FBINS_F2_WORD1=0xffffffff, SY_LFR_FBINS_F2_WORD2=0xffffffff, SY_LFR_FBINS_F2_WORD3=0xffffffff, SY_LFR_FBINS_F2_WORD4=0xffffffff, SPARE8_2=0x0, DOE_SPARE=0x0, SY_LFR_PAS_FILTER_ENABLED: DISABLED = 0, SY_LFR_PAS_FILTER_MODULUS=4, SY_LFR_PAS_FILTER_TBAD=1065353216, SY_LFR_PAS_FILTER_OFFSET=0, SY_LFR_PAS_FILTER_SHIFT=1056964608, SY_LFR_PAS_FILTER_DELTA_F=1020054733, PA_LFR_RW_MASK_F0_WORD1=0xffffffff, PA_LFR_RW_MASK_F0_WORD2=0xffffffff, PA_LFR_RW_MASK_F0_WORD3=0xffffffff, PA_LFR_RW_MASK_F0_WORD4=0xfffffffc, PA_LFR_RW_MASK_F1_WORD1=0xffffffff, PA_LFR_RW_MASK_F1_WORD2=0xffffffff, PA_LFR_RW_MASK_F1_WORD3=0xffffffff, PA_LFR_RW_MASK_F1_WORD4=0xffffff8f, PA_LFR_RW_MASK_F2_WORD1=0xfffffffe, PA_LFR_RW_MASK_F2_WORD2=0x3fffffff, PA_LFR_RW_MASK_F2_WORD3=0xffffffff, PA_LFR_RW_MASK_F2_WORD4=0xffffffff, SPARE8_3=0x0

La frequence 96hz est vue à F0, F1, F2
F0
--> on va masquer 2 bits puisque la premiere frequence est 96 et ceci dans PA_LFR_RW_MASK_F0_WORD4=0xfffffffc --> 2 bits à zeo
PA_LFR_RW_MASK_F0_WORD1=0xffffffff, PA_LFR_RW_MASK_F0_WORD2=0xffffffff, PA_LFR_RW_MASK_F0_WORD3=0xffffffff, PA_LFR_RW_MASK_F0_WORD4=0xfffffffc,

F1
--> on va masquer 3 bits et ceci dans PA_LFR_RW_MASK_F1_WORD4=0xffffff8f, --> 3bits à zero
PA_LFR_RW_MASK_F1_WORD1=0xffffffff, PA_LFR_RW_MASK_F1_WORD2=0xffffffff, PA_LFR_RW_MASK_F1_WORD3=0xffffffff, PA_LFR_RW_MASK_F1_WORD4=0xffffff8f,

F2
--> on va masquer 3 bits et ceci dans PA_LFR_RW_MASK_F1_WORD1=0xfffffffe et PA_LFR_RW_MASK_F2_WORD2=0x3fffffff, --> 3bits à zero
PA_LFR_RW_MASK_F2_WORD1=0xfffffffe, PA_LFR_RW_MASK_F2_WORD2=0x3fffffff, PA_LFR_RW_MASK_F2_WORD3=0xffffffff, PA_LFR_RW_MASK_F2_WORD4=0xffffffff

les fichiers 2(017_01_18-08_54_52*) sont rangés dans /home/validation/data/R3+/3.1.0.6/3.1.91/TESTS-UNITAIRES/test_rw_one_freq_96

Conclusion: Pour 96hz c'est bon.

Deuxieme test /home/validation/SCRIPT/R3+/test_rw_one_freq_1632.py
envoi de la frequence 1632 Hz sur RW1_F1

17:28:45.388465, TC_LFR_UPDATE_INFO, CCSDS_VERSION_NUMBER = 0, PACKET_TYPE: TC_PACKET = 1, DATA_FIELD_HEADER_FLAG: WITH_HEADER = 1, PROCESS_ID: RPW_PID_2 = 76, PACKET_CATEGORY: PRIVATE_SCIENCE_OR_TELECOMMAND = 12, (PACKET_ID=0x1ccc), SEGMENTATION_GROUPING_FLAG: STANDALONE_PACKET = 3, SEQUENCE_CNT=0, (PACKET_SEQUENCE_CONTROL=0xc000), PACKET_LENGTH=103, CCSDS_SECONDARY_HEADER_FLAG=0, PUS_VERSION = 1, ACK_EXECUTION_COMPLETION=1, ACK_EXECUTION_PROGRESS=0, ACK_EXECUTION_START=0, ACK_ACCEPTANCE=1, SERVICE_TYPE: EQ_CONFIGURATION = 181, SERVICE_SUBTYPE: UPDATE_INFO = 51, SOURCE_ID: MISSION_TIMELINE = 110,* CP_RPW_SC_RW1_F1_FLAG: ENABLED = 1*, CP_RPW_SC_RW1_F2_FLAG: DISABLED = 0, CP_RPW_SC_RW2_F1_FLAG: DISABLED = 0, CP_RPW_SC_RW2_F2_FLAG: DISABLED = 0, CP_RPW_SC_RW3_F1_FLAG: DISABLED = 0, CP_RPW_SC_RW3_F2_FLAG: DISABLED = 0, CP_RPW_SC_RW4_F1_FLAG: DISABLED = 0, CP_RPW_SC_RW4_F2_FLAG: DISABLED = 0, CP_RPW_SPARE1: 0, CP_RPW_SPARE2: 0, CP_RPW_SPARE3: 0, CP_RPW_SPARE4: 0, CP_RPW_SPARE5: 0, CP_RPW_SPARE6: 0, CP_RPW_SPARE7: 0, CP_RPW_SPARE8: 0, CP_RPW_SPARE9: 0, CP_RPW_SPARE10: 0, CP_RPW_SPARE11: 0, CP_RPW_SPARE12: 0, CP_RPW_SPARE13: 0, CP_RPW_SPARE14: 0, CP_RPW_SPARE15: 0

et
17:28:48.397312, TM_LFR_PARAMETER_DUMP, CCSDS_VERSION_NUMBER = 0, PACKET_TYPE: TM_PACKET = 0, DATA_FIELD_HEADER_FLAG: WITH_HEADER = 1, PROCESS_ID: RPW_PID_2 = 76, PACKET_CATEGORY: DUMP = 6, (PACKET_ID=0xcc6), SEGMENTATION_GROUPING_FLAG: STANDALONE_PACKET = 3, SEQUENCE_CNT=1, (PACKET_SEQUENCE_CONTROL=0xc001), PACKET_LENGTH=141, SPARE_1=0, PUS_VERSION = 1, SPARE_2=0, SERVICE_TYPE: EQ_CONFIGURATION = 181, SERVICE_SUBTYPE: PARAMETER_DUMP = 32, DESTINATION_ID: MISSION_TIMELINE = 110, TIME=0x8000000e7274, PA_LFR_HK_SID: LFR_DUMP_SID = 10, SPARE=0x0, SY_LFR_BW=1, SY_LFR_SP0=0, SY_LFR_SP1=0, SY_LFR_R0=0, SY_LFR_R1=0, SY_LFR_R2=0, SY_LFR_N_SWF_L=2048, SY_LFR_N_SWF_P=300(s), SY_LFR_N_ASM_P=3600(s), SY_LFR_N_BP_P0=4(s), SY_LFR_N_BP_P1=20(s), SPARE=0x0, SY_LFR_N_CWF_LONG_F3=0, SPARE=0x0, SY_LFR_B_BP_P0=1(s), SY_LFR_B_BP_P1=5(s), SY_LFR_S1_BP_P0=0.25(s), SY_LFR_S1_BP_P1=1(s), SY_LFR_S2_BP_P0=1(s), SY_LFR_S2_BP_P1=5(s), SY_LFR_FBINS_F0_WORD1=0xffffffff, SY_LFR_FBINS_F0_WORD2=0xffffffff, SY_LFR_FBINS_F0_WORD3=0xffffffff, SY_LFR_FBINS_F0_WORD4=0xffffffff, SY_LFR_FBINS_F1_WORD1=0xffffffff, SY_LFR_FBINS_F1_WORD2=0xffffffff, SY_LFR_FBINS_F1_WORD3=0xffffffff, SY_LFR_FBINS_F1_WORD4=0xffffffff, SY_LFR_FBINS_F2_WORD1=0xffffffff, SY_LFR_FBINS_F2_WORD2=0xffffffff, SY_LFR_FBINS_F2_WORD3=0xffffffff, SY_LFR_FBINS_F2_WORD4=0xffffffff, SPARE8_2=0x0, DOE_SPARE=0x0, SY_LFR_PAS_FILTER_ENABLED: DISABLED = 0, SY_LFR_PAS_FILTER_MODULUS=4, SY_LFR_PAS_FILTER_TBAD=1065353216, SY_LFR_PAS_FILTER_OFFSET=0, SY_LFR_PAS_FILTER_SHIFT=1056964608, SY_LFR_PAS_FILTER_DELTA_F=257711459533, PA_LFR_RW_MASK_F0_WORD1=0xffffffff, PA_LFR_RW_MASK_F0_WORD2=0xffffffff, PA_LFR_RW_MASK_F0_WORD3=0xffffffff, PA_LFR_RW_MASK_F0_WORD4=0xfffc7fff, PA_LFR_RW_MASK_F1_WORD1=0xffffff8f, PA_LFR_RW_MASK_F1_WORD2=0xffffffff, PA_LFR_RW_MASK_F1_WORD3=0xffffffff, PA_LFR_RW_MASK_F1_WORD4=0xffffffff, PA_LFR_RW_MASK_F2_WORD1=0xffffffff, PA_LFR_RW_MASK_F2_WORD2=0xffffffff, PA_LFR_RW_MASK_F2_WORD3=0xffffffff, PA_LFR_RW_MASK_F2_WORD4=0xffffffff, SPARE8_3=0x0

La fréquence 1632 est vue à F0 et F1
Dans les 2 cas, 3 bits seront positionnés à zéro.
F0
PA_LFR_RW_MASK_F0_WORD1=0xffffffff, PA_LFR_RW_MASK_F0_WORD2=0xffffffff, PA_LFR_RW_MASK_F0_WORD3=0xffffffff, PA_LFR_RW_MASK_F0_WORD4=0xfffc7fff,

F1
PA_LFR_RW_MASK_F1_WORD1=0xffffff8f, PA_LFR_RW_MASK_F1_WORD2=0xffffffff, PA_LFR_RW_MASK_F1_WORD3=0xffffffff, PA_LFR_RW_MASK_F1_WORD4=0xffffffff,

F2 (valeurs par défaut)
PA_LFR_RW_MASK_F2_WORD1=0xffffffff, PA_LFR_RW_MASK_F2_WORD2=0xffffffff, PA_LFR_RW_MASK_F2_WORD3=0xffffffff, PA_LFR_RW_MASK_F2_WORD4=0xffffffff

Les fichiers (2017_01_17-17_28_55*) sont rangés dans le répertoire /home/validation/data/R3+/3.1.0.6/3.1.91/TESTS-UNITAIRES/test_rw_one_freq_1632

Conclusion: Pour 1632 Hz c'est bon.

Bruno fera des tests plus poussés.

Also available in: Atom PDF