The magnetic compass originated in China and was in use in Europe by the
twelfth century. By the sixteenth century, instrument makers were equipping
compasses with gimbal mounts so that they would remain horizontal even though
the ship might be unsteady. Also, having recognized the problem of magnetic
variation (that is, the position of a magnetic needle varies from place to
place), they made azimuth compasses that
could be aligned with true north.
Simple marine compasses have a magnetized needle attached to the bottom of a
paper card, and are inherently unstable. Since the 1850s, scientists and
instrument makers have struggled to solve this problem. One solution, pioneered
by E. S. Ritchie in the United States, was to float the magnetic needle in a
bowl of liquid. Another solution, this one pioneered by William Thomson in
Scotland, was to build stabilizing elements into dry card compasses.
Ref: "Magnetic Compass" in Robert Bud and Deborah Warner, eds., Instruments
of Science. An Historical Encyclopedia (New York & London, 1998), pp.
134-136.