GNU Radio Radar Toolbox
gr::radar::os_cfar_c Class Referenceabstract

This block estimates peaks of a given FFT spectrum as tagged stream. Multi peak detection is implemented with the OS-CFAR algorithm. The algorithm uses around the cell under test (CUT) on each side samp_compare samples to estimate the noise floor. This relative threshold is defined by the bin of the vector within the sorted samp_compare samples. A standard value is rel_threshold = 0.78. The value of this bin is multiplied by mult_threshold and compared with the CUT. samp_protect samples are a protected are which is not used for acquiring compare samples. If consecutive bins are detected as valid peaks it is possible to merge these detections with merge_consecutive = true. Output data are f32vectors with the information of frequency, power and phase. The identifiers (symbols) are 'frequency', 'power' and 'phase'. More...

#include <os_cfar_c.h>

Inheritance diagram for gr::radar::os_cfar_c:
gr::radar::os_cfar_c_impl

Public Types

typedef std::shared_ptr< os_cfar_csptr
 

Public Member Functions

virtual void set_rel_threshold (float inp)=0
 
virtual void set_mult_threshold (float inp)=0
 
virtual void set_samp_compare (int inp)=0
 
virtual void set_samp_protect (int inp)=0
 

Static Public Member Functions

static sptr make (int samp_rate, int samp_compare, int samp_protect, float rel_threshold, float mult_threshold, bool merge_consecutive=true, const std::string &len_key="packet_len")
 Return a shared_ptr to a new instance of radar::os_cfar_c.
 

Detailed Description

This block estimates peaks of a given FFT spectrum as tagged stream. Multi peak detection is implemented with the OS-CFAR algorithm. The algorithm uses around the cell under test (CUT) on each side samp_compare samples to estimate the noise floor. This relative threshold is defined by the bin of the vector within the sorted samp_compare samples. A standard value is rel_threshold = 0.78. The value of this bin is multiplied by mult_threshold and compared with the CUT. samp_protect samples are a protected are which is not used for acquiring compare samples. If consecutive bins are detected as valid peaks it is possible to merge these detections with merge_consecutive = true. Output data are f32vectors with the information of frequency, power and phase. The identifiers (symbols) are 'frequency', 'power' and 'phase'.

Parameters
samp_rateSample rate
samp_compareSample to be compared with each other
samp_protectSamples which are protected and not used for peak detection
rel_thresholdRelative threshold
mult_thresholdMultiplier threshold
merge_consectuiveToggle merging consecutive detected peaks
len_keyPacket length key for tagged stream

Member Typedef Documentation

◆ sptr

typedef std::shared_ptr<os_cfar_c> gr::radar::os_cfar_c::sptr

Member Function Documentation

◆ make()

static sptr gr::radar::os_cfar_c::make ( int  samp_rate,
int  samp_compare,
int  samp_protect,
float  rel_threshold,
float  mult_threshold,
bool  merge_consecutive = true,
const std::string &  len_key = "packet_len" 
)
static

Return a shared_ptr to a new instance of radar::os_cfar_c.

To avoid accidental use of raw pointers, radar::os_cfar_c's constructor is in a private implementation class. radar::os_cfar_c::make is the public interface for creating new instances.

◆ set_mult_threshold()

virtual void gr::radar::os_cfar_c::set_mult_threshold ( float  inp)
pure virtual

Implemented in gr::radar::os_cfar_c_impl.

◆ set_rel_threshold()

virtual void gr::radar::os_cfar_c::set_rel_threshold ( float  inp)
pure virtual

Implemented in gr::radar::os_cfar_c_impl.

◆ set_samp_compare()

virtual void gr::radar::os_cfar_c::set_samp_compare ( int  inp)
pure virtual

Implemented in gr::radar::os_cfar_c_impl.

◆ set_samp_protect()

virtual void gr::radar::os_cfar_c::set_samp_protect ( int  inp)
pure virtual

Implemented in gr::radar::os_cfar_c_impl.


The documentation for this class was generated from the following file: