I’m seeing weird behaviour when using the notch filter. I’ve set it at 218Hz, 20Hz BW, 15dB attenuation and I lose all control of my quad. So I’ve been digging into the maths a bit in Filter/NotchFilter.cpp and I would dearly love someone to explain what is going on. The implementation is not like betaflight’s notch filter which seems to be mostly a copy of https://github.com/wooters/miniDSP/blob/master/biquad.c which is an implementation of http://shepazu.github.io/Audio-EQ-Cookbook/audio-eq-cookbook.html
In the commentary for both of those it indicates that the attenuation is only used for peaking and shelving filters. Whereas the AC implementation is using the gain and manipulating the coefficients in a way that does not look like any of the BiQuad filters described. Before I start diving in and creating an alternative implementation can anyone tell me what the underlying maths is for the existing one? I’m assuming that either the implementation is wrong or that the configuration yields bizarre results, and it’s too difficult to decipher what is going on.