- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user