small update to decimation logic

master
yagoda 8 years ago
parent ae94416395
commit 93acc2e708

@ -417,8 +417,17 @@ int main(int argc, char **argv) {
} else {
#ifndef DISABLE_RF
if(!prog_args.decimate)
if(prog_args.decimate)
{
if(prog_args.decimate > 4 || prog_args.decimate < 0)
{
printf("Invalid decimation factor, setting to 1 \n");
}
else
{
ue_sync.decimate = prog_args.decimate;
}
}
if (srslte_ue_sync_init_multi(&ue_sync, cell, srslte_rf_recv_wrapper, prog_args.rf_nof_rx_ant, (void*) &rf)) {
fprintf(stderr, "Error initiating ue_sync\n");
exit(-1);

@ -119,10 +119,11 @@ int srslte_pss_synch_init_fft_offset(srslte_pss_synch_t *q, uint32_t frame_size,
srslte_filt_decim_cc_init(&q->filter,q->decimate,filter_order);
q->filter.filter_output = srslte_vec_malloc((buffer_size) * sizeof(cf_t));
q->filter.downsampled_input = srslte_vec_malloc((buffer_size + filter_order) * sizeof(cf_t));
printf("decimation for the PSS search is %d \n",q->decimate);
}
printf("decimation in the PSS is %d \n",q->decimate);
if (srslte_dft_plan(&q->dftp_input, fft_size, SRSLTE_DFT_FORWARD, SRSLTE_DFT_COMPLEX)) {

@ -106,7 +106,6 @@ int srslte_sync_init(srslte_sync_t *q, uint32_t frame_size, uint32_t max_offset,
}
srslte_sync_set_cp(q, SRSLTE_CP_NORM);
if(!decimate)
decimate = 1;

@ -170,7 +170,7 @@ int srslte_ue_sync_init_multi(srslte_ue_sync_t *q,
q->frame_len = q->nof_recv_sf*q->sf_len;
if(q->fft_size > 1000 && q->decimate)
if(q->fft_size > 700 && q->decimate)
{
q->sfind.decimate = q->decimate;
}

Loading…
Cancel
Save