- added peak boxes

git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@458 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-05-24 21:14:08 +00:00
parent 1d18b02c6e
commit 109d2368c8
2 changed files with 165 additions and 8 deletions
+24 -3
View File
@@ -28,19 +28,39 @@ namespace jay {
class peak_detect_impl : public peak_detect
{
private:
// Nothing to declare in this block.
private:
struct Compare
{
float const *m_pData;
Compare(float const *pData)
: m_pData(pData)
{
}
bool operator() (int i,int j)
{
return (m_pData[i] < m_pData[j]);
}
};
float m_alpha_s;
float m_alpha_m;
float *m_pPeakData;
float *m_pX;
float *m_pXs;
float *m_pXm;
float *m_pXd;
int *m_pPeakPos;
float *m_pPeakBox_rel;
float *m_pPeakBox_abs;
uint64_t m_frameCount;
pmt::pmt_t m_tag_id;
public:
const int PB_MIN = 5;
const int PB_MAX = 37;
public:
peak_detect_impl(float alpha_s, float alpha_m, int vlen);
~peak_detect_impl();
@@ -51,6 +71,7 @@ namespace jay {
int threshold(float *pDst, float *pSrc, int length, float thresh);
int findPeakPos(int *pDst, float *pSrc, int length);
int cmp(const void *a, const void *b);
};
} // namespace jay