Imagine you enjoy automation, and have a friend who makes beer.
tl;dr: How would you mathematically correlate a scale of 7.2 to 2.5 (starts from 7.2 and goes down) to a scale of 1.060 to 1.000? Bonus points for a relation that projects further, i.e. if the start is more than 7.2 it would reflect a respectively larger starting number on the other scale
While working your automation magic, you come across the following issue:
There is a hydrometer floating in water at a certain depth. At this depth, 2.5 cm of it is sticking out of the water. Put it in some dense wort ("almost-beer" juice, the stuff you ferment to make beer), and it will stick out 7.2 cm above water level.
As the beer ferments and the alcohol percentage increase, the hydrometer will slowly sink. You measure this sinking motion with a distance sensor. How would you correlate this sink, i.e. increasing distance of the hydrometer from the sensor, to the scale of 1.060 down to 1.000 which the hydrometer describes?
Minimum height of hydrometer in liquid (in water) = 2.5 cm above liquid level. The densor the liquid, the higher the hydrometer will sit in the liquid.
Distance between sensor and liquid: 18 cm. Meaning that in water, the hydrometer is 15.5 cm away from the sensor.
If there are any parameters you think would be useful, just ask for them in the comments