How to build a steering wheel sensor

Do you really want to know the (centre only?) position of the rudder, or what point the rudder is in to make the boat go dead ahead? Because the two are not the same. On top of that a sailboat under sail is of course most of the time not going in the direction the bow is pointing.