Flying we always had one. In a plane it's easy. You go to a runway that has special marks on the pavement in the shape of a circle. You taxi the plane into the circle at different angles and look at the compass, noting the needed corrections.
I ought to make one for our boat. Maybe the travel lift guy will shift around to 8 points of the compass and hold still, so I can get some accuracy? Probably not.