Atmospheric refraction ray 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.