
Homing navigation, magnetoreception, and GPS principles — how pigeons find their way home.
The Pigeon Keeper
Every morning before dawn, Sameer climbed the narrow staircase to the rooftop of his family's house in the old city of Hyderabad, three streets east of the Charminar. The rooftop was home to fifty-two pigeons — white fantails, grey homers, and the sleek, iridescent racing pigeons called kabutars that his family had bred for three generations.
Sameer was fifteen, and he had been helping his grandfather Noor Ahmed with the birds since he was seven. He knew each pigeon by sight — its markings, its flight pattern, its temperament. But what he did not understand, even after eight years, was how they found their way home.
Every weekend, Noor Ahmed would take six racing pigeons in a wicker basket to a location somewhere in the city — sometimes the Hussain Sagar lake, sometimes the Golconda Fort, sometimes as far as Shamshabad near the airport, thirty kilometres away. He would release them, and they would circle once, twice, orient themselves, and fly directly back to the rooftop near Charminar. Every time.
Sameer had tried the same thing himself, without a phone or map, and had gotten lost in neighbourhoods he thought he knew. Yet the pigeons, with brains the size of a walnut, navigated flawlessly over distances that would confuse a human.
"How do they do it, Nana?" Sameer asked for the hundredth time.
Noor Ahmed gave the answer he always gave: "Allah gave them a compass."
This time, Sameer wanted the details.
The Three Systems
Sameer's biology teacher, Dr. Fathima, was delighted by the question. "Your grandfather is actually correct," she said. "Pigeons have a compass — in fact, they have three navigation systems working simultaneously. No single system is enough on its own, but together, they allow pigeons to navigate with astonishing accuracy."
She drew three columns on the whiteboard: Magnetic, Solar, and Olfactory.
System 1: The Magnetic Compass
Dr. Fathima explained that the Earth behaves like a giant magnet, surrounded by an invisible magnetic field. "Pigeons have something similar to a compass needle inside their bodies," she said. "Researchers have found tiny crystals of magnetite — a naturally occurring iron oxide mineral — in the upper beak of pigeons. These crystals are only a few nanometres across, but they are magnetically sensitive. When the pigeon moves relative to the Earth's magnetic field, these crystals exert tiny forces on surrounding nerve cells, and the pigeon's brain interprets these signals as directional information."
The magnetic field varies in both direction and intensity across the Earth's surface. Near the equator, the field lines run roughly parallel to the ground. Near the poles, they point steeply downward. The angle at which the field lines meet the ground is called the inclination, and it changes gradually with latitude. A pigeon can sense not just the compass direction but also the inclination — giving it information about its latitude.
She showed him research where scientists had attached small magnets to pigeons' beaks, scrambling their magnetic sense. Those pigeons flew in confused circles on overcast days — but navigated almost normally on sunny days. This proved the magnetic sense was real and that pigeons had a backup system.
System 2: The Sun Compass
"Pigeons can tell direction by the position of the sun — but only if they know what time it is," Dr. Fathima continued. All animals have an internal circadian clock — a biological rhythm that runs on an approximately 24-hour cycle. Pigeons' internal clocks are remarkably accurate, keeping time to within about 15 minutes per day.
The classic proof: researchers kept pigeons in a room with artificial lighting shifted by six hours. When released, these "clock-shifted" pigeons flew in a direction rotated by approximately 90 degrees — because their internal clock was wrong by six hours, which corresponds to a quarter of the sun's 24-hour arc. This proved that pigeons use the sun's position combined with their internal clock for navigation.
System 3: The Olfactory Map
"The third system is the strangest," Dr. Fathima said. "Pigeons appear to build a mental map of smells." Different landscapes produce different volatile chemicals, and the wind carries these smells in specific patterns. Researchers at the University of Pisa blocked pigeons' sense of smell — these pigeons could determine compass direction but could not determine their position. The olfactory system provides positional information (a "map"), while the magnetic and solar systems provide directional information (a "compass").
How GPS Works — And How It Compares
Dr. Fathima explained GPS: a constellation of 24 to 32 satellites orbiting at approximately 20,200 kilometres altitude. Each satellite broadcasts its position and the exact time. Your phone calculates distance to each satellite by comparing the signal's departure time with arrival time, using the speed of light. With distances from four satellites, it calculates your exact position via trilateration.
"The pigeon's system is less precise — maybe accurate to within a few kilometres, compared to GPS's few metres. But the pigeon's system requires no satellites, no batteries, no software updates, and fits inside a walnut-sized brain. It has been refined by natural selection over millions of years."
The Race
The following Saturday, Sameer accompanied his grandfather to the annual pigeon race organised by the Hyderabad Kabutar Association. Fifty birds from ten keepers were released simultaneously from Warangal, 150 kilometres northeast of Hyderabad.
Noor Ahmed entered three birds: Sultana, Badshah, and a young hen named Chand racing for the first time. They released the birds at 6:00 AM. At 8:47 AM, Sultana appeared from the northeast. One hundred and fifty kilometres in two hours and forty-seven minutes. Badshah arrived twelve minutes later. Chand arrived an hour after that — still calibrating her navigation systems. But she arrived. First race, unfamiliar territory, 150 kilometres — and she found her way home to a single rooftop in a city of ten million people.
Sameer looked at the Charminar, visible from the rooftop, its four minarets pointing at the sky where, unseen, GPS satellites were orbiting. Two navigation systems — one biological, one technological — one ancient, one modern — both solving the same fundamental problem: How do you find your way home?
The end.
Choose your level. Everyone starts with the story — the code gets deeper as you go.
Here is a taste of what Level 1 looks like for this lesson:
import numpy as np
import matplotlib.pyplot as plt
# Your first data analysis with Python
data = [45, 52, 38, 67, 41, 55, 48] # measurements
mean = np.mean(data)
plt.bar(range(len(data)), data)
plt.axhline(mean, color='red', linestyle='--', label=f'Mean: {mean:.1f}')
plt.xlabel("Sample")
plt.ylabel("Value")
plt.title("Homing Navigation, Magnetoreception & GPS Principles — Sample Data")
plt.legend()
plt.show()This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Build a Navigation System Simulator.
Free
Level 0: Listener
Stories, science concepts, diagrams, quizzes. No coding.
You are here
Level 0 is always free. Coding levels (1-4) are part of our 24-Week Bootcamp.
How pigeons navigate using magnetic crystals, sun compasses, and smell maps — and how GPS solves the same problem with satellites.
The big idea: "The Pigeons of Charminar" teaches us about Homing Navigation, Magnetoreception & GPS Principles — and you don't need to write a single line of code to understand it.
Hold a compass flat in your hand. The needle swings and settles, pointing north. You have just detected something invisible: the Earth's magnetic field. This field surrounds the entire planet, generated by the churning of molten iron in Earth's outer core, thousands of kilometres below your feet.
The magnetic field has two important properties at any point on the surface: direction (which way the field lines point horizontally — this is what a compass shows) and inclination (the angle at which the field lines dip into the ground). Near the equator, the field lines run roughly parallel to the surface — inclination is close to zero. Near the poles, the field lines plunge steeply into the ground — inclination approaches 90 degrees.
This means that if you can sense both the direction and the inclination of the magnetic field, you have two pieces of information: direction tells you roughly which way is north, and inclination tells you roughly how far you are from the equator (your latitude). Together, they form a crude but functional coordinate system — a natural GPS.
Pigeons can sense both. Tiny crystals of magnetite (Fe3O4) — a naturally magnetic iron mineral — have been found in the upper beaks of pigeons. When the pigeon moves through the magnetic field, these crystals exert microscopic forces on surrounding nerve cells, and the brain interprets these forces as directional and positional information. The pigeon literally has a compass built into its face.
Key idea: Earth's magnetic field has direction (compass bearing) and inclination (dip angle that varies with latitude). Pigeons detect both using magnetite crystals in their beaks, giving them a built-in compass and crude latitude indicator.
Stand outside at noon. The sun is roughly due south (in the Northern Hemisphere). At 6 AM, it is roughly in the east. At 6 PM, roughly in the west. If you know what time it is, and you can see the sun, you can figure out which direction you are facing. Navigators have used this principle for thousands of years.
Pigeons use the same method, but they do not need a watch. Like all animals, pigeons have an internal circadian clock — a biological timer that runs on an approximately 24-hour cycle, governed by patterns of gene expression and hormone release. This clock tells the pigeon roughly what time it is, with an accuracy of about 15 minutes.
The combination of "I know the time" and "I can see where the sun is" gives the pigeon a reliable directional system — a sun compass. The same sun position means different directions at different times, so the clock is essential.
Scientists proved this with a clever experiment: they kept pigeons in rooms with artificial lighting shifted by 6 hours. When released, these clock-shifted pigeons flew in a direction rotated by about 90 degrees from the correct heading. Their sun compass was working perfectly — but with the wrong time input, it gave the wrong answer. This proved that direction = sun position + clock.
Key idea: The sun compass combines the sun's position with an internal circadian clock to determine direction. If either component is wrong, the system gives incorrect readings — proving both components are necessary.
Access all 130+ lessons, quizzes, interactive tools, and offline activities
Imagine you are blindfolded in a large field. Someone tells you: "You are exactly 5 metres from the red pole." You know you are somewhere on a circle ...
If you had to choose between one excellent navigation system and three good-but-imperfect ones, which would you pick? Intuitively, you might choose th...