GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
goertzel.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2006,2011,2012 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_FFT_IMPL_GOERTZEL_H
12#define INCLUDED_FFT_IMPL_GOERTZEL_H
13
14#include <gnuradio/fft/api.h>
15#include <gnuradio/types.h>
16
17namespace gr {
18namespace fft {
19
20/*!
21 * \brief Implements Goertzel single-bin DFT calculation
22 * \ingroup misc
23 */
25{
26public:
27 goertzel(int rate, int len, float freq);
28
29 void set_params(int rate, int len, float freq);
30
31 // Process a input array
32 gr_complex batch(const float* in);
33
34 // Process sample by sample
35 void input(const float& in);
37 bool ready() const { return d_processed == d_len; }
38
39private:
40 float d_d1;
41 float d_d2;
42 float d_wr;
43 float d_wi;
44 int d_len;
45 int d_processed;
46};
47
48} /* namespace fft */
49} /* namespace gr */
50
51#endif /* INCLUDED_FFT_IMPL_GOERTZEL_H */
Implements Goertzel single-bin DFT calculation.
Definition: goertzel.h:25
goertzel(int rate, int len, float freq)
gr_complex batch(const float *in)
bool ready() const
Definition: goertzel.h:37
void input(const float &in)
gr_complex output()
void set_params(int rate, int len, float freq)
#define FFT_API
Definition: gr-fft/include/gnuradio/fft/api.h:18
std::complex< float > gr_complex
Definition: gr_complex.h:15
GNU Radio logging wrapper.
Definition: basic_block.h:29