About possibility of implementing kalman filter on atmega32
Sure, it can be done, and simply enough. Here is an implementation in C that could be easily adapted.

It won't be as fast as Mahoney, of course, but the calculations are possible. The question is, is it fast enough for your usage?