mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Fixed notch Q calculation to be dimensionless as it should (#5529)
* Fixed notch Q calculation to be dimensionless as it should * Get rid of one division and leverage multiply-accumulate instr
This commit is contained in:
parent
0c7ae49464
commit
172642383d
3 changed files with 4 additions and 10 deletions
|
@ -281,7 +281,7 @@ void gyroDataAnalyseUpdate(biquadFilter_t *notchFilterDyn)
|
|||
// 7us
|
||||
// calculate new filter coefficients
|
||||
float cutoffFreq = constrain(fftResult[axis].centerFreq - DYN_NOTCH_WIDTH, DYN_NOTCH_MIN_CUTOFF, DYN_NOTCH_MAX_CUTOFF);
|
||||
float notchQ = filterGetNotchQApprox(fftResult[axis].centerFreq, cutoffFreq);
|
||||
float notchQ = filterGetNotchQ(fftResult[axis].centerFreq, cutoffFreq);
|
||||
biquadFilterUpdate(¬chFilterDyn[axis], fftResult[axis].centerFreq, gyro.targetLooptime, notchQ, FILTER_NOTCH);
|
||||
DEBUG_SET(DEBUG_FFT_TIME, 1, micros() - startTime);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue