From 16454f5eb17cbe34685089a618c9b7818f5f27cb Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 31 Aug 2016 16:58:39 +0200 Subject: [PATCH] Added guard carriers to pdsch_ue plot --- srslte/examples/pdsch_ue.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/srslte/examples/pdsch_ue.c b/srslte/examples/pdsch_ue.c index 100123fde..8b6cf53a6 100644 --- a/srslte/examples/pdsch_ue.c +++ b/srslte/examples/pdsch_ue.c @@ -702,14 +702,16 @@ void *plot_thread_run(void *arg) { tmp_plot[i] = -80; } } + int sz = srslte_symbol_sz(ue_dl.cell.nof_prb); + bzero(tmp_plot2, sizeof(float)*sz); + int g = (sz - 12*ue_dl.cell.nof_prb)/2; for (i = 0; i < 12*ue_dl.cell.nof_prb; i++) { - tmp_plot2[i] = 20 * log10f(cabsf(ue_dl.ce[0][i])); - if (isinf(tmp_plot2[i])) { - tmp_plot2[i] = -80; + tmp_plot2[g+i] = 20 * log10(cabs(ue_dl.ce[0][i])); + if (isinf(tmp_plot2[g+i])) { + tmp_plot2[g+i] = -80; } } - - plot_real_setNewData(&pce, tmp_plot2, i); + plot_real_setNewData(&pce, tmp_plot2, sz); if (!prog_args.input_file_name) { if (plot_track) {