A compass is a device which can determine a direction on the Earth, usually used for navigation. A compass may be aligned to either magnetic north or true North, or occasionally to an arbitrary direction based on the location of celestial bodies. Magnetic north is the direction of the north tip of the Earth's magnetic field, while true North is the direction in which the Earth rotates.
The most common type of compass is a magnetic compass, which is used to ascertain the direction of magnetic north. A magnetic compass is made by placing a bit of magnetized iron or steel in a setting of low friction so that it is allowed to move about freely. In most compasses, the north-end of the metal piece is marked, most often with red paint, so that all directions may be ascertained.
The use of the magnetic compass can be traced back as far as 4th century BC China, where a type of magnetite known as lodestone was used as a tool in a type of divining magic known as geomancy. The Chinese mastered the use of magnetic iron for navigation by the beginning of the 12th century, and its use quickly spread to Europe and beyond. By the beginning of the 13th century, Arabs were using the magnetic compass in navigation, and by the beginning of the 14th century, an Italian had created what would be recognizable to modern eyes as a mariner's compass.
A gyrocompass is a special type of compass developed in the late 19th century, which ascertains true North, rather than the somewhat more fickle magnetic north. A gyrocompass is essentially a very fast spinning wheel or ball, which utilizes the law of conservation of angular momentum and the spinning of the Earth's axis to point towards true North. The gyrocompass is commonly used on large ships, and in other situations where a more accurate reading of north is required.
An astrocompass is another type of compass which can find true North rather than magnetic north. An astrocompass relies on the position of celestial bodies to find true North, which is useful in a number of situations, particularly at the far north and south poles, where magnetic compasses become unreliable and gyrocompasses often cease working. One requires a fair amount of information to utilize an astrocompass properly, including the time, date, and longitudinal and latitudinal location, as well as an astronomical chart such as a nautical almanac. Given this information, a person may fix upon a known star and determine the exact direction of true north.
In the digital era, solid state compasses are becoming increasingly common as well. These use a number of electronic magnetic sensors which calculate the precise direction the compass is pointing.
GPS compasses are quickly replacing many traditional compasses for personal use, though most ships and military operations have a gyrocompass or magnetic compass on hand in case a GPS cannot pick up enough satellites. GPS compasses make use of satellites in a geo-synchronous orbit over the Earth to discern the bearer's exact location and the direction they are heading. Because of the ease of use and relative reliability of the GPS compass, many hikers and drivers favor it. As with all electronics, however, the GPS compass is susceptible to a number of problems, and it is recommended that most hikers have a backup form of navigation available as well.