No filtering on the mag. You can do so on the host.
I update the sketches when I find errors but they are not canned programs right for every application so use at your own risk.
The Madgwick function expects:
Madgwick(Naccel, Eaccel, Daccel, Ngyro, Egyro, Dgyro, Nmag, Emag, Dmag);
where...