There are certain circumstances when magnetic compasses and gyrocompasses are unreliable. The most obvious is in polar regions, where the force exerted on the needle of a magnetic compass is nearly vertical and gyrocompasses become unstable due to the rotation of the Earth. Magnetic compasses are also particularly susceptible to magnetic fields, such as those produced by the hulls of some metal vehicles or craft. Before the advent of electronic navigational aids such as GPS the most reliable way to ascertain north in such circumstances was through the use of an astrocompass.
The earth's axis of rotation remains, for all intents and purposes, stationary throughout the year. Thus, with knowledge of the current time and geographical position in the form of latitude and longitude, which are set on the instrument using dials, an astrocompass can be sighted on to any astronomical object with a known position to give an extremely accurate reading.
In its most basic form, the astrocompass consists of a base plate marked with the points of the compass, with a mechanism known as an equatorial drum mounted on it. On this drum is a set of adjustable sights and a scale of declination. More advanced versions may have built-in chronometers or default settings for bodies such as the Sun.
To use the compass, the base plate is first levelled with the horizon then pointed roughly to what the user believes to be north. The equatorial drum is then tilted in relation to this base according to the local latitude. The sights are then set using the local hour angle and the declination of whatever astronomical body is being used. Once all these settings have been made, the astrocompass is simply turned until the astronomical body is visible in the sights: it will then be precisely aligned to the points of the compass. Because of this procedure, an astrocompass requires its user to be in possession of a nautical almanac or similar astronomical tables, one of its chief disadvantages.
Astrocompasses only became useful following the invention of the marine chronometer, without which it is almost useless for navigation. Even then, they saw only limited use, with first magnetic compasses and then gyrocompasses being preferred in almost all cases. Polar exploration was one of the fields in which the astrocompass saw the most use, for the reasons described above. They have also been used throughout history in other climes to check the accuracy of other forms of compasses: they saw use, for example, in the North African Campaign of World War 2.