[Peak Detect]
- no intersection check during finding of peak boxes git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@464 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -41,14 +41,16 @@ namespace jay {
|
||||
return (other.pos >= (pos - half_width)) and (other.pos <= (pos + half_width));
|
||||
}
|
||||
|
||||
void update(const Peak &other)
|
||||
const Peak& update(const Peak &other)
|
||||
{
|
||||
float alpha = 0.5f;
|
||||
float beta = 0.5f;
|
||||
float beta = 0.1f;
|
||||
float alpha = (1.f-beta);
|
||||
pos = alpha*pos + beta*other.pos;
|
||||
half_width = alpha*half_width + beta*other.half_width;
|
||||
height_rel = alpha*height_rel + beta*other.height_rel;
|
||||
height_abs = alpha*height_abs + beta*other.height_abs;
|
||||
height_rel = std::max(height_rel, other.height_rel);
|
||||
height_abs = std::max(height_abs, other.height_abs);
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -72,6 +74,7 @@ namespace jay {
|
||||
pmt::pmt_t m_tag_id;
|
||||
std::vector<Peak> m_peakList;
|
||||
std::vector<Peak> m_peakHistory;
|
||||
std::vector<Peak> temp;
|
||||
uint64_t m_peak_id;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user