Add a js function for calculating the maximum location height more accurately