diff --git a/lte/examples/pdsch_ue.c b/lte/examples/pdsch_ue.c index 11940e9ab..ba4c822d7 100644 --- a/lte/examples/pdsch_ue.c +++ b/lte/examples/pdsch_ue.c @@ -424,6 +424,7 @@ int main(int argc, char **argv) { rsrp = 0; } +#ifdef adjust_estimator /* Adjust channel estimator based on SNR */ if (10*log10(snr) < 5.0) { float f_low_snr[5]={0.05, 0.15, 0.6, 0.15, 0.05}; @@ -435,7 +436,7 @@ int main(int argc, char **argv) { float f_high_snr[3]={0.05, 0.9, 0.05}; chest_dl_set_filter_freq(&ue_dl.chest, f_high_snr, 3); } - +#endif } if (ue_sync_get_sfidx(&ue_sync) != 5 && ue_sync_get_sfidx(&ue_sync) != 0) { diff --git a/lte/phy/lib/ch_estimation/src/chest_dl.c b/lte/phy/lib/ch_estimation/src/chest_dl.c index bfc313040..9f66bbac6 100644 --- a/lte/phy/lib/ch_estimation/src/chest_dl.c +++ b/lte/phy/lib/ch_estimation/src/chest_dl.c @@ -63,7 +63,7 @@ int chest_dl_init(chest_dl_t *q, lte_cell_t cell) { bzero(q, sizeof(chest_dl_t)); - ret = refsignal_cs_init(&q->csr_signal, cell); + ret = refsignal_cs_generate(&q->csr_signal, cell); if (ret != LIBLTE_SUCCESS) { fprintf(stderr, "Error initializing CSR signal (%d)\n",ret); goto clean_exit; @@ -117,13 +117,13 @@ int chest_dl_init(chest_dl_t *q, lte_cell_t cell) } /* Set default time/freq filters */ - float f[3]={0.1, 0.8, 0.1}; + float f[3]={0.15, 0.7, 0.15}; chest_dl_set_filter_freq(q, f, 3); //float f[5]={0.05, 0.15, 0.6, 0.15, 0.05}; //chest_dl_set_filter_freq(q, f, 5); - float t[2]={0.1, 0.9}; + float t[2]={0.2, 0.8}; chest_dl_set_filter_time(q, t, 2); q->cell = cell; @@ -285,9 +285,9 @@ static void interpolate_pilots(chest_dl_t *q, cf_t *ce, uint32_t port_id) /* Interpolate in the frequency domain */ for (l=0;lcell, l, port_id, 0); + uint32_t fidx_offset = refsignal_fidx(q->cell, l, port_id, 0); interp_linear_offset(&q->interp_lin, &pilot_avg(0), - &ce[refsignal_cs_nsymbol(l,q->cell.cp, port_id) * q->cell.nof_prb * RE_X_RB], + &ce[refsignal_nsymbol(l,q->cell.cp, port_id) * q->cell.nof_prb * RE_X_RB], fidx_offset, RE_X_RB/2-fidx_offset); } @@ -323,7 +323,7 @@ float chest_dl_rssi(chest_dl_t *q, cf_t *input, uint32_t port_id) { float rssi = 0; uint32_t nsymbols = refsignal_cs_nof_symbols(port_id); for (l=0;lcell.cp, port_id) * q->cell.nof_prb * RE_X_RB]; + cf_t *tmp = &input[refsignal_nsymbol(l, q->cell.cp, port_id) * q->cell.nof_prb * RE_X_RB]; rssi += vec_dot_prod_conj_ccc(tmp, tmp, q->cell.nof_prb * RE_X_RB); } return rssi/nsymbols;