diff --git a/openair1/SIMULATION/TOOLS/abstraction.c b/openair1/SIMULATION/TOOLS/abstraction.c index 08a0d6c06ab536988b860662927af791771edd13..5d06f7c638c8f77fc3be49467fe98b064410446f 100644 --- a/openair1/SIMULATION/TOOLS/abstraction.c +++ b/openair1/SIMULATION/TOOLS/abstraction.c @@ -340,7 +340,7 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) { if (desc->nb_taps==1) delay = desc->delays[l]; else - delay = desc->delays[l]+NB_SAMPLES_CHANNEL_OFFSET/desc->BW; + delay = desc->delays[l]+NB_SAMPLES_CHANNEL_OFFSET/desc->sampling_rate; desc->chF[aarx+(aatx*desc->nb_rx)][f+n_samples/2].x+=(desc->a[l][aarx+(aatx*desc->nb_rx)].x*cos(2*M_PI*freq*delay)+ desc->a[l][aarx+(aatx*desc->nb_rx)].y*sin(2*M_PI*freq*delay)); desc->chF[aarx+(aatx*desc->nb_rx)][f+n_samples/2].y+=(-desc->a[l][aarx+(aatx*desc->nb_rx)].x*sin(2*M_PI*freq*delay)+ diff --git a/openair1/SIMULATION/TOOLS/random_channel.c b/openair1/SIMULATION/TOOLS/random_channel.c index 6c3116001bf482bfa75f4ac03cbe8ed333c34766..856367eff3cf3e994dde957b70d56b83e4a733b9 100644 --- a/openair1/SIMULATION/TOOLS/random_channel.c +++ b/openair1/SIMULATION/TOOLS/random_channel.c @@ -81,23 +81,22 @@ void fill_channel_desc(channel_desc_t *chan_desc, chan_desc->delays[i] = ((double)i)*delta_tau; } else - chan_desc->delays = delays; - - chan_desc->Td = Td; - chan_desc->sampling_rate = sampling_rate; - chan_desc->channel_bandwidth = channel_bandwidth; - chan_desc->ricean_factor = ricean_factor; - chan_desc->aoa = aoa; - chan_desc->random_aoa = random_aoa; - chan_desc->forgetting_factor = forgetting_factor; - chan_desc->channel_offset = channel_offset; - chan_desc->path_loss_dB = path_loss_dB; - chan_desc->first_run = 1; - chan_desc->ip = 0.0; - chan_desc->max_Doppler = max_Doppler; - chan_desc->ch = (struct complex**) malloc(nb_tx*nb_rx*sizeof(struct complex*)); - chan_desc->chF = (struct complex**) malloc(nb_tx*nb_rx*sizeof(struct complex*)); - chan_desc->a = (struct complex**) malloc(nb_taps*sizeof(struct complex*)); + chan_desc->delays = delays; + chan_desc->Td = Td; + chan_desc->sampling_rate = sampling_rate; + chan_desc->channel_bandwidth = channel_bandwidth; + chan_desc->ricean_factor = ricean_factor; + chan_desc->aoa = aoa; + chan_desc->random_aoa = random_aoa; + chan_desc->forgetting_factor = forgetting_factor; + chan_desc->channel_offset = channel_offset; + chan_desc->path_loss_dB = path_loss_dB; + chan_desc->first_run = 1; + chan_desc->ip = 0.0; + chan_desc->max_Doppler = max_Doppler; + chan_desc->ch = (struct complex**) malloc(nb_tx*nb_rx*sizeof(struct complex*)); + chan_desc->chF = (struct complex**) malloc(nb_tx*nb_rx*sizeof(struct complex*)); + chan_desc->a = (struct complex**) malloc(nb_taps*sizeof(struct complex*)); LOG_D(OCM,"[CHANNEL] Filling ch \n"); @@ -548,7 +547,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -575,7 +574,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -602,7 +601,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -629,7 +628,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -665,7 +664,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -701,7 +700,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -728,7 +727,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -755,7 +754,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -784,7 +783,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -822,7 +821,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -858,7 +857,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -892,7 +891,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -926,7 +925,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -960,7 +959,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -997,7 +996,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -1032,7 +1031,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, R_sqrt_ptr2, Td, sampling_rate, - BW, + channel_bandwidth, ricean_factor, aoa, forgetting_factor,