Exactly. Only in this case the working fluid is a liquid, but the concept is exactly the same. The only thing that needs done then is to figure out a means of measurement. I would suggest using a steel (able to be attracted by a magnet) ball in the tube, and wire coiled around the outside in several sets. The ball induces a current in the wire (like at a stop light) and the position of the ball can be determined.
__________________
|