From 3f002aca85f9a23226c3481b3619ae11ad798e94 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 9 Feb 2018 12:14:23 +0100 Subject: [PATCH] Corrected energy measurement of the RSRP --- lib/src/phy/ch_estimation/chest_dl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/phy/ch_estimation/chest_dl.c b/lib/src/phy/ch_estimation/chest_dl.c index 98ff6618c..3dae7f9e5 100644 --- a/lib/src/phy/ch_estimation/chest_dl.c +++ b/lib/src/phy/ch_estimation/chest_dl.c @@ -543,8 +543,7 @@ void chest_interpolate_noise_est(srslte_chest_dl_t *q, cf_t *input, cf_t *ce, ui /* Compute RSRP for the channel estimates in this port */ uint32_t npilots = SRSLTE_REFSIGNAL_NUM_SF(q->cell.nof_prb, port_id); - float energy = cabsf(srslte_vec_acc_cc(q->pilot_estimates, npilots)/npilots); - q->rsrp[rxant_id][port_id] = energy*energy; + q->rsrp[rxant_id][port_id] = __real__ srslte_vec_dot_prod_conj_ccc(q->pilot_estimates, q->pilot_estimates, npilots) / npilots; q->rssi[rxant_id][port_id] = srslte_chest_dl_rssi(q, input, port_id); }