Thank you for your reply.That's a rather ingenious way to measure displacement.
Why not use a linear resistance coil or track or even a 10-turn pot with a rack and pinion or a flex band. A voltage divider circuit is a lot simpler, more linear, accurate and stable.
You could even use the same coil as variable linear resistor by scraping off the insulation and putting a wiper on it.
In fact, the environment that the device will work is a harsh environment because maybe oil penetrates inside the device, and mechanisms base on electrical connection may be failed.