summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan-safar <jan.safar@gla-rrnav.org>2018-02-09 12:29:10 +0000
committerMarcus Müller <marcus.mueller@ettus.com>2018-03-30 16:50:32 +0200
commitaa2bc60b2ba07133115dd8e88084b5900a5290be (patch)
tree62194a8e63f5c5455f49ec0c0bdc8c6c88198543
parent2a5c8804218eb3f8223a5152a1e4c96e6bc01097 (diff)
channels: interpolate `dist` with `M_PI`, not `2*M_PI`
The multiplication by 2 in the sinc() function argument appears to be a mistake. It, for example, results in signal paths with a delay of 0.5 sample time being completely ignored. https://en.wikipedia.org/wiki/Sinc_function
-rw-r--r--gr-channels/lib/selective_fading_model_impl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-channels/lib/selective_fading_model_impl.cc b/gr-channels/lib/selective_fading_model_impl.cc
index dfd7b74ca9..3594ec4aa0 100644
--- a/gr-channels/lib/selective_fading_model_impl.cc
+++ b/gr-channels/lib/selective_fading_model_impl.cc
@@ -95,7 +95,7 @@ namespace gr {
gr_complex ff_H(d_faders[j]->next_sample());
for(size_t k=0; k<d_taps.size(); k++){
float dist = k-d_delays[j];
- float interpmag = d_sintable.sinc(2*M_PI*dist);
+ float interpmag = d_sintable.sinc(M_PI*dist);
d_taps[k] += ff_H * interpmag * d_mags[j];
}
}