Well now you have been bamboozled by all the maths let's take it to a simple level (excuse the pun).
The sensor is a little above the bottom does it matter? you could just use an offset i.e. add the un-measured volume below the sensor if you want.
Calculate the volume in litres by measuring the tank ignoring the temperature & barometric pressure to display it in what ever units you want as it probably will not matter in your case.
Just a level then scale it from 0-100% (adding the bottom offset if you want).
Here is a simple calculator that will give you the required units based on the tank dimensions.
https://www.calculatorsoup.com/calculators/construction/tank.php
If you just want 0-100% and the level below the sensor is small or not really relevant then just start with an empty tank take the analogue reading and it should be 0 if you want to check just add water until you get some increase on the reading probably close enough for your purposes this is the min Raw.
Fill the tank to the upper level you consider full, note the analogue reading this is the max raw.
using the scale formula for example scaled min = 0 scaled max = 100 (%)
(((Scaled Max-Scaled Min)/(Max Raw Input-Min Raw Input))*(Raw Input-Min Raw Input))+Scaled Min = Scaled Value
If you want it in litres then calc the volume of the tank in litres and this becomes the scaled max.
The sensor is a little above the bottom does it matter? you could just use an offset i.e. add the un-measured volume below the sensor if you want.
Calculate the volume in litres by measuring the tank ignoring the temperature & barometric pressure to display it in what ever units you want as it probably will not matter in your case.
Just a level then scale it from 0-100% (adding the bottom offset if you want).
Here is a simple calculator that will give you the required units based on the tank dimensions.
https://www.calculatorsoup.com/calculators/construction/tank.php
If you just want 0-100% and the level below the sensor is small or not really relevant then just start with an empty tank take the analogue reading and it should be 0 if you want to check just add water until you get some increase on the reading probably close enough for your purposes this is the min Raw.
Fill the tank to the upper level you consider full, note the analogue reading this is the max raw.
using the scale formula for example scaled min = 0 scaled max = 100 (%)
(((Scaled Max-Scaled Min)/(Max Raw Input-Min Raw Input))*(Raw Input-Min Raw Input))+Scaled Min = Scaled Value
If you want it in litres then calc the volume of the tank in litres and this becomes the scaled max.