GNU Radio Radar Toolbox
find_max_peak_c.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2014 Communications Engineering Lab, KIT.
4
*
5
* This is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 3, or (at your option)
8
* any later version.
9
*
10
* This software is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this software; see the file COPYING. If not, write to
17
* the Free Software Foundation, Inc., 51 Franklin Street,
18
* Boston, MA 02110-1301, USA.
19
*/
20
21
22
#ifndef INCLUDED_RADAR_FIND_MAX_PEAK_C_H
23
#define INCLUDED_RADAR_FIND_MAX_PEAK_C_H
24
25
#include <gnuradio/tagged_stream_block.h>
26
#include <
radar/api.h
>
27
28
namespace
gr
{
29
namespace
radar {
30
31
/*!
32
* \brief This block estimates a single peak of a given FFT spectrum as tagged stream.
33
* Output is a message with the information of frequency, phase and power of the peak as a
34
* f32vector with a single item. All data is tagged with the identifiers (symbols)
35
* 'frequency', 'phase' and 'power'. The peak is estimated on the whole spectrum or on the
36
* range max_freq if cut_max_freq is true. Furthermore a threshold of the spectrum
37
* amplitude can be given with threshold. The DC peak can be cut out with the protected
38
* samples samp_protect. This value do not evaluate samp_protect samples around the DC
39
* peak. If no suitable peak is found the block returns empty vectors with the
40
* identifiers.
41
*
42
* \param samp_rate Sample rate
43
* \param threshold Threshold for detection of the spectrum amplitude
44
* \param samp_protect Protected samples for cutting DC peak
45
* \param max_freq Frequency range for cutting spectrum
46
* \param cut_max_freq Toggle cutting the spectrum for peak estimation
47
* \param len_key Packet length key for tagged stream
48
*
49
* \ingroup radar
50
*
51
*/
52
class
RADAR_API
find_max_peak_c
:
virtual
public
gr::tagged_stream_block
53
{
54
public
:
55
typedef
boost::shared_ptr<find_max_peak_c>
sptr
;
56
57
/*!
58
* \brief Return a shared_ptr to a new instance of radar::find_max_peak_c.
59
*
60
* To avoid accidental use of raw pointers, radar::find_max_peak_c's
61
* constructor is in a private implementation
62
* class. radar::find_max_peak_c::make is the public interface for
63
* creating new instances.
64
*/
65
static
sptr
make(
int
samp_rate,
66
float
threshold,
67
int
samp_protect,
68
std::vector<float> max_freq,
69
bool
cut_max_freq,
70
const
std::string& len_key =
"packet_len"
);
71
virtual
void
set_threshold(
float
threshold) = 0;
72
virtual
void
set_samp_protect(
int
samp) = 0;
73
virtual
void
set_max_freq(std::vector<float> freq) = 0;
74
};
75
76
}
// namespace radar
77
}
// namespace gr
78
79
#endif
/* INCLUDED_RADAR_FIND_MAX_PEAK_C_H */
gr::radar::find_max_peak_c::sptr
boost::shared_ptr< find_max_peak_c > sptr
Definition:
find_max_peak_c.h:55
gr::radar::find_max_peak_c
This block estimates a single peak of a given FFT spectrum as tagged stream. Output is a message with...
Definition:
find_max_peak_c.h:52
RADAR_API
#define RADAR_API
Definition:
api.h:31
gr
Definition:
crop_matrix_vcvc.h:28
api.h
include
radar
find_max_peak_c.h
Generated by
1.8.16