Commit 7ea60872 authored by Bo Zhao's avatar Bo Zhao Committed by cig

Extend the length of the channel processing to 32 bits

parent ac122452
......@@ -27,18 +27,20 @@
#include "SIMULATION/RF/rf.h"
#include <complex.h>
void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length);
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, uint16_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, int delay);
void multipath_tv_channel(channel_desc_t *desc,
double **tx_sig_re,
double **tx_sig_im,
double **rx_sig_re,
double **rx_sig_im,
uint16_t length,
uint8_t keep_channel) {
double complex **tx,**rx,* **H_t,*rx_temp; //, *tv_H_t;
uint32_t length,
uint8_t keep_channel)
{
double complex **tx,**rx,***H_t,*rx_temp;//, *tv_H_t;
double path_loss = pow(10,desc->path_loss_dB/20);
int i,j,k,dd;
dd = abs(desc->channel_offset);
......@@ -126,7 +128,8 @@ void multipath_tv_channel(channel_desc_t *desc,
}
//TODO: make phi_rad a parameter of this function
void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length) {
void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){
int i,j,p,l,k;
double *alpha,*phi_rad,pi=acos(-1),*w_Hz;
alpha = (double *)calloc(desc->nb_paths,sizeof(double));
......@@ -193,7 +196,8 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length) {
}
// time varying convolution
void tv_conv(double complex **h, double complex *x, double complex *y, uint16_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, int dd){
int i,j;
for(i=0; i<((int)nb_samples-dd); i++) {
......
......@@ -426,7 +426,7 @@ void multipath_tv_channel(channel_desc_t *desc,
double **tx_sig_im,
double **rx_sig_re,
double **rx_sig_im,
uint16_t length,
uint32_t length,
uint8_t keep_channel);
/**@} */
......
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