I switched from madgwick filter to another AHRS library, since madgwick does not use magnetic field for more accurate measurement. I also added calibration to the sensors. To get the calibrated setup values, we need to rerun the example calibration code from the AHRS library (eg DIY_Calibration_Magnetometer) once the hardware enclosure and PCB are finished. This is due to magnetic field being affected by the specific setup of the hardware.
I switched from madgwick filter to another AHRS library, since madgwick does not use magnetic field for more accurate measurement. I also added calibration to the sensors. To get the calibrated setup values, we need to rerun the example calibration code from the AHRS library (eg DIY_Calibration_Magnetometer) once the hardware enclosure and PCB are finished. This is due to magnetic field being affected by the specific setup of the hardware.