Here's an excerpt of a great past article from BoatUS.
A Low-Tech Necessity
Compasses, used on boats for centuries, work because a permanently magnetized needle always points to north, irrespective of the position of the boat. Many boaters think that, in these days of modern electronic-charting aids, compasses are no longer needed. Nothing could be further from the truth. A magnetic compass requires no electricity to operate, so it could be the one piece of navigational equipment that still operates on your boat when the proverbial you-know-what hits the fan.
As the boat turns, the compass continues to point at magnetic north, and the course is shown (relative to magnetic north) in reference to a line, which represents the boat's heading. A compass has what is known as the "card," divided into 360 degrees. Thus, if the card reads 90 degrees, you will be steering a course due east; 180, due south; and so on.
For a compass to work well, it has to be correctly installed and properly adjusted. Unfortunately, on a large number of boats, the compass has been installed incorrectly. And with the ever-increasing strain on dashboard real estate, the compass is often pushed out, literally. Electrical interference from chartplotters, radios, speakers, and other electronic aids may affect compasses if they are too close to each other, so an effort should be made to keep these as far away from the main steering compass as possible. A good minimum is 12 inches.
The skipper needs to be able to easily see the main steering compass. This usually means that it must be placed directly in front of the helm position with what is known as the lubber line — two pins or some type of marking — parallel to the centerline of the boat. The skipper merely glances down to see the course being steered.
When North Is Not North
In a perfect world, a compass would always point to true north, but there are factors that make this not so. Two errors have to be accounted for: variation and deviation. Magnetic north is not the same as true north, and this difference is written on the compass rose on the chart of the area you're cruising. This difference, in degrees, between true and magnetic, is known as variation, which must be compensated for when plotting a position.
A nautical chart has two compass roses, one inside the other. The outer one always points to true north, and the inner shows, in degrees and minutes, the variation in the area, either east or west of true north. Variation, which is caused by differences in Earth's structure, differs from area to area and changes by a very small amount each year. This is annotated on the chart inside the inner compass rose. For example, variation changes from about 16 degrees west in Maine to 6 degrees in Florida and 0 degrees in Louisiana.
The other compass error that must be accounted for is deviation. Deviation refers to errors in the compass itself that cannot be adjusted out. Factors that affect deviation include nearby boat electronics, electrical wiring, metal fittings, and radio equipment. Other things, such as the boat's engine, may also affect deviation. Anything magnetic (such as speakers) placed close by will surely increase deviation. To calculate the error in the compass, it must be "swung," whereby the boat is put on several known headings that are checked against the compass reading. This is typically done by lining up a set of transit marks and comparing the boat's course to the indicated reading. Any error is corrected by adjusting the built-in magnets on the compass, which are attached to compensator rods.
To keep track of compass deviation, you'll need a deviation card, which shows the difference in degrees between the compass reading and the actual course shown on the compass. Compasses that are professionally adjusted will be supplied with a card. But if you do the adjustments yourself, you need to make up your own card. Deviation should be no more than a few degrees on each heading, while variation could be quite a bit more, depending on location. Both deviation and variation (each of which may be added or subtracted) must either be accounted for when working out the plot on the chart or when communicating a compass course to steer to the helmsman.
Practice steering a compass course rather than following the chartplotter. It takes some getting used to, but when you need it, you'll know how to do it. You'll have more situational awareness and less strain on your eyes. On a sailboat, an added bonus is that steering by compass can keep you attuned to the wind. As the wind shifts, you may be able to harden up or crack off a few degrees, rather than trying to follow that line on the plotter. Novice helmsmen often complain that the compass is constantly moving, but it's worth remembering that the compass does not move. It's the boat that's moving!
A properly installed and adjusted compass is a valuable navigation tool. Buy the best one your budget will allow, and take good care of it. You'll be rewarded with years of service and accurate