mirror of https://github.com/PentHertz/srsLTE.git
Corrected cell_measurement RSSI/RSRP with USRP RX gain. Added AGC to cell_measurement.
This commit is contained in:
parent
7cfe77e565
commit
2b34a3cb10
|
@ -155,13 +155,21 @@ int main(int argc, char **argv) {
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Opening UHD device...\n");
|
if (prog_args.uhd_gain > 0) {
|
||||||
if (cuhd_open(prog_args.uhd_args, &uhd)) {
|
printf("Opening UHD device...\n");
|
||||||
fprintf(stderr, "Error opening uhd\n");
|
if (cuhd_open(prog_args.uhd_args, &uhd)) {
|
||||||
return -1;
|
fprintf(stderr, "Error opening uhd\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
cuhd_set_rx_gain(uhd, prog_args.uhd_gain);
|
||||||
|
} else {
|
||||||
|
printf("Opening UHD device with threaded RX Gain control ...\n");
|
||||||
|
if (cuhd_open_th(prog_args.uhd_args, &uhd, false)) {
|
||||||
|
fprintf(stderr, "Error opening uhd\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
cuhd_set_rx_gain(uhd, 50);
|
||||||
}
|
}
|
||||||
/* Set receiver gain */
|
|
||||||
cuhd_set_rx_gain(uhd, prog_args.uhd_gain);
|
|
||||||
|
|
||||||
/* set receiver frequency */
|
/* set receiver frequency */
|
||||||
cuhd_set_rx_freq(uhd, (double) prog_args.uhd_freq);
|
cuhd_set_rx_freq(uhd, (double) prog_args.uhd_freq);
|
||||||
|
@ -289,7 +297,12 @@ int main(int argc, char **argv) {
|
||||||
rssi_utra = SRSLTE_VEC_CMA(srslte_chest_dl_get_rssi(&chest),rssi_utra,nframes);
|
rssi_utra = SRSLTE_VEC_CMA(srslte_chest_dl_get_rssi(&chest),rssi_utra,nframes);
|
||||||
rsrq = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrq(&chest),rsrq,0.05);
|
rsrq = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrq(&chest),rsrq,0.05);
|
||||||
rsrp = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrp(&chest),rsrp,0.05);
|
rsrp = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrp(&chest),rsrp,0.05);
|
||||||
snr = SRSLTE_VEC_EMA(srslte_chest_dl_get_noise_estimate(&chest),snr,0.05);
|
snr = SRSLTE_VEC_EMA(srslte_chest_dl_get_snr(&chest),snr,0.05);
|
||||||
|
// Adjust with USRP gain
|
||||||
|
rssi += cuhd_get_rx_gain(uhd);
|
||||||
|
rssi_utra += cuhd_get_rx_gain(uhd);
|
||||||
|
rsrp += cuhd_get_rx_gain(uhd);
|
||||||
|
|
||||||
nframes++;
|
nframes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,16 +122,10 @@ int main(int argc, char **argv) {
|
||||||
for (format=0;format<=SRSLTE_PUCCH_FORMAT_2B;format++) {
|
for (format=0;format<=SRSLTE_PUCCH_FORMAT_2B;format++) {
|
||||||
for (uint32_t d=1;d<=3;d++) {
|
for (uint32_t d=1;d<=3;d++) {
|
||||||
for (uint32_t ncs=0;ncs<8;ncs+=d) {
|
for (uint32_t ncs=0;ncs<8;ncs+=d) {
|
||||||
for (uint32_t n_pucch=1;n_pucch<130;n_pucch++) {
|
for (uint32_t n_pucch=1;n_pucch<130;n_pucch+=50) {
|
||||||
|
|
||||||
format=SRSLTE_PUCCH_FORMAT_2;
|
|
||||||
uint32_t d=2;
|
|
||||||
uint32_t ncs=0;
|
|
||||||
uint32_t n_pucch=0;
|
|
||||||
|
|
||||||
struct timeval t[3];
|
struct timeval t[3];
|
||||||
|
|
||||||
|
|
||||||
pucch_cfg.delta_pucch_shift = d;
|
pucch_cfg.delta_pucch_shift = d;
|
||||||
bool group_hopping_en = false;
|
bool group_hopping_en = false;
|
||||||
pucch_cfg.N_cs = ncs;
|
pucch_cfg.N_cs = ncs;
|
||||||
|
|
Loading…
Reference in New Issue