- Earth's magnetic field is normally uniform, but can be distorted by hard and soft iron distortions.
- Hard iron distortions are caused by permanent magnets adding a constant offset, while soft iron distortions are caused by magnetically permeable materials distorting the field.
- To compensate for these distortions, hard iron offsets are subtracted from readings and soft iron scale factors are multiplied to readings based on data from rotating the sensors.