4 #include "../waterfall/waterfallplot.h" 5 #include <fft/fft_avg_complex.h> 6 #include <fft/fft_avg_real.h> 8 #include <qwt_plot_curve.h> 9 #include <qwt_plot_grid.h> 33 void init_lo(
int address,
int memsize,
double master_frequency,
int phase_width,
double init_frequency);
40 void init_cic(
int filter_address,
int filter_memsize,
int bypass_address,
int bypass_memsize);
63 void init_waterfall(
WaterfallPlot *waterfall,
double max_frequency,
double data_range_min,
double data_range_max,
double span_init,
int data_size,
int waterfall_depth,
double usable_span_frac);
69 void init_fft(
int fft_rf_size,
int fft_iq_size,
int window_type);
73 QLabel *label_resolution, \
74 QLabel *label_bandwidth, \
75 QLabel *label_lo_freq, \
76 QLabel *label_cic_dec, \
77 QLabel *label_fir_dec, \
144 DDS *local_oscillator_;
146 IP_Driver *cic_bypass_;
147 Data_Capture_Dual *iq_capture_module_;
149 Data_Capture *rf_capture_module_;
152 QwtPlot *spectrum_line_plot_;
153 QwtPlotCurve *spectrum_line_curve_;
154 QwtPlotGrid *spectrum_line_grid_;
158 QLabel *label_resolution_;
159 QLabel *label_bandwidth_;
160 QLabel *label_lo_freq_;
161 QLabel *label_cic_dec_;
162 QLabel *label_fir_dec_;
166 double *captured_data_rf_;
167 double *captured_data_i_;
168 double *captured_data_q_;
169 double *spectrum_rf_;
170 double *spectrum_iq_;
171 double *spectrum_temp_;
172 double *spectrum_data_;
173 double *spectrum_display_;
176 int capture_iq_max_size_;
177 int capture_rf_max_size_;
184 bool lo_initialized_;
185 bool cic_initialized_;
186 bool capture_iq_initialized_;
187 bool capture_rf_initialized_;
188 bool waterfall_initialized_;
189 bool fft_initialized_;
190 bool labels_initialized_;
191 bool line_plot_initialized_;
196 double gain_rf_scaler_;
200 void set_cic(
int decimation_rate);
201 double set_lo_frequency(
double lo_frequency);
204 void decimate_spectrum(
double data_in[],
int data_in_size,
double data_out[],
int data_out_size);
208 #endif // WATERFALLDDC_H void init_lo(int address, int memsize, double master_frequency, int phase_width, double init_frequency)
initializes LO IP core, required to run before using the DDC!
Definition: waterfallddc.cpp:69
FFT Class for averaging over multiple FFTs with complex time domain input values. ...
Definition: fft_avg_complex.h:7
void debug_set_cic(int dec)
forces the CIC filter to the given decimation factor (for debug)
Definition: waterfallddc.cpp:592
WaterfallDDC()
constructor
Definition: waterfallddc.cpp:3
void capture_and_show(fstream &record_file, bool record_data)
captures IQ data (after DDC) and shows them as a new line in the waterfall plot
Definition: waterfallddc.cpp:259
void set_num_ffts(int num_ffts)
sets number of FFTs, that are averaged
Definition: waterfallddc.h:96
void set_gain_rf_scaler(int gain_rf_scaler)
sets the RF Scaler gain in dB, that will be subtracted from the FFT power bins
Definition: waterfallddc.h:93
void init_cic(int filter_address, int filter_memsize, int bypass_address, int bypass_memsize)
initializes CIC IP cores (rate prog and bypass), required to run before using the DDC! ...
Definition: waterfallddc.cpp:76
void correct_waterfall_size()
required to call to resize the plot to the data length
Definition: waterfallddc.h:103
void debug_set_lo(double freq)
forces the LO to the given frequency (for debug)
Definition: waterfallddc.cpp:599
void init_spectrum_line_plot(QwtPlot *spectrum_line_plot)
OPTIONAL: initializes support to display the spectrum in an extra line plot (QwtPlot) ...
Definition: waterfallddc.cpp:206
~WaterfallDDC()
destructor
Definition: waterfallddc.cpp:45
int get_fft_rf_size()
get data block length for real fft (fft_rf_size_/2 output bins)
Definition: waterfallddc.h:106
void init_labels(QLabel *label_zoom, QLabel *label_resolution, QLabel *label_bandwidth, QLabel *label_lo_freq, QLabel *label_cic_dec, QLabel *label_fir_dec, QLabel *label_fft)
OPTIONAL: initializes labels for status display in the GUI, in which the WaterfallDDC can write statu...
Definition: waterfallddc.cpp:127
int data_size()
get data block length for complex fft
Definition: waterfallddc.h:112
void set_gain_ddc(int gain_ddc)
sets the DDC gain in dB, that will be subtracted from the FFT power bins (without RF scaler gain) ...
Definition: waterfallddc.h:90
void audio_frequency_clicked(double frequency)
sends the frequency for tuning the audio receiver (when right clicking in the waterfall) ...
void debug_capture_iq_samples(double samples_i[], double samples_q[], int size)
returns IQ captured data (for debug)
Definition: waterfallddc.cpp:607
void init_waterfall(WaterfallPlot *waterfall, double max_frequency, double data_range_min, double data_range_max, double span_init, int data_size, int waterfall_depth, double usable_span_frac)
initializes the Waterfall DDC, required to run before use!
Definition: waterfallddc.cpp:101
FFT Class for averaging over multiple FFTs with real time domain input values.
Definition: fft_avg_real.h:7
void init_rf_capture(int address, int memsize, int capture_size)
initializes the RF capture module, instanciated outside of this class
Definition: waterfallddc.cpp:94
void debug_capture_rf_samples(double samples[], int size)
returns RF captured data (for debug)
Definition: waterfallddc.cpp:614
void decimate_spectrum(double data_in[], int data_in_size, double data_out[], int data_out_size)
converts long spectrum in a shorter one, using simple max operation
Definition: waterfallddc.cpp:559
Class for controlling the Waterfall DDC .
Definition: waterfallddc.h:15
void init_fft(int fft_rf_size, int fft_iq_size, int window_type)
initializes the FFT cores and data arrays for FFT and related processing
Definition: waterfallddc.cpp:140
int get_fft_iq_size()
get data block length for complex fft
Definition: waterfallddc.h:109
Top class for Waterfall Plots ,.
Definition: waterfallplot.h:16
void set_debug(bool debug_en)
enables the debug mode, which stops the waterfall and allows to set the DDC parameters and IP cores d...
Definition: waterfallddc.cpp:586
void init_iq_capture(int address, int memsize, int capture_size)
initializes Dual Capture IP core for IQ data, required to run before using the DDC! ...
Definition: waterfallddc.cpp:87
void set_color_map(QwtLinearColorMap color_map)
sets the color map of the plot (a default is assinged in the constructor)
Definition: waterfallddc.cpp:248