Commit e3fa2192 authored by Sagar Parsawar's avatar Sagar Parsawar

Merge confict

parents d42fa410 4d18f561
...@@ -154,6 +154,7 @@ int main(int argc, char **argv) ...@@ -154,6 +154,7 @@ int main(int argc, char **argv)
int **txdata; int **txdata;
double **s_re,**s_im,**r_re,**r_im; double **s_re,**s_im,**r_re,**r_im;
//double iqim = 0.0; //double iqim = 0.0;
double DS_TDL = .03;
double ip =0.0; double ip =0.0;
//unsigned char pbch_pdu[6]; //unsigned char pbch_pdu[6];
// int sync_pos, sync_pos_slot; // int sync_pos, sync_pos_slot;
...@@ -257,6 +258,21 @@ int main(int argc, char **argv) ...@@ -257,6 +258,21 @@ int main(int argc, char **argv)
channel_model=ETU; channel_model=ETU;
break; break;
case 'H':
channel_model = TDL_C;
DS_TDL = .030; // 30 ns
break;
case 'I':
channel_model = TDL_C;
DS_TDL = .3; // 300ns
break;
case 'J':
channel_model=TDL_D;
DS_TDL = .03;
break;
default: default:
printf("Unsupported channel model! Exiting.\n"); printf("Unsupported channel model! Exiting.\n");
exit(-1); exit(-1);
...@@ -505,10 +521,8 @@ int main(int argc, char **argv) ...@@ -505,10 +521,8 @@ int main(int argc, char **argv)
channel_model, channel_model,
fs, fs,
bw, bw,
300e-9, DS_TDL,
0, 0, 0, 0, 0);
0,
0, 0);
if (gNB2UE==NULL) { if (gNB2UE==NULL) {
printf("Problem generating channel model. Exiting.\n"); printf("Problem generating channel model. Exiting.\n");
...@@ -656,8 +670,8 @@ int main(int argc, char **argv) ...@@ -656,8 +670,8 @@ int main(int argc, char **argv)
for (i=0; i<frame_length_complex_samples; i++) { for (i=0; i<frame_length_complex_samples; i++) {
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
r_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]); s_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
r_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]); s_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
} }
} }
...@@ -667,8 +681,17 @@ int main(int argc, char **argv) ...@@ -667,8 +681,17 @@ int main(int argc, char **argv)
n_errors_payload = 0; n_errors_payload = 0;
for (trial=0; trial<n_trials; trial++) { for (trial=0; trial<n_trials; trial++) {
if (channel_model != AWGN) {
// multipath channel // multipath channel
//multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0); multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0,0);
}
else {
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
memcpy(r_re[aa],s_re[aa],frame_length_complex_samples*sizeof(double));
memcpy(r_im[aa],s_im[aa],frame_length_complex_samples*sizeof(double));
}
}
//AWGN //AWGN
sigma2_dB = 20*log10((double)AMP/4)-SNR; sigma2_dB = 20*log10((double)AMP/4)-SNR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment