Lightning Distance
Lightning Distance
[Cueball and Megan stand on either side of a window, observing a bolt of lightning in a dark sky.] Cueball: What's that trick for telling how many miles away lightning is? Megan: Just count the seconds between the visible flash and the radio wave burst, then multiply by 5 billion.
The usual trick for determining the distance to a lightning flash is to count the seconds from when you see the flash until when you hear thunder , and divide by five to get miles (or three to get kilometers).  This works because the transmission of light is essentially instantaneous over the relevant distances, while the speed of sound is 331.2 m/s (1,087 ft/s, 1,192 km/h, or 741 mph, varying a bit based on temperature), or about 1/5 mile per second (1/3 kilometer per second).
This comic subverts the usual trick by having Megan describe a highly impractical alternative method.  Megan's method is based on the fact that the speed of electromagnetic radiation, which includes light and radio waves, is not truly fixed and varies by wavelength in a refractive medium (consider the classic case of visible light in a prism). The electromagnetic radiation emitted by lightning on Earth also has to travel through air, which changes its speed in a fashion which depends on its frequency.
Lightning is most visibly observable in the near-infrared visible spectrum around a wavelength of 777 nm . The refractive index (n) of air at 15˚C for a wavelength of 777 nm is 1.0002752 , which equates to a speed of light of 299,709,978 m/s given the relation n=c/v, where c=speed of light in a vacuum and v=the velocity of light in the medium.
Terrestrial lightning generates very-low-frequency radio waves ranging in frequency from 1 kHz to 30 kHz known as whistlers from bouncing off the ionosphere, and wider-band emissions known as sferics . Much of this would exist in the very low frequency category of radio waves, for which literature values of refractive index is harder to determine. Using the formula given in this paper , the refractive index for radio waves in similar conditions is 1.000315, which equates to a speed of light of 299698.0 km/s (or 186223.7 miles/s). This means that to get the distance in kilometers, the time difference between flash and radio burst should instead be multiplied by 13.6 billion (or 8.45 billion for miles).
Using a setup similar to that used for passive radar , it would theoretically be possible to use this effect to determine the distance to a source of extremely short bursts of visible light and radio waves, although one might have to compensate for the tiny effect time with tricks involving phase detection or receiver harmonics.  Large inaccuracies may propagate from the inconsistency of air pressure, temperature, electron density, humidity in the atmosphere, even local temperature of the receiver, which may need to be taken into account.
The joke is that it is impractical for people who haven't spent time with radio engineering, because they haven't heard of measuring such small time intervals (on the scale of 0.1 nanoseconds per kilometer or mile) and because they don't know how to detect radiation outside the visible spectrum, which can be done with a $20 radio dongle.  An upconverter may be needed to measure the low-frequency details, and possibly building one's own loop antenna to pick them up in the first place.  It would be difficult to use such a "rule of thumb" for somebody not already exposed to either the amateur software-defined-radio scene or professional hardware.
Although lightning lasts about 60 to 70 microseconds , during which time the signals we receive would rise and fall somewhat erratically, a software-defined radio can sample the phase and strength of the signal in detail during this time and provide a record of it for comparison with a recording at a different frequency.  A more expensive radio would make life easier, as a sampling rate of at least a few GHz would allow for the time discrepancy to be measured directly using the onset of the signal, rather than possibly inferred from phase differences at different frequencies.
For the purpose of the joke, the "5 billion" value used in the comic is a fair estimate which also references the original rule of 5 seconds per mile nicely, though the result can have a huge margin of error depending on actual conditions (temperature, humidity, etc.), as the title text suggests ("the index of radio refraction does have a lot of variation").
The title text suggests another method of calculating the distance to lightning. Since the absorption of light is also different in different wavelengths, it would be possible to calculate the difference by comparing the brightness instead of relative delay. This would, however, require the knowledge of the emission spectrum of lightning and attenuation ratios of different wavelengths (which would both vary across conditions).
[Cueball and Megan stand on either side of a window, observing a bolt of lightning in a dark sky.] Cueball: What's that trick for telling how many miles away lightning is? Megan: Just count the seconds between the visible flash and the radio wave burst, then multiply by 5 billion.