Calculating Altitudes of Distant Objects


Sometimes, we want to predict how high above (or below) the astronomical horizon a distant object, such as a mountain, will appear. This depends on both the curvature of the Earth, and the curvature of the ray along which light travels from the object to the eye.

But the ray curvature depends on the atmospheric lapse rate, as described on the bending page.

This page provides a simple JavaScript program to estimate the apparent altitudes of distant objects.

CAUTION: The real atmosphere does not have a constant lapse rate, but is full of complicated structure! The calculator here is a sort of toy that you can play with to see how sensitive refraction is to changes in average lapse rate. But don't take its results too seriously; it's really an overly simplistic computer game, not a serious scientific tool.


Lapse Rates

Because the lapse rate usually is neither constant nor accurately known, it would be misleading to pretend to calculate the result very accurately. So approximations like those developed on the bending page will be used here. (In fact, I'll adopt the numerical values published in my 2006 paper in The Observatory : the ratio of curvatures k  is

k  = (35 − γ)/150 ,
where γ is the lapse rate, in Celsius degrees per km.)

To begin with, we know that the 6.5°/km lapse rate of the Standard Atmosphere is unrealistic. So let's do the calculation for any specified lapse rate, γ.

We can either set the lapse rate directly, or calculate it from the temperatures at two different heights. The scripts used below allow both options.

The Algorithm

There are several possible ways of doing the calculation. The method I follow here may not be the most direct, but I hope it offers some insight into what's involved. (At least, it offers some insight into how I think about these things; my thinking is strongly influenced by Wegener's work.)

Assuming a constant lapse rate greatly simplifies the problem. Then, provided that the rays are nearly horizontal, and that the thickness of the layer they span is much smaller than the 8 km reduced height of the atmosphere, the rays are nearly arcs of circles; so we can make use of many simple results for this case, like Lambert's (1759) demonstration that such refraction produces a nearly undistorted image of distant objects that is simply displaced in the vertical direction. (Cf. the bending page, and the discussions of terrestrial refraction, and of looming and sinking.)

Therefore, if we can find the apparent altitude of any  point of the distant object, we can easily find the altitudes of all the others. (See the simulations of looming and sinking for ray-traces of examples.)

A second simplification is that good approximations for the dip and distance of the horizon are available in closed form for this case. Both can be calculated from simple geometry if we adopt an effective curvature for the Earth that's the difference  of curvatures of the actual surface and the circular ray. It's as if the Earth's radius of curvature R  had been replaced by  Reff  = R / (1−k ) , where k  is the ratio of curvatures discussed above. In particular, the distance formula (which will be used shortly) can be written as

d2 =  2hReff  =  2hR / (1 − k ) ,

where d  is the distance to the horizon, and h  is the height of the eye above the level surface that forms the apparent horizon.

NOTE: If the observer is in a duct, the ray curvature exceeds the Earth's curvature; so k  becomes greater than unity. That makes this equation for d2 negative. Physically, what happens is that any ray that can reach the observer's eye meets the surface at an angle; there's no horizon at all, in the sense of a ray that is tangent to the surface. So the calculator here gives up: it's meaningless to ask for the distance to the horizon.

The dip- and distance-formulae apply to any ray tangent to a spherical surface of radius R ; such a ray is horizontal at the point of tangency. The same geometric relations apply to any spherical surface; it doesn't have to be the Earth's surface. We can choose the surface to be a level surface through the observer, so that the point of tangency is at the observer's eye. Then the height h  is the height of this ray above the eye, at a distance d  from the observer.

So let's consider a horizontal ray at the observer: everything along this ray appears at the observer's astronomical  horizon. The following diagram shows the details.

Geometry for altitude calculation Here, the arc AB represents the surface of the Earth, with center at C. The observer at O is a height Hobs above A. The dashed arc OD represents a level surface at the height of the observer.

The heavy arc OH is the ray that's horizontal at the observer ; so any point on it is seen at the observer's astronomical horizon. It's usually less curved than the Earth, so that's how I've drawn it. Q is the center of curvature of the ray OH , whose radius of curvature is (R / k ).

The observer sees a target point, T, located a height Htarget above the point B on the Earth's surface. (I omit the ray connecting O to T, as we don't really need it.) The line CBDHT is the local vertical through T, just as CAO is the local vertical at the observer. The angle θ between these two verticals is rarely as large as 2 or 3 degrees; it has been grossly exaggerated in the diagram. (Likewise, the heights of all the points above the Earth's surface — again, grossly exaggerated in the drawing — are negligible, not only in comparison to the Earth's radius, R , but also in comparison to the horizontal distance between A and B , or O and D.)

Because θ and the heights are all so small, we can regard all the points B, D, H and T as being practically the same distance d  from O.

If we use the level surface OD instead of the Earth's surface AB, the distance formula still applies, provided that we use the height difference between H and O (or H and D, which is the same height above B as O is above A) as the height h  in the formula; that is, h  = DH = HH − Hobs.

