You'll get reasonable accuracy by dividing a little over the max voltage say 40v down to 5v for the adc, then you'll have 40/1024 (for a pic on full res) which is 40mV resolution, should be more than enough for a truck driver.
And if you take fairly slow adc readings say twice per second and then average them by 64 (right shifting 6 places) every 32 seconds you'll have a reasonable average of battery voltage, it will still vary if the trucks moving or lifting but if you look at some of the commercial ones made by curtis they do the same.
Put a fuse in the sense wire, current from these batteries is scary during a short.