cgsfilt.h

来自「ofdm的完整系统模型,包含信道参数,多径模型,doppler频移等都可以自由修」· C头文件 代码 · 共 51 行

H
51
字号
#ifndef CGSFILT_H
#define CGSFILT_H


/*
 *  Filter transform types
 */
#define LOWPASS		1
#define HIGHPASS	2
#define BANDPASS	3
#define BANDSTOP	4

/*
 *  Maximum filter orders
 */
#define MAXORDER		100    /*  All types other than bessel */

#define MAX_BESSEL_ORDER	20	/*  Bessel filter max order     */
#define MAX_BESSEL_BP_ORDER     40

/*
 *  Structure to hold parameters for the filter generator
 */
typedef struct {
	int			order;		/*  Filter order	      	*/
	int			xformtype;  	/*  One of the above defines  	*/
	double	fstop;		/*  Stop band edge		*/
	double	fpass;		/*  Passband edge		*/
	double	fcenter;	/*  Center frequency		*/
	double	fsamp;		/*  Sampling frequency		*/
	double	passatten;	/*  Passband attenuations	*/
} filtGen;

/*
 *  Functions
 */
int	filtGenButterworth(filtGen *sp_spec, double *dp_gain, Ovector sp_a, Ovector sp_b);
int	filtGenBessel(filtGen *sp_spec, double *dp_gain, Ovector sp_a, Ovector sp_b);
int	filtGenChebychev1(filtGen *sp_spec, double *dp_gain, Ovector sp_a, Ovector sp_b);
int	filtGenChebychev2(filtGen *sp_spec, double *dp_gain, Ovector sp_a, Ovector sp_b);
int	filtGenElliptic(filtGen *sp_spec, double *dp_gain, Ovector sp_a, Ovector sp_b);
void	filtGenSetCoefs(Ovector, Ovector);

//copy from cgs.h
void filtGenWSincLpf(Ovector sp_wghts, double d_freq, double d_gain);
int  filtGen_Bilinear(int i_npoles, void *sp_poles, int i_nzeros, void *sp_zeros);
void filtGen_GetGain(int i_numsec, double d_freq, double *dp_a,  double *dp_b, double *dp_gain);
void filtGen_GetPolys(int i_order, void *sp_poles, void *sp_zeros, double *dp_a, double *dp_b);

#endif

⌨️ 快捷键说明

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