[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/05: channels: use correct number of sinu
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/05: channels: use correct number of sinusoids |
Date: |
Sun, 14 Feb 2016 16:33:14 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch next
in repository gnuradio.
commit 9753ff4d521b74328bdccc2783e8a8e5ac31362e
Author: Bastian Bloessl <address@hidden>
Date: Wed Feb 10 14:47:46 2016 -0800
channels: use correct number of sinusoids
---
gr-channels/lib/flat_fader_impl.cc | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gr-channels/lib/flat_fader_impl.cc
b/gr-channels/lib/flat_fader_impl.cc
index 29b3dda..729e5d5 100644
--- a/gr-channels/lib/flat_fader_impl.cc
+++ b/gr-channels/lib/flat_fader_impl.cc
@@ -63,18 +63,18 @@ namespace gr {
gr_complex flat_fader_impl::next_sample(){
gr_complex H(0,0);
- for(int n=1; n<d_N; n++){
- float alpha_n = (2*M_PI*n - M_PI + d_theta)/(4*d_N);
+ for(int n=1; n<=d_N; n++){
+ float alpha_n = (2*M_PI*n - M_PI + d_theta)/(4*d_N);
#if FASTSINCOS == 1
- float s_i =
scale_sin*gr::fxpt::cos(gr::fxpt::float_to_fixed(2*M_PI*d_fDTs*d_m*gr::fxpt::cos(gr::fxpt::float_to_fixed(alpha_n))+d_psi[n+1]));
- float s_q =
scale_sin*gr::fxpt::cos(gr::fxpt::float_to_fixed(2*M_PI*d_fDTs*d_m*gr::fxpt::sin(gr::fxpt::float_to_fixed(alpha_n))+d_phi[n+1]));
+ float s_i =
scale_sin*gr::fxpt::cos(gr::fxpt::float_to_fixed(2*M_PI*d_fDTs*d_m*gr::fxpt::cos(gr::fxpt::float_to_fixed(alpha_n))+d_psi[n]));
+ float s_q =
scale_sin*gr::fxpt::cos(gr::fxpt::float_to_fixed(2*M_PI*d_fDTs*d_m*gr::fxpt::sin(gr::fxpt::float_to_fixed(alpha_n))+d_phi[n]));
#elif FASTSINCOS == 2
- float s_i =
scale_sin*d_table.cos(2*M_PI*d_fDTs*d_m*d_table.cos(alpha_n)+d_psi[n+1]);
- float s_q =
scale_sin*d_table.cos(2*M_PI*d_fDTs*d_m*d_table.sin(alpha_n)+d_phi[n+1]);
+ float s_i =
scale_sin*d_table.cos(2*M_PI*d_fDTs*d_m*d_table.cos(alpha_n)+d_psi[n]);
+ float s_q =
scale_sin*d_table.cos(2*M_PI*d_fDTs*d_m*d_table.sin(alpha_n)+d_phi[n]);
#else
- float s_i =
scale_sin*cos(2*M_PI*d_fDTs*d_m*cos(alpha_n)+d_psi[n+1]);
- float s_q =
scale_sin*cos(2*M_PI*d_fDTs*d_m*sin(alpha_n)+d_phi[n+1]);
+ float s_i = scale_sin*cos(2*M_PI*d_fDTs*d_m*cos(alpha_n)+d_psi[n]);
+ float s_q = scale_sin*cos(2*M_PI*d_fDTs*d_m*sin(alpha_n)+d_phi[n]);
#endif
H += gr_complex(s_i, s_q);