What does "compensator" mean?

Compensator: (Naut.) An iron plate or magnet placed near the compass on iron vessels to neutralize the effect of the ship's attraction on the needle.

Sources