adding RI to DL metrics

master
Andre Puschmann 6 years ago
parent 53850e5353
commit d34ecaaa5e

@ -99,6 +99,7 @@ typedef struct {
float rx_gain_offset; float rx_gain_offset;
float avg_snr_db_cqi; float avg_snr_db_cqi;
float avg_snr_db_sync; float avg_snr_db_sync;
float avg_ri;
float avg_noise; float avg_noise;
bool pcell_meas_enabled; bool pcell_meas_enabled;

@ -44,6 +44,7 @@ struct dl_metrics_t
float rsrp; float rsrp;
float rsrq; float rsrq;
float rssi; float rssi;
float ri;
float turbo_iters; float turbo_iters;
float mcs; float mcs;
float pathloss; float pathloss;

@ -359,6 +359,7 @@ void phch_common::reset() {
avg_rsrp = 0; avg_rsrp = 0;
avg_rsrp_dbm = 0; avg_rsrp_dbm = 0;
avg_rsrq_db = 0; avg_rsrq_db = 0;
avg_ri = 0;
pcell_report_period = 20; pcell_report_period = 20;

@ -1665,6 +1665,13 @@ void phch_worker::update_measurements()
} }
} }
// Average RI
if (!phy->avg_ri) {
phy->avg_ri = SRSLTE_VEC_EMA(phy->last_ri, phy->avg_ri, 0.1);
} else {
phy->avg_ri = phy->last_ri;
}
phy->avg_snr_db_cqi = 10*log10(phy->avg_rsrp/phy->avg_noise); phy->avg_snr_db_cqi = 10*log10(phy->avg_rsrp/phy->avg_noise);
// Store metrics // Store metrics
@ -1674,6 +1681,7 @@ void phch_worker::update_measurements()
dl_metrics.rssi = phy->avg_rssi_dbm; dl_metrics.rssi = phy->avg_rssi_dbm;
dl_metrics.pathloss = phy->pathloss; dl_metrics.pathloss = phy->pathloss;
dl_metrics.sinr = phy->avg_snr_db_cqi; dl_metrics.sinr = phy->avg_snr_db_cqi;
dl_metrics.ri = phy->avg_ri;
phy->set_dl_metrics(dl_metrics); phy->set_dl_metrics(dl_metrics);
} }

Loading…
Cancel
Save