Detect the peak of a signalIf a peak is detected, this block outputs a 1, or it outputs 0's.
More...
#include <gr_peak_detector_sb.h>
List of all members.
Detailed Description
Detect the peak of a signal
If a peak is detected, this block outputs a 1, or it outputs 0's.
- Parameters:
-
threshold_factor_rise | The threshold factor determins when a peak has started. An average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we start looking for a peak. |
threshold_factor_fall | The threshold factor determins when a peak has ended. An average of the signal is calculated and when the value of the signal goes bellow threshold_factor_fall*average, we stop looking for a peak. |
look_ahead | The look-ahead value is used when the threshold is found to look if there another peak within this step range. If there is a larger value, we set that as the peak and look ahead again. This is continued until the highest point is found with This look-ahead range. |
alpha | The gain value of a moving average filter |
Member Function Documentation
float gr_peak_detector_sb::alpha |
( |
| ) |
[inline] |
Get the alpha value of the running average.
- Returns:
- alpha
Referenced by set_alpha().
int gr_peak_detector_sb::look_ahead |
( |
| ) |
[inline] |
Get the look-ahead factor value.
- Returns:
- look-ahead factor
void gr_peak_detector_sb::set_alpha |
( |
int |
alpha | ) |
[inline] |
Set the running average alpha.
- Parameters:
-
alpha | new alpha for running average |
References alpha().
void gr_peak_detector_sb::set_look_ahead |
( |
int |
look | ) |
[inline] |
Set the look-ahead factor.
- Parameters:
-
look | new look-ahead factor |
void gr_peak_detector_sb::set_threshold_factor_fall |
( |
float |
thr | ) |
[inline] |
Set the threshold factor value for the fall time.
- Parameters:
-
void gr_peak_detector_sb::set_threshold_factor_rise |
( |
float |
thr | ) |
[inline] |
Set the threshold factor value for the rise time.
- Parameters:
-
float gr_peak_detector_sb::threshold_factor_fall |
( |
| ) |
[inline] |
Get the threshold factor value for the fall time.
- Returns:
- threshold factor
float gr_peak_detector_sb::threshold_factor_rise |
( |
| ) |
[inline] |
Get the threshold factor value for the rise time.
- Returns:
- threshold factor
Friends And Related Function Documentation
gr_peak_detector_sb_sptr gr_make_peak_detector_sb |
( |
float |
threshold_factor_rise, |
|
|
float |
threshold_factor_fall, |
|
|
int |
look_ahead, |
|
|
float |
alpha |
|
) |
| [friend] |
The documentation for this class was generated from the following file: