Limit DMRS PUCCH SNR to void NAN/INF

master
Xavier Arteaga 3 years ago committed by Xavier Arteaga
parent d783fbf3a0
commit 6a9baef11d

@ -238,7 +238,7 @@ int srsran_dmrs_pucch_format1_estimate(const srsran_pucch_nr_t* q,
res->rsrp_dBfs = srsran_convert_power_to_dB(rsrp);
res->epre = epre;
res->epre_dBfs = srsran_convert_power_to_dB(epre);
res->noise_estimate = epre - rsrp;
res->noise_estimate = SRSRAN_MAX(epre - rsrp, 1e-6f);
res->noise_estimate_dbm = srsran_convert_power_to_dB(res->noise_estimate);
res->snr = rsrp / res->noise_estimate;
res->snr_db = srsran_convert_power_to_dB(res->snr);
@ -398,7 +398,7 @@ int srsran_dmrs_pucch_format2_estimate(const srsran_pucch_nr_t* q,
res->rsrp_dBfs = srsran_convert_power_to_dB(rsrp);
res->epre = epre;
res->epre_dBfs = srsran_convert_power_to_dB(epre);
res->noise_estimate = epre - rsrp;
res->noise_estimate = SRSRAN_MAX(epre - rsrp, 1e-6f);
res->noise_estimate_dbm = srsran_convert_power_to_dB(res->noise_estimate);
res->snr = rsrp / res->noise_estimate;
res->snr_db = srsran_convert_power_to_dB(res->snr);

Loading…
Cancel
Save