I've had a Eureka moment with the sonar.
1) When it is enabled (RNGFND_PIN = 0) sit it on the ground. Go into 'Initial Setup', 'Optional Hardware', 'Sonar' and record the average voltage that gets displayed while it is sitting on the ground. With my Maxbotics LV-EZ04 it is consistently around 0.04-0.05 volts.
2) Go into 'Config/Tuning', 'Full Parameter Tree', 'RNGFND', and change the 'RNGFND_OFFSET' value to the opposite of the voltage recorded above. i.e. if you recorded 0.05, then set the value to -0.05.
3) Tether the quad a metre or so above the ground and get a reasonably accurate measurement of the height.
4) Go back into 'Initial Setup', 'Optional Hardware', 'Sonar' and record the voltage that displays when the altitude displays close to your measured altitude (flickers around a bit).
5) Calculate the scaling using this formula
(measured voltage from step 4 - RNGFND_OFFSET) / measured height
6) Record the value in the RNGFND_SCALING value and compare the measured altitude with the calculated altitude displayed in the 'Initial Setup', 'Optional Hardware', 'Sonar' screen
My altitude is within 20mm at all heights, how good is that?