To reduce the number of part items and the number of assembling steps by performing detection of the quantity of magnetism and the ratio of the amount of magnetism in X and Y axis directions of a three-dimensional stereoscopic space represented by X, Y and Z axes while taking the Z axis as the gravity direction of the earth, with one magnetoresistance element.
A bobbin is provided with a bias coil 4 and a bias coil 5 intersecting this coil and these coils are formed in such a manner that when currents are supplied to the coils 4 and 5, the directions of their biased magnetic fields take angles of 90 degrees to each other. The coil 4 is provided with an applied current oscillator 17, the coil 5 is provided with an applied current oscillator 18 and AC rectangular wave currents are supplied by one pulse alternately to the coils 4 and 5. Then, the output of a magnetoresistance element is detected in synchronization with the positive and negative timings of the AC rectangular wave currents, a difference between these is amplified by an amplifier circuit 10 including a bypass filter 9 and the magnetic sensor outputs of X and T axes are obtained. Each of these magnetic sensor output is inputted through an A/D converter 11 to a microcomputer 12, magnetic declination is calculated and a magnetic azimuth output 13 is obtained.