Radio Control  Control Software and GUI for the Panoradio SDR, by DC9ST 2016
Public Member Functions | List of all members
fft_basic Class Reference

Main FFT Class for single non-averaging FFT (performs FFT of real and complex time domain inputs) More...

#include <fft_basic.h>

Inheritance diagram for fft_basic:
fftw_base

Public Member Functions

 fft_basic (int n, t_fft_window fft_window)
 constructor, calls constructor of base class More...
 
void real_fft_dbm (double data_in[], double data_out_mag[])
 performs FFT on real input values, including windowing, with CPG correction More...
 
void complex_fft_dbm (double data_in_real[], double data_in_imag[], double data_out_mag[])
 performs FFT on complex input values, including windowing, with CPG correction More...
 
- Public Member Functions inherited from fftw_base
 fftw_base (int n, t_fft_window fft_window)
 constructor, allocates memory, sets parameter for magnitude calculation and windowing coefficients More...
 
virtual ~fftw_base ()
 destructor
 

Additional Inherited Members

- Public Types inherited from fftw_base
enum  t_fft_window { no, hann, flat }
 window types
 
- Protected Member Functions inherited from fftw_base
void real_fft_linear_power (double data_in[], double data_out_mag[])
 performs FFT on real input values, including windowing, no CPG correction More...
 
void complex_fft_linear_power (double data_in_real[], double data_in_imag[], double data_out_mag[])
 performs FFT on complex input values, including windowing, no CPG correction More...
 
void linear2dbm_real (double data_out_mag[])
 converts a linear scaled power spectrum of real input values into a power spectrum in dBm (same as "linear2dbm_complex" but with n/2 values) More...
 
void linear2dbm_complex (double data_out_mag[])
 converts a linear scaled power spectrum of complex input values into a power spectrum in dBm (same as "linear2dbm_real" but with n values) More...
 
void correct_coherent_gain_real (double data_out_mag[])
 corrects the coherent power gain (caused by windowing) of a power spectrum in dBm of real input values (n/2 samples) More...
 
void correct_coherent_gain_complex (double data_out_mag[])
 corrects the coherent power gain (caused by windowing) of a power spectrum in dBm of complex input values (n samples) More...
 
- Protected Attributes inherited from fftw_base
int n_
 FFT size.
 
double resistor_ref_
 resistance in Ohms of a resistor over which the input voltage occurs
 
double adc_full_scale_voltage_
 full scale voltage of ADC in Volts
 
int num_adc_bits_
 number of ADC bits
 
double coherent_gain_
 coherent power gain of selected window
 
t_fft_window fft_window_
 selected window
 
double * window_weights_
 pointer to array of window weight coefficients
 
fftw_plan * my_fftw_plan_
 FFTW specific module for FFT calculation.
 
fftw_complex * in_
 FFTW specific buffer for FFT input data.
 
fftw_complex * out_
 FFTW specific buffer for FFT output data.
 
double * data_out_mag_complex_temp_
 temporary array required when reordering the bins of a complex FFT
 

Detailed Description

Main FFT Class for single non-averaging FFT (performs FFT of real and complex time domain inputs)

Constructor & Destructor Documentation

fft_basic::fft_basic ( int  n,
t_fft_window  fft_window 
)

constructor, calls constructor of base class

Parameters
nFFT size & size of input data
fft_windowFFT window

Member Function Documentation

void fft_basic::complex_fft_dbm ( double  data_in_real[],
double  data_in_imag[],
double  data_out_mag[] 
)

performs FFT on complex input values, including windowing, with CPG correction

Parameters
data_in_real[]array containing n input time domain samples, real part
data_in_imag[]array containing n input time domain samples, imaginary part
data_out_mag[]array for the n FFT bins of the power spectrum in dBm
void fft_basic::real_fft_dbm ( double  data_in[],
double  data_out_mag[] 
)

performs FFT on real input values, including windowing, with CPG correction

Parameters
data_in[]array containing n real input time domain samples
data_out_mag[]array for the n/2 FFT bins of the power spectrum in dBm

The documentation for this class was generated from the following files: