Analyser for quadrature encoder

you have it right now, your analyzer is definitely not correct. I only know X4 quadrature encoders and they are very common. I do not care too much about “Position” and “rate”, because I can convert it externally, so I would focus on a basic X4 implementation.
also check out the other request: