GNU Radio 3.6.5.1 C++ API
|
Detects a plateau and marks the middle. More...
#include <plateau_detector_fb.h>
Public Types | |
typedef boost::shared_ptr < plateau_detector_fb > | sptr |
Static Public Member Functions | |
static sptr | make (int max_len, float threshold=0.9) |
Additional Inherited Members | |
![]() | |
virtual int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)=0 |
just like gr_block::general_work, only this arranges to call consume_each for you | |
void | forecast (int noutput_items, gr_vector_int &ninput_items_required) |
Estimate input requirements given output request. | |
int | general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
compute output items from input items | |
int | fixed_rate_ninput_to_noutput (int ninput) |
Given ninput samples, return number of output samples that will be produced. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this. | |
int | fixed_rate_noutput_to_ninput (int noutput) |
Given noutput samples, return number of input samples required to produce noutput. N.B. this is only defined if fixed_rate returns true. Generally speaking, you don't need to override this. | |
![]() | |
enum | vcolor { WHITE, GREY, BLACK } |
![]() | |
gr_sync_block (void) | |
gr_sync_block (const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature) | |
![]() | |
std::vector< long > | d_max_output_buffer |
std::vector< long > | d_min_output_buffer |
gruel::mutex | d_setlock |
gr_logger_ptr | d_logger |
gr_logger_ptr | d_debug_logger |
Detects a plateau and marks the middle.
Detect a plateau of a-priori known height. Input is a stream of floats, the output is a stream of bytes. Whenever a plateau is detected, the middle of that plateau is marked with a '1' on the output stream (all other samples are left at zero).
You can use this in a Schmidl & Cox synchronisation algorithm to interpret the output of the normalized correlator. Just pass the length of the cyclic prefix (in samples) as the max_len parameter).
Unlike the peak detectors, you must the now the absolute height of the plateau. Whenever the amplitude exceeds the given threshold, it starts assuming the presence of a plateau.
An implicit hysteresis is provided by the fact that after detecting one plateau, it waits at least max_len samples before the next plateau can be detected.
|
static |
max_len | Maximum length of the plateau |
threshold | Anything above this value is considered a plateau |