It is important to note that this range formula applies to both transmission and reception. If you are at 5,000 feet and a distant ground station is also at significant altitude (say, on a hilltop at 2,000 feet), the combined range is greater than if the station were at sea level. This is why communication with high-altitude ground stations is often possible from farther away.