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

📄 transmitter.h

📁 多用户多载波时频域cdma扩频的仿真
💻 H
字号:
#include <complex>
using namespace std;
class transmitter
{public:
  int numberofuserbit;                          //信息码的码元个数
  int numberofuser;                             //用户数
  int Tc;                                       //扩频码的间隔时间
  int Tb ;                                      //信息码的间隔时间
  int Tspreadfactor ;                          //时域扩频因子
  int Fspreadfactor ;                          //频域扩频因子
  int Numberofshiftingregister ;                   // m序列产生器的移位寄存器的个数
  int NPointOfFFT  ;                            //要计算的FFT的点数
  void StartFdomaintransmit ( );//执行信息码频域扩频的传送过程
  void StartTdomaintransmit ( );//执行信息码频域扩频的传送过程
  double **IFFTrealout;                            //进行IFFT变换后序列的实部
  double **IFFTimagout;                            //进行IFFT变换后序列的虚部
 int **Userbit;                        //用户的信息码
  double **Allocate2DArray( unsigned int, unsigned int );  //动态分配二维数组double
void DeAllocate2DArray(double **,unsigned int);// 释放动态分配的二维数组double
int **intAllocate2DArray(unsigned int,unsigned int );  //动态分配二维数组int
void intDeAllocate2DArray( int **,unsigned int);// 释放动态分配的二维数组int
protected:

   private:
  int **Mseq  ;                          //扩频码
   int **Walsh ;                          //Walsh扩频码  
  double **SpreadOut ;                         //扩频后的信息码
double **TSpreadOutReal ;                         //时域扩频后的I支路的信息码
double **TSpreadOutImag ;                         //时域扩频后的Q支路的信息码
double **FSpreadOutReal ;                         //频域扩频后的I支路的信息码
double **FSpreadOutImag ;                         //频域扩频后的Q支路的信息码
  //int *DSSpreadOut ;                         //ds-cdma扩频后的信息码
  double **Ireal;                                  //进行调制后的序列的实部
  double **Qimag;                                 //进行调制后的序列的虚部

  void random(int,int);
  void M_seq(int );                            //产生扩频码
  void T_domainSpread( int,double * ,int );           //进行时域扩频
  void F_domainSpread( int,double *,int );         //进行频域扩频
  void QPSK(int,int**);                         //进行qpsk调制
  void FFT(complex<double> * ,complex<double> * ,int,int);                           //进行FFT变换和逆变换
  void walsh_gen(int ,int ) ;    //产生Walsh码
  //int num;
  //char name[20]; 
  //char sex;
};

⌨️ 快捷键说明

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