NR_UE: reset max_pos_fil in timing synchronization whenever we add/remove a sample

This commit is contained in:
Thomas Schlichter
2021-10-27 17:30:05 +02:00
parent 2c2ba26553
commit 209d5f1131
3 changed files with 12 additions and 10 deletions
+4 -2
View File
@@ -464,14 +464,16 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
UE->rx_offset > 0 ) {
//LOG_I(PHY,"!!!adjusting -1 samples!!!\n");
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
return -1 ;
}
if ( UE->rx_offset > UE->frame_parms.samples_per_frame/2 &&
UE->rx_offset < UE->frame_parms.samples_per_frame ) {
//LOG_I(PHY,"!!!adjusting +1 samples!!!\n");
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
UE->max_pos_fil = 0; // reset IIR filter when sample shift is applied
return 1;
}