A wind vane is a device which determines the direction that the wind is blowing and is used by the autopilot or pilot to set a heading.