diff --git a/lib/examples/pdsch_ue.c b/lib/examples/pdsch_ue.c index 33af4f8b2..e5acb4b51 100644 --- a/lib/examples/pdsch_ue.c +++ b/lib/examples/pdsch_ue.c @@ -1061,7 +1061,7 @@ void *plot_thread_run(void *arg) { 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[g + i] = srslte_convert_amplitude_to_dB(cabs(ue_dl.chest_res.ce[0][0][i])); + tmp_plot2[g + i] = srslte_convert_amplitude_to_dB(cabsf(ue_dl.chest_res.ce[0][0][i])); if (isinf(tmp_plot2[g + i])) { tmp_plot2[g + i] = -80; } diff --git a/lib/src/phy/ch_estimation/chest_dl.c b/lib/src/phy/ch_estimation/chest_dl.c index 38e73b656..028bfb1cf 100644 --- a/lib/src/phy/ch_estimation/chest_dl.c +++ b/lib/src/phy/ch_estimation/chest_dl.c @@ -704,7 +704,7 @@ static int estimate_port(srslte_chest_dl_t* q, /* Compute RSRP for the channel estimates in this port */ if (cfg->rsrp_neighbour) { - double energy = cabs(srslte_vec_acc_cc(q->pilot_estimates, npilots)/npilots); + double energy = cabsf(srslte_vec_acc_cc(q->pilot_estimates, npilots) / npilots); q->rsrp_corr[rxant_id][port_id] = energy * energy; } q->rsrp[rxant_id][port_id] = srslte_vec_avg_power_cf(q->pilot_recv_signal, npilots); diff --git a/lib/src/phy/mimo/precoding.c b/lib/src/phy/mimo/precoding.c index b9bbcd109..1b3a45dab 100644 --- a/lib/src/phy/mimo/precoding.c +++ b/lib/src/phy/mimo/precoding.c @@ -130,8 +130,8 @@ int srslte_predecoding_single_sse(cf_t *y[SRSLTE_MAX_PORTS], cf_t *h[SRSLTE_MAX_ cf_t r = 0; cf_t hh = 0; for (int p=0;pe) { free(q->e); } if (q->d) { free(q->d); } - for (i = 0; i < SRSLTE_MAX_PORTS; i++) { + for (uint32_t i = 0; i < SRSLTE_MAX_PORTS; i++) { if (q->x[i]) { free(q->x[i]); } - for (int j=0;jnof_rx_antennas;j++) { + for (uint32_t j = 0; j < q->nof_rx_antennas; j++) { if (q->ce[i][j]) { free(q->ce[i][j]); } } } - for (i=0;inof_rx_antennas;i++) { + for (uint32_t i = 0; i < q->nof_rx_antennas; i++) { if (q->symbols[i]) { free(q->symbols[i]); } } if (q->seqs) { - for (i=0; iseqs[i]) { srslte_pmch_free_area_id(q, i); } } free(q->seqs); } - for (i = 0; i < 4; i++) { + for (uint32_t i = 0; i < 4; i++) { srslte_modem_table_free(&q->mod[i]); } diff --git a/lib/src/phy/sync/pss.c b/lib/src/phy/sync/pss.c index 8ace73fb1..307b357e4 100644 --- a/lib/src/phy/sync/pss.c +++ b/lib/src/phy/sync/pss.c @@ -616,6 +616,6 @@ float srslte_pss_cfo_compute(srslte_pss_t* q, const cf_t *pss_recv) { y0 = srslte_vec_dot_prod_ccc(q->pss_signal_time[q->N_id_2], pss_ptr, q->fft_size/2); y1 = srslte_vec_dot_prod_ccc(&q->pss_signal_time[q->N_id_2][q->fft_size/2], &pss_ptr[q->fft_size/2], q->fft_size/2); - return carg(conjf(y0) * y1)/M_PI; + return cargf(conjf(y0) * y1) / M_PI; } diff --git a/lib/src/phy/sync/sync.c b/lib/src/phy/sync/sync.c index 56a56bbb3..6c5a63cee 100644 --- a/lib/src/phy/sync/sync.c +++ b/lib/src/phy/sync/sync.c @@ -574,7 +574,7 @@ static float cfo_cp_estimate(srslte_sync_t *q, const cf_t *input) uint32_t cp_offset = 0; cp_offset = srslte_cp_synch(&q->cp_synch, input, q->max_offset, q->cfo_cp_nsymbols, SRSLTE_CP_LEN_NORM(1,q->fft_size)); cf_t cp_corr_max = srslte_cp_synch_corr_output(&q->cp_synch, cp_offset); - float cfo = -carg(cp_corr_max) / M_PI / 2; + float cfo = -cargf(cp_corr_max) / M_PI / 2; return cfo; } diff --git a/lib/src/phy/sync/sync_nbiot.c b/lib/src/phy/sync/sync_nbiot.c index a4d28028a..e37bc024c 100644 --- a/lib/src/phy/sync/sync_nbiot.c +++ b/lib/src/phy/sync/sync_nbiot.c @@ -260,7 +260,7 @@ float cfo_estimate_nbiot(srslte_sync_nbiot_t* q, cf_t* input) cp_offset = srslte_cp_synch(&q->cp_synch, input, q->max_offset, SRSLTE_NPSS_CFO_NUM_SYMS, SRSLTE_CP_LEN_NORM(1, q->fft_size)); cf_t cp_corr_max = srslte_cp_synch_corr_output(&q->cp_synch, cp_offset); - float cfo = -carg(cp_corr_max) / M_PI / 2; + float cfo = -cargf(cp_corr_max) / M_PI / 2; return cfo; }