We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ed4f89 commit c1fde63Copy full SHA for c1fde63
src/main/flight/dyn_notch_filter.c
@@ -349,10 +349,8 @@ static FAST_CODE_NOINLINE void dynNotchProcess(void)
349
350
// Estimate true peak position
351
const float denom = y0 + y1 + y2;
352
- if (denom != 0.0f) {
353
- float upper_ratio = y2 / denom;
354
- float lower_ratio = y0 / denom;
355
- meanBin += upper_ratio - lower_ratio;
+ if (denom != 0.0f) {
+ meanBin += (y2 - y0) / denom;
356
}
357
358
// Convert bin to frequency: freq = bin * binResoultion (bin 0 is 0Hz)
0 commit comments