A simplified algorithm for the nonlinear tuning of a compensator of the magnetic interference produced by the scalar magnetometer of an aircraft is investigated. It is shown that the nonlinear problem can be reduced to a linear problem by also considering the direct compensation of the nonlinear component.