To solve the problem wherein enormous calculation is required to determine the offset with high accuracy, in an azimuth sensor for calculating the offset of a magnetic sensor from an output of the magnetic sensor.
The azimuth sensor includes the magnetic sensor 1 for detecting terrestrial magnetism, an offset calculation means 2 for calculating an offset which is the center coordinates of an output of the magnetic sensor; a memory means 3 for storing the output of the magnetic sensor, a distance calculation means 4 for calculating the distance from the present offset; a coordinate point selection means 5 for selecting a coordinate point; an offset updating means 6 for repeatedly updating the offset of the magnetic sensor, based on the selected coordinate point, and an azimuth calculation means 7 for correcting the output of the magnetic sensor, by using the offset calculated by the offset calculation means; and thereafter calculating the azimuth; and thereby, the offset 8 can be accurately determined and consequently, the true azimuth 8 can be calculated accurately.