How do I calculate the position of a piston in percentage from the significant bits?
It depends on the resolution you want. 10 bits will give you a range of 1,024 to 1(000H - 7FFH), or a rounded off scale of 00.0 to 99.9%. 7 bits gives you a range of 127 to 1(00H - 7FH), or round it off to 00 to 99%. Add +1 so the final max reading should be 100%.

Please note this does NOT represent the actual torque or position of the solenoid as it is very non-linear with position. To convert the voltage or current of the solenoid to a torque value you will need to use a calibrated torque gauge to create a look-up table (LUT).

The first step is to make sure that a fully ON solenoid reads as 100% by coercing the maximum possible reading to be no greater than 100, then see how it scales downward to zero as the solenoid drive is reduced. If the scale makes sense you will not need to create a complex LUT.

An option would be to install a linear potentiometer, but they can be expensive compared to a software solution.