23 #ifndef INCLUDED_INSPECTOR_SIGNAL_DETECTOR_CVF_IMPL_H 24 #define INCLUDED_INSPECTOR_SIGNAL_DETECTOR_CVF_IMPL_H 27 #include <gnuradio/filter/firdes.h> 28 #include <gnuradio/fft/fft.h> 29 #include <gnuradio/filter/single_pole_iir.h> 37 bool d_auto_threshold;
39 unsigned int d_tmpbuflen;
40 float d_threshold, d_sensitivity, d_average, d_quantization, d_min_bw;
41 float *d_pxx, *d_tmp_pxx, *d_pxx_out, *d_tmpbuf;
43 std::ofstream logfile;
45 std::vector<filter::single_pole_iir<float,float,double> > d_avg_filter;
46 filter::firdes::win_type d_window_type;
47 std::vector<float> d_window;
48 std::vector<std::vector<float> > d_signal_edges;
49 fft::fft_complex *d_fft;
50 std::vector<float> d_freq;
51 const char* d_filename;
53 void write_logfile_header();
54 void write_logfile_entry();
58 int window_type,
float threshold,
59 float sensitivity,
bool auto_threshold,
60 float average,
float quantization,
61 float min_bw,
const char *filename);
78 void periodogram(
float *pxx,
const gr_complex *signal);
80 int work(
int noutput_items,
81 gr_vector_const_void_star &input_items,
82 gr_vector_void_star &output_items);
87 signal_detector_cvf_impl::d_samp_rate = d_samp_rate;
94 signal_detector_cvf_impl::d_threshold = d_threshold;
98 signal_detector_cvf_impl::d_sensitivity = d_sensitivity;
102 signal_detector_cvf_impl::d_auto_threshold = d_auto_threshold;
106 signal_detector_cvf_impl::d_average = d_average;
107 for(
unsigned int i = 0; i < d_fft_len; i++) {
108 d_avg_filter[i].set_taps(d_average);
113 signal_detector_cvf_impl::d_quantization = d_quantization;
signal_detector_cvf_impl(double samp_rate, int fft_len, int window_type, float threshold, float sensitivity, bool auto_threshold, float average, float quantization, float min_bw, const char *filename)
void set_auto_threshold(bool d_auto_threshold)
Definition: signal_detector_cvf_impl.h:101
void set_threshold(float d_threshold)
Definition: signal_detector_cvf_impl.h:93
pmt::pmt_t pack_message()
void set_fft_len(int fft_len)
std::vector< float > build_freq()
void set_window_type(int d_window)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
std::vector< std::vector< unsigned int > > find_signal_edges()
Definition: signal_detector_cvf_impl.h:35
Definition: ofdm_bouzegzi_c.h:30
void set_sensitivity(float d_sensitivity)
Definition: signal_detector_cvf_impl.h:97
~signal_detector_cvf_impl()
void periodogram(float *pxx, const gr_complex *signal)
void set_samp_rate(double d_samp_rate)
Definition: signal_detector_cvf_impl.h:86
Signal detection block using energy detection.
Definition: signal_detector_cvf.h:63
void set_average(float d_average)
Definition: signal_detector_cvf_impl.h:105
bool compare_signal_edges(std::vector< std::vector< float > > *edges)
void set_quantization(float d_quantization)
Definition: signal_detector_cvf_impl.h:112