Karl von Frisch worked out the code in the mid-twentieth century, sharing a Nobel Prize for it in 1973. On the dark vertical comb the bee substitutes gravity for the sun: a run straight up means fly towards the sun, and a run forty degrees to the right of vertical means forty degrees right of the sun's current bearing. The bee compensates for the sun's movement during the time it has been in the hive.
Distance is encoded in the duration of the waggle phase, roughly one second per kilometre in typical European bees, though the calibration differs between subspecies and with terrain. The measure is not distance travelled but optic flow, the amount of visual motion experienced on the outbound trip, which is why bees flown through a narrow patterned tunnel overestimate the distance considerably.
The dance was doubted for decades. Critics argued that recruits were simply following scent. Robotic bee experiments and, later, harmonic radar tracking of individually tagged recruits confirmed that naive bees do fly to the indicated location, though odour cues also contribute in practice.
