From 44ac6c2675fc90c87c89230bbf8110b603c30776 Mon Sep 17 00:00:00 2001 From: Piotr Gawlowicz Date: Thu, 29 Jun 2023 10:58:26 +0200 Subject: [PATCH] band_helper: fix rounding error in center freq calculation --- lib/src/common/band_helper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/common/band_helper.cc b/lib/src/common/band_helper.cc index e1ff71237..7c7eea140 100644 --- a/lib/src/common/band_helper.cc +++ b/lib/src/common/band_helper.cc @@ -115,7 +115,7 @@ double srsran_band_helper::get_center_freq_from_abs_freq_point_a(uint32_t nof_pr // TODO: add offset_to_carrier double abs_freq_point_a_freq = nr_arfcn_to_freq(freq_point_a_arfcn); return abs_freq_point_a_freq + - (nof_prb / 2 * SRSRAN_SUBC_SPACING_NR(srsran_subcarrier_spacing_t::srsran_subcarrier_spacing_15kHz) * + (1.0 * nof_prb / 2 * SRSRAN_SUBC_SPACING_NR(srsran_subcarrier_spacing_t::srsran_subcarrier_spacing_15kHz) * SRSRAN_NRE); }