So, solving the distance formula for h , we have:

h  =  d2 (1 − k ) / 2R .

And as this is just the difference between HH and Hobs, we find that HH = Hobs + h .

But, as every point on OH appears at the observer's astronomical horizon, in particular the point H is seen on that horizon; so its altitude is exactly zero. So the height of H provides a reference point of known altitude, to which we can refer every other point on the vertical BDHT.

That means that the angular altitude of the target T above the observer's astronomical horizon is just the angle subtended by the height difference (Htarget − HH) at a distance d . This angle is (Htarget − HH/ d  radians, because the (assumed) constant lapse rate produces no image distortion.

So, to sum up: we first use the lapse rate to determine the ray curvature. We then use the ray curvature to find the height of the observer's astronomical horizon, HH, at the distance d  of the target. Finally, we find the angular  height of the target point above the observer's astronomical horizon from the height of the target above the horizon point, H.

Do the Calculation

Here's a JavaScript calculator to do the arithmetic. Just type in the values in your preferred units, and read their equivalents in the other units. You can enter either the temperature at the target, or the lapse rate; in both cases, the heights at the observer and the target are required.

Please enter the temperature and height at the Observer:               Height :  

and the temperature and height at the Target:               Height :  

Please choose how you want to specify the lapse rate:

Remember that thermal inversions correspond to negative lapse rates. The script will complain about lapse rates that exceed the adiabatic value of 10°/km, or inversions that force the upper-level temperature above 58°C (the highest free-air temperature ever recorded).

Having determined the lapse rate, we find the ratio of curvatures of horizontal rays and the Earth's surface, using the equation above. (Actually, I include an additional factor of exp(−H / 8 km) to allow for the decrease in atmospheric density with height.)

Results: Your values gave  k   =  ___ , corresponding to a radius of curvature for the ray of ___ km.

All that remains is to find the apparent altitude of the target — which was the original goal. To do this, we need to know the distance  from the observer to the target.

Finally, we find the apparent altitude of the target:   ___ minutes of arc  =  ___ degrees of arc.

The Sea Horizon: Dip and Visibility

But we're not quite done, because we often want to know whether a distant object can be seen, or is hidden by (say) a sea horizon. So we need to know both the distance and the dip of that apparent horizon.


To find the distance to the observer's sea horizon, we use the distance formula from the top of this page, being careful to use Hobs for the value of h  in the formula; this assumes that the same ray curvature found above extends down to the sea surface. For your values, the distance to the sea horizon is ___ , which puts the target on the ___ side of the horizon. ... .


The usual case

Ordinarily, the dip of the sea horizon can be found, as described on the dip page.

In your case, the dip of the sea horizon is ___ minutes of arc, or ___ degrees. These values place the target ___ minutes of arc, or ___ degrees, ___ the apparent sea horizon. ___

The ducted case

However, there are problems if the observer is in a duct. First, there is no apparent horizon at all, in the usual sense, because rays within the inversion are more strongly curved than the Earth's surface; so no ray can be tangent to that surface from above. In the real world, an inversion has a top, and rays tangent to that top surface from below produce a pseudo-horizon at the upper edge of Wegener's blank strip.

But this upper surface is missing from the oversimplified model adopted here: we have assumed a constant lapse rate throughout the boundary layer. So there's no way to determine the width of the blank strip. However, the Earth's surface appears concave to an observer within the strong inversion, so everything is visible — much as was predicted by Kummer in 1860.

Changing Parameter Values

It's often interesting to change some of the values entered above, and see what happens. The two most critical items are the lapse rate and the target distance, though of course the heights of the observer and the target are also important (though less likely to be changed).

Obviously, you can't set both the heights and both the temperatures, and then also type in a value for the lapse rate, without expecting some change to keep things consistent. I've written the scripts to keep the heights and the observer's temperature fixed, and re-compute the target temperature automatically, if you set the lapse rate manually.

If you change any of the values for the observer or the target, you'll need to re-set the lapse rate, either by clicking the Compute lapse ratebutton, or by entering something in the lapse-rate entry box below it. If you want to re-use the same lapse rate after changing a height or a temperature, just click in the lapse-rate box and add a space — being careful not  to hit the “Enter” key (which would clear all your entries, because of a quirk in JavaScript). The ray curvature will be re-computed when you release a key in this box; some browsers will act even if it's a <Shift> key or a <Control> key.

If you just change the target distance, everything that depends on it will be recomputed automatically.

Clearing an entry box is equivalent to entering zero there.

Notice that the running text that reports the results will change when you change the critical input data. This only works with browsers introduced after Netscape 4; if you have problems with a modern browser, please let me know.


Copyright © 2009 – 2010, 2020, 2021, 2023 Andrew T. Young

Back to the . . .
distance to the horizon page

or the dip of the horizon page

or the looming page

or the GF home page

or the website overview page