From ba5bda5c6e25c3d4674394f32a753360249f8d32 Mon Sep 17 00:00:00 2001
From: Roberto Louro Magueta <rmagueta@allbesmart.pt>
Date: Tue, 10 May 2022 15:00:43 +0100
Subject: [PATCH] Fix bw_scaling

---
 openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
index a2ee62fbde3..403a96983c6 100644
--- a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
+++ b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
@@ -90,7 +90,7 @@ int nr_est_timing_advance_srs(NR_DL_FRAME_PARMS *frame_parms,
   }
 
   // Scale the 16 factor in N_TA calculation in 38.213 section 4.2 according to the used FFT size
-  uint16_t bw_scaling = frame_parms->ofdm_symbol_size >> 11;
+  uint16_t bw_scaling = frame_parms->ofdm_symbol_size >> 7;
 
   // do some integer rounding to improve TA accuracy
   int sync_pos_rounded;
-- 
GitLab