diff --git a/openair1/SIMULATION/TOOLS/multipath_channel.c b/openair1/SIMULATION/TOOLS/multipath_channel.c index 55bc8d70b8..41b756b54d 100644 --- a/openair1/SIMULATION/TOOLS/multipath_channel.c +++ b/openair1/SIMULATION/TOOLS/multipath_channel.c @@ -55,12 +55,12 @@ void __attribute__ ((no_sanitize_address)) multipath_channel(channel_desc_t *des tx128_re, tx128_im, ch128_x, ch128_y, pathloss128; double path_loss = pow(10,desc->path_loss_dB/20); - int dd = abs(desc->channel_offset); + uint64_t dd = desc->channel_offset; pathloss128 = simde_mm_set1_pd(path_loss); #ifdef DEBUG_CH - printf("[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %d, len %d \n",keep_channel,path_loss,desc->path_loss_dB,desc->nb_rx,desc->nb_tx,dd,desc->channel_length); + printf("[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %lu, len %d \n",keep_channel,path_loss,desc->path_loss_dB,desc->nb_rx,desc->nb_tx,dd,desc->channel_length); #endif if (keep_channel) { @@ -184,11 +184,10 @@ void __attribute__ ((no_sanitize_address)) multipath_channel(channel_desc_t *des { double path_loss = pow(10,desc->path_loss_dB/20); - int dd; - dd = abs(desc->channel_offset); + uint64_t dd = desc->channel_offset; #ifdef DEBUG_CH - printf("[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %d, len %d \n", + printf("[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %lu, len %d \n", keep_channel, path_loss, desc->path_loss_dB, desc->nb_rx, desc->nb_tx, dd, desc->channel_length); #endif diff --git a/openair1/SIMULATION/TOOLS/multipath_tv_channel.c b/openair1/SIMULATION/TOOLS/multipath_tv_channel.c index ece1f81335..a9967a6eaf 100644 --- a/openair1/SIMULATION/TOOLS/multipath_tv_channel.c +++ b/openair1/SIMULATION/TOOLS/multipath_tv_channel.c @@ -29,7 +29,7 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length); double frand_a_b(double a, double b); -void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, int delay); +void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, uint64_t delay); void multipath_tv_channel(channel_desc_t *desc, double **tx_sig_re, @@ -42,10 +42,10 @@ void multipath_tv_channel(channel_desc_t *desc, double complex **tx,**rx,***H_t; double path_loss = pow(10,desc->path_loss_dB/20); - int i,j,dd; - dd = abs(desc->channel_offset); + int i,j; + uint64_t dd = desc->channel_offset; #ifdef DEBUG_CH - printf("[TV CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %d, len %d max_doppler %g\n",keep_channel,path_loss,desc->path_loss_dB,desc->nb_rx,desc->nb_tx,dd,desc->channel_length, + printf("[TV CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %lu, len %d max_doppler %g\n",keep_channel,path_loss,desc->path_loss_dB,desc->nb_rx,desc->nb_tx,dd,desc->channel_length, desc->max_Doppler); #endif tx = (double complex **)malloc(desc->nb_tx*sizeof(double complex *)); @@ -190,7 +190,7 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){ } // time varying convolution -void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, int dd) +void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, uint64_t dd) { for(int i = 0; i < ((int)nb_samples-dd); i++) { for(int j = 0; j < nb_taps; j++) { diff --git a/radio/rfsimulator/apply_channelmod.c b/radio/rfsimulator/apply_channelmod.c index 18ab7e29e9..917a22924c 100644 --- a/radio/rfsimulator/apply_channelmod.c +++ b/radio/rfsimulator/apply_channelmod.c @@ -68,7 +68,7 @@ void rxAddInput( const c16_t *input_sig, // Energy in one sample to calibrate input noise // the normalized OAI value seems to be 256 as average amplitude (numerical amplification = 1) const double noise_per_sample = pow(10,channelDesc->noise_power_dB/10.0) * 256; - const int dd = abs(channelDesc->channel_offset); + const uint64_t dd = channelDesc->channel_offset; const int nbTx=channelDesc->nb_tx; for (int i=0; i