Radio Control
Control Software and GUI for the Panoradio SDR, by DC9ST 2016
|
Toplevel class for an audio receiver with two audio DDCs with IQ Reset (DDC) More...
#include <audiorx.h>
Public Slots | |
void | get_output_properties (int bandwidth, bool inverted, bool binaural) |
receives request for changing the audio processing properties More... | |
void | get_ddc_frequency (double frequency, int ddc_number) |
receives request for changing the audio DDC's LO freqency More... | |
void | get_output_ddc_selection (int ddc_number, bool active) |
receives request for selection, which DDCs are active for outputting audio data | |
void | get_output_scaler_setting (int scaling_value_db) |
receives request to change the audio scaler gain setting | |
void | get_output_scaler_auto_setting (bool auto_setting) |
receives request to change the automatic mode of the audio scaler | |
void | scaler_timer_slot () |
receives timer signal (every 500ms) to automatically update the scaler setting and sending the current audio level (by calling signal "send_audio_out_level") | |
Signals | |
void | send_scaling_value (int true_scaler_value_db) |
sends the current gain value (in dB) of the audio scaler | |
void | send_audio_out_level (int audio_level, int audio_level_dbfs) |
sends the current audio level (after the audio DDC) | |
void | send_true_frequency (double frequency, int ddc) |
sends the actually set LO frequency after a frequency update has been recevied by slot get_ddc_frequency | |
void | send_new_frequency_ddc0 (double frequency) |
sends the current LO frequency for DDC 0 (when it has been newly set in the DDC, e.g. originating in a waterfall shift) | |
void | send_new_frequency_ddc1 (double frequency) |
sends the current LO frequency for DDC 1 (when it has been newly set in the DDC, e.g. originating in a waterfall shift) | |
Public Member Functions | |
AudioRX () | |
constructor | |
~AudioRX () | |
destructor | |
void | init_reset (int address, int memsize) |
initializes the reset IP core More... | |
void | init_ddc_selector (int address, int memsize) |
initializes the MUX controller for selecting the audio DDCs More... | |
void | init_lo (int address, int memsize, double master_frequency, int phase_width, double init_frequency, int ddc_number) |
initializes LO IP core of one DDC More... | |
void | init_capture (int address, int memsize, int capture_size, int ddc_number) |
initializes Dual Capture IP core for IQ data of one DDC More... | |
void | init_waterfall (WaterfallPlot *waterfall_audio, int max_frequency, double data_range_min, double data_range_max, double span_init, int data_size, int waterfall_depth, int ddc_number) |
initializes the waterfall for one DDC More... | |
void | init_scaling (int i_address, int i_memsize, int q_address, int q_memsize, int max_scaling_db) |
initializes the scaling IP cores for I and Q components More... | |
void | init_mux_controller (int address, int memsize) |
initializes the MUX controller for bandwidth, spectrum inversion and binaural mode selection More... | |
void | init_weaver_lo (int address, int memsize, double master_frequency, int phase_width, double init_frequency) |
initializes Weaver LO More... | |
void | capture_and_show (double gain_correction, int ddc_number) |
updates waterfall: captures data, does FFT and draws one line for the audio DDC More... | |
void | init_output_spectrum_display (int capture_address, int capture_memsize, int capture_size, QwtPlot *spectrum_out_plot) |
shows the audio output spectrum before the audio IF to the PS or ADAU More... | |
void | capture_and_show_spectrum_out () |
shows the audio output spectrum before the audio IF to the PS or ADAU | |
void | reset () |
resets all audio DDCs and audio out interface, i.e. IQ paths (and sample rate conversion and audio interface) | |
void | correct_size () |
corrects size of the waterfall plots of all audio DDCs | |
bool | get_ddc_output_active (int ddc_number) |
returns if DDC with specified number (0 to num_audio_ddcs_-1) currently outputs data | |
Private Member Functions | |
void | set_audio_scaling (int scaling_factor_db) |
Private Attributes | |
IP_Driver * | ddc_selector_ |
IP_Driver * | reset_module_ |
AudioDDC ** | audio_ddc_ |
Data_Capture_Dual * | capture_spectrum_out_ |
QwtPlot * | spectrum_out_plot_ |
QwtPlotCurve * | spectrum_out_curve_ |
QwtPlotGrid * | spectrum_out_grid_ |
fft_basic * | fft_ |
double * | captured_data_i_ |
double * | captured_data_q_ |
double * | captured_data_fft_db_ |
double * | captured_data_fft_db_real_ |
int | capture_size_ |
int | num_audio_ddcs_ |
bool | reset_initialized_ |
bool | ddc_selector_initialized_ |
bool | spectrum_out_initialized_ |
bool | scaler_initalized_ |
bool | mux_controller_initialized_ |
bool | weaver_lo_initialized_ |
bool * | ddc_out_active_ |
Signal_Scaler * | audio_scaler_i_ |
Signal_Scaler * | audio_scaler_q_ |
IP_Driver * | mux_controller_ |
DDS * | weaver_lo_ |
bool | auto_scaling_ |
int | manual_scaler_setting_db_ |
int | max_scaling_db_ |
bool | binaural_out_ |
Toplevel class for an audio receiver with two audio DDCs with IQ Reset (DDC)
void AudioRX::capture_and_show | ( | double | gain_correction, |
int | ddc_number | ||
) |
updates waterfall: captures data, does FFT and draws one line for the audio DDC
gain_correction | correction of gain for FFT power spectrum, apart from CPG (e.g. scaling/filter/mixer gain) |
ddc_number | number of audio ddc (0 or 1) |
|
slot |
receives request for changing the audio DDC's LO freqency
frequency | LO frequency in kHz |
ddc_number |
|
slot |
receives request for changing the audio processing properties
bandwidth | 0: wideband, 1: mediumband, 2: narrowband |
inverted | spectrum inversion (other sideband) |
binaural | binaural mode, i.e. stereo I/Q |
void AudioRX::init_capture | ( | int | address, |
int | memsize, | ||
int | capture_size, | ||
int | ddc_number | ||
) |
initializes Dual Capture IP core for IQ data of one DDC
address | IP core address (from Vivado) |
memsize | IP core memory size in k (from Vivado) |
capture_size | depth of capture memory in i/q sample pairs |
ddc_number | number of DDC (0 or 1) |
void AudioRX::init_ddc_selector | ( | int | address, |
int | memsize | ||
) |
initializes the MUX controller for selecting the audio DDCs
address | IP core adress from Vivado |
memsize | memory space size in k from Vivado |
void AudioRX::init_lo | ( | int | address, |
int | memsize, | ||
double | master_frequency, | ||
int | phase_width, | ||
double | init_frequency, | ||
int | ddc_number | ||
) |
initializes LO IP core of one DDC
address | IP core address (from Vivado) |
memsize | IP core memory size in k (from Vivado) |
master_frequency | DDS master frequency in kHz (from Vivado) |
phase_width | DDS phase width (from Vivado) |
init_frequency | inital LO frequency in kHz |
ddc_number | number of DDC (0 or 1) |
void AudioRX::init_mux_controller | ( | int | address, |
int | memsize | ||
) |
initializes the MUX controller for bandwidth, spectrum inversion and binaural mode selection
address | IP core adress from Vivado |
memsize | memory space size in k from Vivado |
void AudioRX::init_output_spectrum_display | ( | int | capture_address, |
int | capture_memsize, | ||
int | capture_size, | ||
QwtPlot * | spectrum_out_plot | ||
) |
shows the audio output spectrum before the audio IF to the PS or ADAU
capture_address | address of dual capture IP core |
capture_memsize | |
capture_size | capture size of dual capture IP core |
spectrum_out_plot | pointer to QwtPlot, which will display the spectrum |
void AudioRX::init_reset | ( | int | address, |
int | memsize | ||
) |
initializes the reset IP core
address | IP core address from Vivado |
memsize | memory space size in k from Vivado |
void AudioRX::init_scaling | ( | int | i_address, |
int | i_memsize, | ||
int | q_address, | ||
int | q_memsize, | ||
int | max_scaling_db | ||
) |
initializes the scaling IP cores for I and Q components
i_address | I scaler IP core address from Vivado |
i_memsize | I scaler memory space size in k from Vivado |
q_address | Q scaler IP core address from Vivado |
q_memsize | Q scaler memory space size in k from Vivado |
max_scaling_db | maximum scaling value in dB (e.g. 48 means -48dB to +48dB) |
void AudioRX::init_waterfall | ( | WaterfallPlot * | waterfall_audio, |
int | max_frequency, | ||
double | data_range_min, | ||
double | data_range_max, | ||
double | span_init, | ||
int | data_size, | ||
int | waterfall_depth, | ||
int | ddc_number | ||
) |
initializes the waterfall for one DDC
*waterfall_audio | pointer to waterfall display |
max_frequency | maximum frequency the waterfall can be scrolled to in kHz (e.g. 125000 for 125 MHz) |
data_range_min | minimum data value in waterfall |
data_range_max | maximum data value in waterfall |
span_init | initial frequency span of waterfall in kHz (= audio IQ signal's sample rate) |
data_size | size of data block to be captured and displayed |
waterfall_depth | depth of waterfall display |
ddc_number | number of DDC (0 or 1) |
void AudioRX::init_weaver_lo | ( | int | address, |
int | memsize, | ||
double | master_frequency, | ||
int | phase_width, | ||
double | init_frequency | ||
) |
initializes Weaver LO
address | IP core address (from Vivado) |
memsize | IP core memory size in k (from Vivado) |
master_frequency | DDS master frequency in kHz (from Vivado) |
phase_width | DDS phase width (from Vivado) |
init_frequency | inital weaver frequency in kHz |