There are several "Encoders that provide analog output the first (simplest) would be a potentiometer with gear or other mechanical coupling and the second would be a Linear "Transformer" which is a transformer with a single winding (Usually) as the driven movable "Source" and two secondary windings so wired that they can extract "Phase" differences between the primary and secondary and secondary windings and there are others that sense "M" or the coefficient of coupling between two windings one stationary and one movable. There are more but I haven't yet finished my morning coffee...
Bob