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

📄 function.h

📁 应用于无线通信的OFDM解调和RS解码源程序。64点FFT
💻 H
字号:
/* FFT function:
 * Real[] is the real part of complex input/output data;
 * Imag[] is the imaginary part of complex input/output data;
 * FFTSize is the data length equal to 2^M;
 * Sign represents the FFT() function: 1  -> FFT
 *                                     -1 -> IFFT;
 * Results are stored back in Real[] and Imag[];
 */
void FFT(int Real[], int Imag[], WordType sign);

/* CONVBASE Converts the number base of the input data (DataIn):
 *   ConvBase(DType DataIn[], DType DataOut[], DType DataLen, DType sign)
 * From the current base (CurrBase) to the new base required (NewBase);
 * If the new base is less than the old base, e.g
 * NewBase = 2 and CurrBase = 8, the DataOut will have more
 * data words. For the above example DataOut will be 4 times
 * longer than DataIn;
 * The actual base used = 2^NewBase, thus NewBase = 8, is base 256;
 * E.g. DataIn = [ 2 64 20 ] with CurrBase = 8, NewBase = 2
 * DataOut = [2 0 0 0, 0 0 0 1, 0 1 1 0]
 * Note : Both the input and output data is in a serial format;
 * DataLen is the length of DataIn[];
 * Sign represents the ConvBase() function: 1 -> NewBase < CurrBase
 *                                          0 -> NewBase > CurrBase;
 *                                          Other -> No change;
 */
void ConvBase(DType DataIn[], DType DataOut[], WordType DataLen, WordType Sign);

/* Convert 2-bit binary code to Gray code */
void Gray2(DType DataIn[], WordType Length);

/* Change the source data format to fit the channel encoder */
void SrcToChan(short SrcData[], DType ReqData[], WordType SymbolMark[], WordType BitMark[]);

/* Change the data format to fit the source decoder */
void ChanToSrc(DType ChannelData[], short SrcData[], WordType PosMark[]);

/* Round the data to nearest integer */
WordType Round(float RealData);

/* Generates a pseudorandom number:
 * *Seed is the seed of this function;
 * RandMax is the maximum number of pseudorandom;
 */
unsigned short Random(unsigned int *Seed, unsigned short RandMax);

⌨️ 快捷键说明

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