A distant ship floating above the horizon in a mirage with a bent light ray

Atmospheric Refraction Calculator

Follow one launched ray through a lower layer and an upper layer. Compare its path with the same straight ray and a single constant gradient over the same spherical surface.

Two-layer ray range4.863 km
End height above the surface0 m
Two-layer ray endSurface reached
Straight ray range20 km
Constant-gradient range4.863 km
Geometric beam diameter at target range20.005 m
Pointing-error displacement0 m
Target in beam envelopeCentral ray blocked before target

A ray launched -0.04° from horizontal at 2 m reaches 4.863 km before meeting the smooth surface. Compare the same launch with zero gradient and the lower gradient extended through the whole atmosphere. At 20 km, the full-angle divergence gives a 20.005 m wide geometric envelope; pointing error shifts it 0 m.

Solid · Two-layer rayDashed · Straight rayDotted · Constant-gradient rayDotted · Spherical surface

Read this calculation

n = 1 + N × 10⁻⁶; dθ/ds = ∇n · normal / n

The entered profile starts at surface refractivity N = 300. Below the layer boundary, N changes with the lower gradient; above it, the upper gradient continues from that boundary without an index jump. Gradients are assumptions you supply, rather than an observation of today’s atmosphere.

Height is radial height above a sphere of radius 6,371.0084 km. The ray bends toward larger refractive index. The smooth surface stops a path at its first intersection; each output states whether that happened before the selected range ended.

An effective-radius calculation approximates a nearly constant gradient with one changed radius. A layered profile can bend differently on either side of the boundary. A single launched ray does not solve every possible image path or the intensity of a mirage. Record vertical temperature, pressure and humidity when comparing an actual observation.

The geometric beam diameter is launch diameter + 2 × range × tan(full divergence / 2). A pointing error shifts its centre by range × tan(error). At 10 km, only 0.01° of pointing error shifts the beam about 1.75 m. Divergence describes an envelope, not a uniform bright disk; detection also depends on intensity and the receiver.

The central ray follows the entered atmospheric profile; the beam-envelope comparison adds paraxial divergence and alignment at the target range. If the central ray meets the surface first, it cannot establish a received spot there. Measure launch and target heights from the same instantaneous water level, plus wave range and the vertical air-temperature profile. Never aim a laser toward people, aircraft or an uncontrolled distant area.

The vertical profile matters

Pressure, temperature and humidity affect refractive index. Light bends toward higher index. A profile that changes with height can produce several paths from one object, stretched or inverted images, and changing visibility. A single universal correction cannot describe every such layer.

Over cold water with warmer air above, the gradient bends light downward more than usual, and distant ships and shores rise into view, a superior mirage. The opposite profile over hot ground produces the inferior mirage, the shimmering ‘water’ on a road.

Observe atmospheric changes over water

Repeat the same long-distance target record at several camera heights and times, pairing visibility changes with atmospheric measurements. Choose a target with identifiable vertical levels and a measured distance, and establish one height datum for camera and target. Record the water level, since tides move the camera height relative to the surface.

Collect temperature readings at several heights without changing the target geometry, and add pressure and humidity if available. A point measurement beside the camera is not the whole path’s profile. Photograph at fixed heights and settings as conditions change, and keep inverted or stretched features in the record instead of reducing every frame to one apparent target height.

Compare scenarios without tuning to one photograph

Compare straight and constant-gradient scenarios, then enter a two-layer profile. State the profile you entered before comparing its ray with a frame, and repeat when the vertical gradient changes. Do not tune a coefficient merely to force one image to match.

A smooth effective-radius correction does not represent every mirage, and surface contact for one launched ray differs from finding all rays that connect camera and target. The Chicago skyline and Lake Pontchartrain photographs on the proof page are worked examples of the same method.