Put the center_freq and maxDoppler as input of new_channel_desc_scm() function

This commit is contained in:
Roberto Louro Magueta
2022-11-25 11:03:45 +00:00
parent e44a99b3c1
commit 9b04af1b52
13 changed files with 66 additions and 41 deletions
+10 -4
View File
@@ -559,18 +559,20 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
uint8_t nb_rx,
SCM_t channel_model,
double sampling_rate,
uint64_t center_freq,
double channel_bandwidth,
double DS_TDL,
double maxDoppler,
const corr_level_t corr_level,
double forgetting_factor,
int32_t channel_offset,
double path_loss_dB,
float noise_power_dB) {
float noise_power_dB)
{
// To create tables for normal distribution
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
tableNor((long)(t.tv_nsec%INT_MAX));
tableNor((long) (t.tv_nsec % INT_MAX));
channel_desc_t *chan_desc = (channel_desc_t *)calloc(1,sizeof(channel_desc_t));
@@ -587,14 +589,16 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
uint16_t i,j;
double sum_amps;
double aoa,ricean_factor,Td,maxDoppler;
double aoa, ricean_factor, Td;
int channel_length,nb_taps;
struct complexd *R_sqrt_ptr2;
chan_desc->modelid = channel_model;
chan_desc->nb_tx = nb_tx;
chan_desc->nb_rx = nb_rx;
chan_desc->sampling_rate = sampling_rate;
chan_desc->center_freq = center_freq;
chan_desc->channel_bandwidth = channel_bandwidth;
chan_desc->max_Doppler = maxDoppler;
chan_desc->corr_level = corr_level;
chan_desc->forgetting_factor = forgetting_factor;
chan_desc->channel_offset = channel_offset;
@@ -2161,8 +2165,10 @@ int load_channellist(uint8_t nb_tx, uint8_t nb_rx, double sampling_rate, double
nb_rx,
modid,
sampling_rate,
0,
channel_bandwidth,
*(channel_list.paramarray[i][pindex_DT].dblptr),
0.0,
CORR_LEVEL_LOW,
*(channel_list.paramarray[i][pindex_FF].dblptr),
*(channel_list.paramarray[i][pindex_CO].iptr),
+2
View File
@@ -317,8 +317,10 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
uint8_t nb_rx,
SCM_t channel_model,
double sampling_rate,
uint64_t center_freq,
double channel_bandwidth,
double DS_TDL,
double maxDoppler,
const corr_level_t corr_level,
double forgetting_factor,
int32_t channel_offset,