⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fft.h

📁 ofdm的完整系统模型,包含信道参数,多径模型,doppler频移等都可以自由修改!是您做仿真的有力帮助.c语言运行速度快!
💻 H
字号:
#ifndef	_FFT_H
#define	_FFT_H

#ifndef PI
#define PI 3.141592653589793
#endif
#ifndef PI2
#define PI2 6.283185307179586
#endif

/*define*/
#define  maxPrimeFactor        37
#define  maxPrimeFactorDiv2    (maxPrimeFactor+1)/2
#define  maxFactorCount        20

/*static*/
static double  c3_1 = -1.5000000000000E+00;  /*  c3_1 = cos(2*pi/3)-1;          */
static double  c3_2 =  8.6602540378444E-01;  /*  c3_2 = sin(2*pi/3);            */
                                          
static double  u5   =  1.2566370614359E+00;  /*  u5   = 2*pi/5;                 */
static double  c5_1 = -1.2500000000000E+00;  /*  c5_1 = (cos(u5)+cos(2*u5))/2-1;*/
static double  c5_2 =  5.5901699437495E-01;  /*  c5_2 = (cos(u5)-cos(2*u5))/2;  */
static double  c5_3 = -9.5105651629515E-01;  /*  c5_3 = -sin(u5);               */
static double  c5_4 = -1.5388417685876E+00;  /*  c5_4 = -(sin(u5)+sin(2*u5));   */
static double  c5_5 =  3.6327126400268E-01;  /*  c5_5 = (sin(u5)-sin(2*u5));    */
static double  c8   =  7.0710678118655E-01;  /*  c8 = 1/sqrt(2);    */


int      groupOffset,dataOffset,blockOffset,adr;
int      groupNo,dataNo,blockNo,twNo;
double   omega, tw_re,tw_im;
double   twiddleRe[maxPrimeFactor], twiddleIm[maxPrimeFactor],
         trigRe[maxPrimeFactor], trigIm[maxPrimeFactor],
         zRe[maxPrimeFactor], zIm[maxPrimeFactor];
double   vRe[maxPrimeFactorDiv2], vIm[maxPrimeFactorDiv2];
double   wRe[maxPrimeFactorDiv2], wIm[maxPrimeFactorDiv2];

/*function*/
void 	factorize(int, int*, int*);
int 	transTableSetup(int*, int*, int*, int*,int*);
void 	permute(int, int,int* ,int* ,double* , double* ,double* , double* );
void 	initTrig(int);
void 	fft_4(double*, double*);
void 	fft_5(double*, double*);
void 	fft_8();
void 	fft_10();
void 	fft_odd(int);
void 	twiddleTransf(int, int, int, double*, double*);
int 	fft(int, double*, double*, double*, double*);
int 	ifft(int, double*, double*, double*, double*);

extern 	FILE	*fp_error;


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -