A draw-wire position sensor that uses a rotary encoder to count the draw distance and a tape measure spring for retraction of the wire/string.
I couldn't find a model for a draw-wire position sensor so I created one.
This one has dimensions suitable for around 4000 mm of string.
Here is a sample video of the string being retracted
The author hasn't provided the model origin yet.