# How Lighthouses Work 1, Exercise 2: the geographic range # For lights 20, 40 and 80 m above the sea, seen by an eye 3 m above the sea, # find the geographic range with and without refraction (constants 3.86 and # 3.57 km per square root of a metre). Then find the height of light needed for a # 20 nautical mile range, and the height needed to double the range of the 40 m # light. import math K = 3.86 # km per sqrt(metre), with standard refraction G = 3.57 # km per sqrt(metre), pure geometry NM = 1.852 # km per nautical mile eye = 3 # observer's eye height, m (assumed) for light in (20, 40, 80): refracted = K * (math.sqrt(light) + math.sqrt(eye)) / NM plain = G * (math.sqrt(light) + math.sqrt(eye)) / NM print(light, round(plain, 1), round(refracted, 1), round(refracted - plain, 1)) # light height needed for a 20 nm geographic range to an eye at 3 m target_nm = 20 root = target_nm * NM / K - math.sqrt(eye) print(round(root ** 2, 1)) # range doubling: height needed to double the range of a 40 m light base = K * (math.sqrt(40) + math.sqrt(eye)) / NM root2 = 2 * base * NM / K - math.sqrt(eye) print(round(base, 1), round(root2 ** 2, 1)) # Output when run: # 20 12.0 12.9 1.0 # 40 15.5 16.8 1.3 # 80 20.6 22.3 1.7 # 61.8 # 16.8 206.8 # # Columns of the first three lines: light height (m), range without refraction # (nm), range with refraction (nm), and the gain from refraction (nm). The # refraction gain is about 8% (3.86 / 3.57), 1.0 to 1.7 nm here. A 20 nm range # needs a light about 61.8 m up. The last line gives the 40 m light's range # (16.8 nm) and the height for double that range, 206.8 m: because range grows # with the SQUARE ROOT of height, doubling the range takes roughly four times # the height (the observer's own height shifts it slightly).