A two-axis fluxgate sensor has a driving pulse generating circuit which
generates pulse signal and outputs as a driving signal, and X-axis and
Y-axis fluxgates which are in proportional relation with each other. The
two-axis fluxgate sensor generates voltage values of X-axis and Y-axis
fluxgates corresponding to the magnetism which is generated from the
driving signal, and a memory stores therein a neural network weight
matrix. When the voltage values of the X-axis and Y-axis fluxgates are
measured, a control unit compensates for the voltage values by using the
neural network weight matrix which is stored in the memory, and computes
an azimuth angle by using the compensated voltage values. An accurate
azimuth angle can be obtained even at slopes.