Why is my phone's compass off? True north, magnetic north and how to calibrate
In Repi Toss, the compass inside your phone decides where Repi flies. Yet aim the same way from the same spot and one day Repi lands in Japan, the next in the middle of the sea. Phone compasses are wrong more often, and by more, than most people think. This article explains how a phone finds north, why there are really two norths, how a small angle grows into a big miss over long distances, and how to fix your compass.
How does a phone know where north is?
Every smartphone has a magnetometer, a sensor smaller than a fingernail. The Earth is wrapped in a weak magnetic field, and the magnetometer measures which way that field points along three axes. Combined with the accelerometer (which knows how the phone is tilted) and the gyroscope (which measures turning), the phone works out how far the top of the phone, or the camera, is rotated from north. That number is the heading: 0° is north, 90° east, 180° south and 270° west.
The catch is that Earth's field is very weak, a few hundred times weaker than a fridge magnet. Any nearby iron, magnet or electric current easily pulls the reading off. That is the main reason phone compasses drift.
There are two norths
The north on a map points to the end of the axis the Earth spins around, the North Pole. This is true north. A compass needle points along the magnetic field to magnetic north. The north magnetic pole is not at the North Pole; it has been moving from northern Canada toward Siberia by tens of kilometres a year.
The angle between true and magnetic north is called magnetic declination. It varies by place and slowly changes every year. Rough values:
- Seoul: magnetic north about 9° west of true north
- Tokyo: about 8° west
- New York: about 13° west
- Los Angeles: about 11° east
- Madrid: within about 1°, almost no difference
The magnetometer measures magnetic north. Map apps often convert it to true north using your location and a declination model, but the heading a web browser reports is, on many devices and browsers, magnetic. Repi Toss uses the browser's heading as it is, so from Seoul Repi may fly a few degrees to the left (west) of where you aimed, and from Los Angeles a few degrees to the right.
How far off does a few degrees take you?
A few degrees sounds small, but the farther you throw, the bigger the miss. Here is how far to the side Repi lands when the direction is off, for the same flight distance over the globe:
- 100 km (end of the slingshot): 1° off is about 2 km; 9° off is about 16 km. The next neighbourhood.
- 1,000 km (cannon): 1° is about 17 km; 9° is about 156 km.
- 2,000 km (end of the cannon): 9° is more than 300 km.
- 10,000 km (rocket): 9° is about 1,000 km. The gap is widest a quarter of the way around the planet.
- 20,000 km (end of the rocket): surprisingly, back to zero.
The last line is the fun one. Whichever way you set off, after 20,000 km every path meets at the point exactly opposite your start, the antipode. So beyond 10,000 km a direction error starts to shrink again, and a full-power rocket lands in the same place no matter how wrong the compass is. More in Why does Repi fly in a curve?
What throws a compass off
- Cases and mounts with magnets: wallet cases with magnetic clasps, magnetic car mounts and snap-on card wallets disturb the sensor a lot. Take them off while you toss.
- Big pieces of steel: inside a car, in steel-framed buildings, on subway platforms or next to metal railings the heading can be off by tens of degrees. Open air is best.
- Electronics: keep away from laptop speakers, wireless chargers and power outlets.
- How you hold the phone: when aiming with the camera, hold the phone upright. Tilting it flat or spinning it quickly makes the sensors take a moment to agree. Turn slowly, pause for a second or two, then launch.
How to calibrate
- Draw a figure eight: hold the phone and trace a large sideways 8 (∞) in the air a few times, turning it in all directions. This lets the sensor recalculate the magnetic noise around it. It works on Android and iPhone.
- Check with a map app: if the blue cone at your location in Google Maps is wide, the compass is unsure. Draw the figure eight and see if the cone narrows.
- iPhone setting: under Settings > Privacy & Security > Location Services > System Services, "Compass Calibration" should be on.
- Use a landmark: the sun rises roughly in the east, and around midday it is roughly south in the northern hemisphere. If your phone disagrees badly, calibrate again.
If you want to send Repi precisely
In short: for nearby targets a small error hardly matters, and distances between 1,000 and 10,000 km are the most sensitive. When aiming at somewhere in that range, step outside, take off magnetic cases, calibrate once with a figure eight, and from places with a large declination, aim a few degrees to compensate. If Repi still misses, that is just the start of an adventure. See which way to aim in Where does Repi go from Seoul?