The SM has a built in GPS for distance calculation.
Air delay as far as i understand affects the index of refraction of the air, which in effect affects the speed of transmission.
Remember that index of refraction is equal to the square root of permitivity.
And the speed of light on the medium(air) is equal to the speed of light in the vacuum divided by index of refraction.
Then distance is equal to the speed of light in the medium(air) divided by the frequency of SM <----- which we see in the canopy (approx distance)