Calculate the average frequency from a set of samples, and then
calculate the estimated Z height from that frequency. This may
improve accuracy, as the frequency to Z height is not linear and
averaging after the non-linear transform could bias the results.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>