Cylinder Widget Help

Cylinder Widget Help

Hi, 

I have a Lidar distance sensor in a Cattle water trough to measure the water level.

A full water trough gives me a distance of 22cm
An empty water trough gives me a distance of 45cm

How would I go about translating this to the cylinder widget where 22cm would read 100% and 45cm being 0%?

Many thanks,
Martin