- refactored variable names

git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@399 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-01-10 12:27:44 +00:00
parent 86d994ad42
commit ecef098eff
+4 -4
View File
@@ -111,7 +111,6 @@ void garage_impl::forecast (int noutput_items, gr_vector_int &ninput_items_requi
int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
float rho = 0.999f;
const float *in = (const float *) input_items[0];
float *out = (float *) output_items[0];
int outCount = 0;
@@ -122,12 +121,13 @@ int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, g
const float alpha_thr = 0.01f;
const float alpha_dc = 0.002f;
const float hyst_thr = 0.1f;
const float rho_thr = 0.999f;
const float agc_mu = 0.01f;
const float agc_target = 0.5f;
const float agc_gain_max = 10.0f;
const float k_lead = 1.0e-1f;
const float k_lag = 4.0e-4f;
const float rho_leak = 0.9999;
const float rho_leak = 0.99995f;
float err = 0;
float k_leadLag = m_kLoopFilter;
@@ -143,8 +143,8 @@ int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, g
float y = m_agc_gain * ((1.f-i_f)*in[i_i] + i_f*in[i_i+1] - m_dc_corr);
// Calculate threshold
m_vmin *= rho;
m_vmax *= rho;
m_vmin *= rho_thr;
m_vmax *= rho_thr;
if (y < m_vmin)
{
m_vmin = (1-alpha_thr)*m_vmin + alpha_thr*y;