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

📄 phase_drift.c

📁 This model is just testing an idea of MIMO, which IEEE802.11n will have. But I havo not seen the s
💻 C
字号:
/*****************************************************************************//*   FIle Name : phase_drift.c                                               *//*   Description : WLAN OFDM correct phase_drift error in time domain        *//*                 phase & amount : radian                                   *//*   author : miffie                                                         *//*   Date   : aug/17/05                                                      *//*   Copyright (c) 2005 miffie   All rights reserved.                          *//*****************************************************************************/struct complexset phase_drift (struct complexset datain,                           double *phase, double *amount ) {int 	ii ;char 	shifter ;double 	accumulator ;struct 	complexset cset ;struct  complex  *top ;struct	complex tmp1 ;double  angle ;  //Main     if ((top = (struct complex *)malloc(datain.size*sizeof(struct complex)) ) == NULL) {        PRINTF( " malloc failed in phase_drift.c\n") ;    } //fail    else { //allocated     PRINTF("phase_drift size=%d phase=%6.3f amount=%8.5f\n", datain.size,                                  *phase, *amount ) ;     accumulator = *phase ;     for(ii=0;ii<datain.size;ii++) { //each sample         tmp1.realp = cos(accumulator) ;         tmp1.image = sin(accumulator) ;         top[ ii ] = multiply_complex(datain.data[ii], tmp1 ) ;         accumulator += *amount ;     } //each sample     cset.size = datain.size ;     cset.data = top ;    }//allocated    *phase = accumulator ;    free ( datain.data ) ;    return ( cset ) ;} //phase_drift

⌨️ 快捷键说明

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