GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
notch_lite_cc.h
Go to the documentation of this file.
1/*!
2 * \file notch_lite_cc.h
3 * \brief Implements a notch filter light algorithm
4 * \author Antonio Ramos (antonio.ramosdet(at)gmail.com)
5 *
6 * -----------------------------------------------------------------------------
7 *
8 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9 * This file is part of GNSS-SDR.
10 *
11 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12 * SPDX-License-Identifier: GPL-3.0-or-later
13 *
14 * -----------------------------------------------------------------------------
15 *
16 */
17
18#ifndef GNSS_SDR_NOTCH_LITE_CC_H
19#define GNSS_SDR_NOTCH_LITE_CC_H
20
22#include "gnss_sdr_fft.h"
23#include <gnuradio/block.h>
24#include <volk_gnsssdr/volk_gnsssdr_alloc.h> // for volk_gnsssdr::vector
25#include <cstdint>
26#include <memory>
27
28/** \addtogroup Input_Filter
29 * \{ */
30/** \addtogroup Input_filter_gnuradio_blocks
31 * \{ */
32
33
34class NotchLite;
35
36using notch_lite_sptr = gnss_shared_ptr<NotchLite>;
37
38notch_lite_sptr make_notch_filter_lite(
39 float p_c_factor,
40 float pfa,
41 int32_t length,
42 int32_t n_segments_est,
43 int32_t n_segments_reset,
44 int32_t n_segments_coeff);
45
46/*!
47 * \brief This class implements a real-time software-defined multi state notch filter light version
48 */
49class NotchLite : public gr::block
50{
51public:
52 ~NotchLite() = default;
53
54 int general_work(int noutput_items, gr_vector_int &ninput_items,
55 gr_vector_const_void_star &input_items,
56 gr_vector_void_star &output_items);
57
58private:
59 friend notch_lite_sptr make_notch_filter_lite(float p_c_factor, float pfa, int32_t length, int32_t n_segments_est, int32_t n_segments_reset, int32_t n_segments_coeff);
60 NotchLite(float p_c_factor, float pfa, int32_t length, int32_t n_segments_est, int32_t n_segments_reset, int32_t n_segments_coeff);
61
62 std::unique_ptr<gnss_fft_complex_fwd> d_fft_;
63 volk_gnsssdr::vector<float> power_spect_;
64 gr_complex last_out_;
65 gr_complex z_0_;
66 gr_complex p_c_factor_;
67 gr_complex c_samples1_;
68 gr_complex c_samples2_;
69 float pfa_;
70 float thres_;
71 float noise_pow_est_;
72 float angle1_;
73 float angle2_;
74 int32_t length_;
75 int32_t n_segments_;
76 int32_t n_segments_est_;
77 int32_t n_segments_reset_;
78 int32_t n_segments_coeff_reset_;
79 int32_t n_segments_coeff_;
80 int32_t n_deg_fred_;
81 bool filter_state_;
82};
83
84
85/** \} */
86/** \} */
87#endif // GNSS_SDR_NOTCH_LITE_CC_H
This class implements a real-time software-defined multi state notch filter light version.
This interface represents a GNSS block.
Helper file for FFT interface.