peak detector
- bandwidth params are in Hz git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@517 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -35,22 +35,22 @@
|
|||||||
<type>float</type>
|
<type>float</type>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<name>Peak Height Minimum [dB]</name>
|
<name>Peak Threshold [dB]</name>
|
||||||
<key>peak_height_min</key>
|
<key>peak_height_min</key>
|
||||||
<value>20</value>
|
<value>20</value>
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<name>Peak Width Minimum [samples]</name>
|
<name>Peak BW Minimum [Hz]</name>
|
||||||
<key>peak_width_min</key>
|
<key>peak_width_min</key>
|
||||||
<value>5</value>
|
<value>2000</value>
|
||||||
<type>int</type>
|
<type>float</type>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<name>Peak Width Maximum [samples]</name>
|
<name>Peak BW Maximum [Hz]</name>
|
||||||
<key>peak_width_max</key>
|
<key>peak_width_max</key>
|
||||||
<value>55</value>
|
<value>3000</value>
|
||||||
<type>int</type>
|
<type>float</type>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<name>Alpha Short</name>
|
<name>Alpha Short</name>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace gr {
|
|||||||
* class. jay::peak_detect::make is the public interface for
|
* class. jay::peak_detect::make is the public interface for
|
||||||
* creating new instances.
|
* creating new instances.
|
||||||
*/
|
*/
|
||||||
static sptr make(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, int peak_width_min, int peak_width_max, float alpha_s, float alpha_m);
|
static sptr make(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, float peak_width_min, float peak_width_max, float alpha_s, float alpha_m);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace jay
|
} // namespace jay
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace gr {
|
|||||||
namespace jay {
|
namespace jay {
|
||||||
|
|
||||||
peak_detect::sptr
|
peak_detect::sptr
|
||||||
peak_detect::make(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, int peak_width_min, int peak_width_max, float alpha_s, float alpha_m)
|
peak_detect::make(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, float peak_width_min, float peak_width_max, float alpha_s, float alpha_m)
|
||||||
{
|
{
|
||||||
return gnuradio::get_initial_sptr
|
return gnuradio::get_initial_sptr
|
||||||
(new peak_detect_impl(vlen, framerate, bandwidth, fcenter, peak_height_min, peak_width_min, peak_width_max, alpha_s, alpha_m));
|
(new peak_detect_impl(vlen, framerate, bandwidth, fcenter, peak_height_min, peak_width_min, peak_width_max, alpha_s, alpha_m));
|
||||||
@@ -38,7 +38,7 @@ namespace gr {
|
|||||||
/*
|
/*
|
||||||
* The private constructor
|
* The private constructor
|
||||||
*/
|
*/
|
||||||
peak_detect_impl::peak_detect_impl(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, int peak_width_min, int peak_width_max, float alpha_s, float alpha_m)
|
peak_detect_impl::peak_detect_impl(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, float peak_width_min, float peak_width_max, float alpha_s, float alpha_m)
|
||||||
: gr::block("peak_detect"
|
: gr::block("peak_detect"
|
||||||
, gr::io_signature::make(1, 1, vlen*sizeof(float))
|
, gr::io_signature::make(1, 1, vlen*sizeof(float))
|
||||||
, gr::io_signature::make(0, 2, vlen*sizeof(float)))
|
, gr::io_signature::make(0, 2, vlen*sizeof(float)))
|
||||||
@@ -47,8 +47,8 @@ namespace gr {
|
|||||||
, m_bandwidth (bandwidth)
|
, m_bandwidth (bandwidth)
|
||||||
, m_fcenter (fcenter)
|
, m_fcenter (fcenter)
|
||||||
, m_peak_height_min (peak_height_min)
|
, m_peak_height_min (peak_height_min)
|
||||||
, m_peak_width_min (peak_width_min)
|
, m_peak_width_min (2*(int)((0.5f*m_vlen)/bandwidth*peak_width_min) + 1)
|
||||||
, m_peak_width_max (peak_width_max)
|
, m_peak_width_max (2*(int)((0.5f*m_vlen)/bandwidth*peak_width_max) + 1)
|
||||||
, m_alpha_s (alpha_s)
|
, m_alpha_s (alpha_s)
|
||||||
, m_alpha_m(alpha_m)
|
, m_alpha_m(alpha_m)
|
||||||
, m_frameCount(0)
|
, m_frameCount(0)
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ namespace jay {
|
|||||||
pmt::pmt_t m_msg_port_out;
|
pmt::pmt_t m_msg_port_out;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
peak_detect_impl(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, int peak_width_min, int peak_width_max, float alpha_s, float alpha_m);
|
peak_detect_impl(int vlen, float framerate, float bandwidth, float fcenter, float peak_height_min, float peak_width_min, float peak_width_max, float alpha_s, float alpha_m);
|
||||||
~peak_detect_impl();
|
~peak_detect_impl();
|
||||||
|
|
||||||
// Where all the action really happens
|
// Where all the action really happens
|
||||||
|
|||||||
Reference in New Issue
Block a user