summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2016-07-14 10:18:21 -0400
committerBen Hilburn <ben.hilburn@ettus.com>2016-07-14 10:18:21 -0400
commit7c9f29519b709c432284fb6481842f03809ac594 (patch)
tree66aff20959658b39ba2ccc30e300afbddbe827f6
parentcc58cdd730b7e680ded447ee8f8cff305c83ecbb (diff)
Fixing `Sdot` calculation in `fmdet_cf_impl` `work()`
Bug reported on-list. Current code actually results in the S1 terms simply canceling each other, whereas the second term should be S2.
-rw-r--r--gr-analog/lib/fmdet_cf_impl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-analog/lib/fmdet_cf_impl.cc b/gr-analog/lib/fmdet_cf_impl.cc
index 2c48ff07e2..38496d189b 100644
--- a/gr-analog/lib/fmdet_cf_impl.cc
+++ b/gr-analog/lib/fmdet_cf_impl.cc
@@ -106,7 +106,7 @@ namespace gr {
while(size-- > 0) {
S0 = *iptr++;
- Sdot = d_scl * (-S0+d_8*S1-d_8*S1+S4);
+ Sdot = d_scl * (-S0+d_8*S1-d_8*S2+S4);
d_freq = (S2.real()*Sdot.imag()-S2.imag()*Sdot.real()) /
(S2.real()*S2.real()+S2.imag()*S2.imag());