summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/general
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r--gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.cc6
-rw-r--r--gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.h1
-rw-r--r--gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc1
-rw-r--r--gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.h5
-rw-r--r--gnuradio-core/src/lib/general/gr_math.h9
5 files changed, 3 insertions, 19 deletions
diff --git a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.cc b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.cc
index bab0e938b..6761392e6 100644
--- a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.cc
+++ b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.cc
@@ -151,19 +151,17 @@ gr_clock_recovery_mm_cc::general_work (int noutput_items,
out[oo++] = d_p_0T;
// limit mm_val
-
if (mm_val > 1.0)
mm_val = 1.0;
else if (mm_val < -1.0)
mm_val = -1.0;
-
+
d_omega = d_omega + d_gain_omega * mm_val;
-
if (d_omega > d_max_omega)
d_omega = d_max_omega;
else if (d_omega < d_min_omega)
d_omega = d_min_omega;
-
+
d_mu = d_mu + d_omega + d_gain_mu * mm_val;
ii += (int)floor(d_mu);
d_mu -= floor(d_mu);
diff --git a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.h b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.h
index fc8447f80..453bafbe1 100644
--- a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.h
+++ b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_cc.h
@@ -25,7 +25,6 @@
#include <gr_block.h>
#include <gr_complex.h>
-#include <gr_math.h>
class gri_mmse_fir_interpolator_cc;
diff --git a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc
index 49447b43a..d27ab9d65 100644
--- a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc
+++ b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc
@@ -118,7 +118,6 @@ gr_clock_recovery_mm_ff::general_work (int noutput_items,
d_last_sample = out[oo];
d_omega = d_omega + d_gain_omega * mm_val;
-
if (d_omega > d_max_omega)
d_omega = d_max_omega;
else if (d_omega < d_min_omega)
diff --git a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.h b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.h
index a121fe821..87823c44e 100644
--- a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.h
+++ b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.h
@@ -24,7 +24,6 @@
#define INCLUDED_GR_CLOCK_RECOVERY_MM_FF_H
#include <gr_block.h>
-#include <gr_math.h>
#include <stdio.h>
class gri_mmse_fir_interpolator;
@@ -68,7 +67,6 @@ class gr_clock_recovery_mm_ff : public gr_block
d_omega = omega;
d_min_omega = omega*(1.0 - d_omega_relative_limit);
d_max_omega = omega*(1.0 + d_omega_relative_limit);
- d_omega_mid = 0.5*(d_min_omega+d_max_omega);
}
protected:
@@ -78,8 +76,7 @@ protected:
private:
float d_mu; // fractional sample position [0.0, 1.0]
float d_omega; // nominal frequency
- float d_min_omega; // minimum allowed omega
- float d_omega_mid; // average omega
+ float d_min_omega; // minimum allowed omega
float d_max_omega; // maximum allowed omega
float d_gain_omega; // gain for adjusting omega
float d_gain_mu; // gain for adjusting mu
diff --git a/gnuradio-core/src/lib/general/gr_math.h b/gnuradio-core/src/lib/general/gr_math.h
index 547560650..439e5f4b9 100644
--- a/gnuradio-core/src/lib/general/gr_math.h
+++ b/gnuradio-core/src/lib/general/gr_math.h
@@ -64,13 +64,4 @@ static inline float gr_fast_atan2f(gr_complex z)
return gr_fast_atan2f(z.imag(), z.real());
}
-static inline float gr_branchless_clip(float x, float clip)
-{
- float x1 = fabs(x+clip);
- float x2 = fabs(x-clip);
- x1 -= x2;
- return 0.5*x1;
-}
-
-
#endif /* _GR_MATH_H_ */