20 #ifndef GNSS_SDR_NOTCH_H 21 #define GNSS_SDR_NOTCH_H 23 #if GNURADIO_USES_STD_POINTERS 25 #include <boost/shared_ptr.hpp> 27 #include <gnuradio/block.h> 28 #include <gnuradio/fft/fft.h> 29 #include <volk_gnsssdr/volk_gnsssdr_alloc.h> 35 #if GNURADIO_USES_STD_POINTERS 36 using notch_sptr = std::shared_ptr<Notch>;
38 using notch_sptr = boost::shared_ptr<Notch>;
41 notch_sptr make_notch_filter(
45 int32_t n_segments_est,
46 int32_t n_segments_reset);
56 void forecast(
int noutput_items, gr_vector_int &ninput_items_required);
58 int general_work(
int noutput_items, gr_vector_int &ninput_items,
59 gr_vector_const_void_star &input_items,
60 gr_vector_void_star &output_items);
63 friend notch_sptr make_notch_filter(
float pfa,
float p_c_factor, int32_t length_, int32_t n_segments_est, int32_t n_segments_reset);
64 Notch(
float pfa,
float p_c_factor, int32_t length_, int32_t n_segments_est, int32_t n_segments_reset);
65 std::unique_ptr<gr::fft::fft_complex> d_fft;
66 volk_gnsssdr::vector<gr_complex> c_samples;
67 volk_gnsssdr::vector<float> angle_;
68 volk_gnsssdr::vector<float> power_spect;
71 gr_complex p_c_factor;
78 uint32_t n_segments_est;
79 uint32_t n_segments_reset;
83 #endif // GNSS_SDR_NOTCH_H This class implements a real-time software-defined multi state notch filter.