Add rx_gain_offset interface for RSRP calibration

master
Ismael Gomez 7 years ago
parent 3a005af9f5
commit 56df710d1f

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

@ -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), 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") "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), bpo::value<float>(&args->expert.phy.prach_gain)->default_value(-1.0),
"Disable PRACH power control") "Disable PRACH power control")

@ -675,7 +675,7 @@ void phch_recv::run_thread()
case 1: case 1:
if (last_worker) { 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), srslte_ue_sync_get_cfo(&ue_sync),
15000*last_worker->get_ref_cfo(), 15000*last_worker->get_ref_cfo(),
15000*ue_sync.strack.cfo_pss_mean, 15000*ue_sync.strack.cfo_pss_mean,

@ -1386,7 +1386,7 @@ void phch_worker::update_measurements()
phy->last_radio_rssi = phy->get_radio()->get_rssi(); phy->last_radio_rssi = phy->get_radio()->get_rssi();
phy->rx_gain_offset = phy->avg_rssi_dbm - phy->last_radio_rssi + 30; phy->rx_gain_offset = phy->avg_rssi_dbm - phy->last_radio_rssi + 30;
} else { } 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++; rssi_read_cnt++;

Loading…
Cancel
Save