Space
Magnetic compasses only work in a magnetic field. Since Earth acts as a magnet, this doesn't pose a problem on this planet. If explorers were to voyage out into space however, a compass would be useless. If any magnetic objects were nearby, the compass would point towards them; otherwise, it would point in no particular direction. Either way, the astronauts would need to rely on other means for their navigation.
Electrical Current
Moving charges like those in a current-carrying wire create a magnetic field. The magnetic field around high-tension power lines or telephone wires can affect compass performance at distances as great as 30 feet (even more for a high-tension power line). The compass may appear to be slightly off, or it may even point in the wrong direction. Metal objects like field guns, trucks, tanks, iron ore deposits or machine guns can also affect the performance of your compass at fairly close range.
Demagnetized Compass
Touching a compass with a strong magnet can change the polarity of the compass needle. Breaking a compass or exposing it to high heat may demagnetize it entirely. In any of these situations, the direction of the compass may cease to reflect true north and it will no longer be useful for navigation. Consequently, it's best to check your compass periodically to make sure it is in good working order.
Aircraft Navigation
The compass points to the magnetic pole, which is actually 1,300 miles away from the geographic north pole. Pilots call this difference between magnetic and geographical north the variation and must take it into account when navigating. Also, when banking into a northerly turn, pilots will find that due to the tilt of the compass card, the compass needle lags, while when they are banking into a southerly turn they will find the compass needle leads.