This paper describes a Kalman filter design to estimate orientation of human body segments by fusing gyroscope, accelerometer and magnetometer signals. Ferromagnetic materials near the sensor disturb the local magnetic field and therefore the orientation estimation. The magnetic disturbance can be detected by looking at the total magnetic density and a magnetic disturbance vector can be calculated. Results show the capability of this filter to correct for magnetic disturbances.