The circuit I posted previously can be easily modified to output 0 to 10V
Change:
R1a to 56k
R2a to 16k
Increase the 5V supply to 10V.
Increase the op-amp supply to 15V or use a rail to rail op-amp and run from 10V.
**broken link removed**
I told you how to use a differential amplifier to do this before.
Use a voltage reference set to 32V and use a differential amplifier with a gain of 1 to measure the difference between the 32V reference and the battery.
It's not the best way of doing it because you need a 32V reference and the op-amp needs to be run from 24V so it's inputs can work up to 22V.