# How Lighthouses Work 1, Exercise 3: which range is the limit? # A light stands 25 m above the sea and is seen by an eye 4 m above the sea. # For intensities of 100,000 and 2,000,000 cd and meteorological visibilities of # 2, 10 and 20 nm, find the luminous range and decide whether the luminous or the # geographic range limits what the observer sees. Then find the intensity that # gives a nominal range of 15 nm. (Threshold 0.2 microlux, as in the chapter.) import math NM = 1852.0 def transmissivity(vis_nm): return 0.05 ** (1 / vis_nm) def luminous_range_nm(i, vis_nm, threshold=2e-7): t = transmissivity(vis_nm) lo, hi = 0.01, 200.0 for _ in range(100): mid = (lo + hi) / 2 if i * t ** mid / (mid * NM) ** 2 > threshold: lo = mid else: hi = mid return (lo + hi) / 2 def geographic_range_nm(light_m, eye_m): return 3.86 * (math.sqrt(light_m) + math.sqrt(eye_m)) / 1.852 geo = geographic_range_nm(25, 4) print(round(geo, 1)) for i in (100_000, 2_000_000): for vis in (2, 10, 20): lum = luminous_range_nm(i, vis) limit = "luminous" if lum < geo else "geographic" print(i, vis, round(lum, 1), round(min(lum, geo), 1), limit) # intensity needed for a nominal range (visibility 10 nm) of 15 nm lo, hi = 1.0, 1e9 for _ in range(100): mid = (lo + hi) / 2 if luminous_range_nm(mid, 10) < 15: lo = mid else: hi = mid print(round(hi)) # Output when run: # 14.6 # 100000 2 5.6 5.6 luminous # 100000 10 19.8 14.6 geographic # 100000 20 32.8 14.6 geographic # 2000000 2 7.3 7.3 luminous # 2000000 10 27.6 14.6 geographic # 2000000 20 47.8 14.6 geographic # 13805 # # First line: the geographic range, 14.6 nm. Then each row is intensity, # visibility (nm), luminous range (nm), the range actually seen (the smaller of # the two) and which one limits it. In haze (2 nm) both lights are limited by the # luminous range (5.6 and 7.3 nm). In clear air (10 or 20 nm) both are limited by # the geographic range, 14.6 nm, so the extra intensity of the 2,000,000 cd light # is wasted. The last line is the intensity for a 15 nm nominal range: about # 13,805 cd, to the nearest candela, under these assumptions.