File filtering.hpp¶

class Filtering
 #include <filtering.hpp>
Class for filtering.
Public Functions

Filtering() = default¶

explicit Filtering(std::vector<std::vector<float>> input_filter_taps)¶
The constructor finds the number of filter taps for each stage and then a lowpass filter for each stage.
 Parameters
input_filter_taps – [in] The filter taps sent from radar control.

void save_filter_to_file(const std::vector<std::complex<float>> &filter_taps, std::string name)¶
Writes out a set of filter taps to file in case they need to be tested.
 Parameters
filter_taps – [in] A reference to a vector of filter taps.
name – [in] A output file name.

void mix_first_stage_to_bandpass(const std::vector<double> &rx_freqs, double initial_rx_rate)¶
Mixes the first stage lowpass filter to bandpass filters for each RX frequency.
Creates a flatbuffer with a bandpass filter for each RX frequency to be used in decimation.
 Parameters
rx_freqs – [in] rx_freqs A reference to a vector of RX frequencies in Hz.
initial_rx_sample_rate – [in] initial_rx_sample_rate The USRP RX sampling rate in Hz.

std::vector<std::vector<std::complex<float>>> get_mixed_filter_taps()¶
Gets the mixed filter taps at each stage.
A temp vector is created. The first stage taps are replaced with the bandpass taps.
 Returns
The mixed filter taps.

std::vector<std::vector<std::complex<float>>> get_unmixed_filter_taps()¶
Gets the unmixed filter taps at each stage.
The unmixed filter taps are returned.
 Returns
The unmixed filter taps.
Private Functions

std::vector<std::complex<float>> fill_filter(std::vector<float> &filter_taps)¶
Fills the lowpass filter taps with zero to a size that is a power of 2.
 Parameters
filter_taps – [in] The filter taps provided, will be real.
 Returns
A vector of filter taps. Filter is real, but represented using complex<float> form R + i0 for each tap. The vector is filled with zeros at the end to reach a length that is a power of 2 for processing.

Filtering() = default¶