Add rx_gain_offset interface for RSRP calibration

This commit is contained in:
Ismael Gomez 2018-02-21 11:51:55 +01:00
parent 3a005af9f5
commit 56df710d1f
4 changed files with 8 additions and 3 deletions

View File

@ -492,6 +492,7 @@ typedef struct {
float estimator_fil_w;
bool rssi_sensor_enabled;
bool sic_pss_enabled;
float rx_gain_offset;
} phy_args_t;

View File

@ -162,7 +162,11 @@ void parse_args(all_args_t *args, int argc, char *argv[]) {
bpo::value<bool>(&args->expert.phy.rssi_sensor_enabled)->default_value(true),
"Enable or disable RF frontend RSSI sensor. In some USRP devices can cause segmentation fault")
("expert.prach_gain",
("expert.rx_gain_offset",
bpo::value<float>(&args->expert.phy.rx_gain_offset)->default_value(10),
"RX Gain offset to add to rx_gain to correct RSRP value")
("expert.prach_gain",
bpo::value<float>(&args->expert.phy.prach_gain)->default_value(-1.0),
"Disable PRACH power control")

View File

@ -675,7 +675,7 @@ void phch_recv::run_thread()
case 1:
if (last_worker) {
Info("SF: cfo_tot=%7.1f Hz, ref=%f Hz, pss=%f Hz, snr_sf=%.2f dB, rsrp=%.2f dB, noise=%.2f dB\n",
Debug("SF: cfo_tot=%7.1f Hz, ref=%f Hz, pss=%f Hz, snr_sf=%.2f dB, rsrp=%.2f dB, noise=%.2f dB\n",
srslte_ue_sync_get_cfo(&ue_sync),
15000*last_worker->get_ref_cfo(),
15000*ue_sync.strack.cfo_pss_mean,

View File

@ -1386,7 +1386,7 @@ void phch_worker::update_measurements()
phy->last_radio_rssi = phy->get_radio()->get_rssi();
phy->rx_gain_offset = phy->avg_rssi_dbm - phy->last_radio_rssi + 30;
} else {
phy->rx_gain_offset = phy->get_radio()->get_rx_gain();
phy->rx_gain_offset = phy->get_radio()->get_rx_gain() + phy->args->rx_gain_offset;
}
}
rssi_read_cnt++;