Boat autopilot - PID not centralizing rudder.

The wind direction at the mast head will be different from the wind level lower down, though. Whatever you do will be a compromise because the wind is not uniform and no single measurement can give you an accurate answer.