adding RI to DL metrics

This commit is contained in:
Andre Puschmann 2019-01-03 20:33:53 +01:00
parent 53850e5353
commit d34ecaaa5e
4 changed files with 11 additions and 0 deletions

View File

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

View File

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

View File

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

View File

@ -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);
// Store metrics
@ -1674,6 +1681,7 @@ void phch_worker::update_measurements()
dl_metrics.rssi = phy->avg_rssi_dbm;
dl_metrics.pathloss = phy->pathloss;
dl_metrics.sinr = phy->avg_snr_db_cqi;
dl_metrics.ri = phy->avg_ri;
phy->set_dl_metrics(dl_metrics);
}