About
A compass, and nothing else
No app, no account, no advertising, no analytics. One page that reads your device's magnetometer, 32 reference pages for the points of the rose, and 8 guides for the jobs people actually need a bearing for.
How it works
Where the number comes from
The heading
Your phone contains a magnetometer, a three-axis sensor that measures the strength of the magnetic field around it. The operating system combines that with the accelerometer, which knows which way is down, and works out which way the device is pointing. The browser exposes the result to this page through the Device Orientation API.
On iOS the browser reports a compass heading directly, already corrected for how the device is held. Everywhere else the page receives a rotation angle and inverts it, because that angle runs anticlockwise while a bearing runs clockwise. It also adds the screen rotation, which the sensor does not account for, so the reading stays right in landscape.
The reading is smoothed slightly on its way to the screen. A magnetometer is noisy at the last degree, and an unsmoothed needle vibrates in a way that makes it harder to read, not more honest. When you turn the card by hand there is no smoothing at all, because a control that lags your own finger feels broken.
What happens if there is no sensor
Almost no desktop or laptop has a magnetometer. Rather than show a needle that never moves, the page waits about a second for a reading and then says plainly that none arrived, and hands you the card to turn yourself. That mode is a first-class path: drag the rose, or focus it and use the arrow keys.
The status line under the compass always names which mode you are in. A compass that does not tell you whether it is reading a sensor or echoing your own drag is worse than no compass at all.
The declination this site does not calculate
Magnetic north and true north are different directions, and the angle between them depends on where you are standing. Offering true north means knowing that angle.
A centred-dipole estimate was implemented here, tested, and removed. It treated the field as one tilted bar magnet and returned the great-circle bearing to the geomagnetic pole, which for a centred dipole is the declination. Measured against published values it was 15 degrees out in London, 13 in New York, 14 in Cape Town and 17 in São Paulo. The non-dipole part of the earth's field is too large to approximate away.
Doing it properly means the World Magnetic Model, 168 coefficients revised every five years, which is not something to reproduce from memory. So the compass asks for the figure and links to NOAA for it. An empty field means true north is unavailable, which is an honest state rather than a degraded one.
Location is still used, for your coordinates and for the qibla. Both are exact spherical trigonometry, both are computed in your browser, and neither sends anything anywhere. The qibla bearing was checked against published figures: 119.0 degrees from London against a published 118.9.
Deliberate absences
What is not here
Some of these are the more interesting decisions.
No tracking
No analytics at all
Not a self-hosted one either. A page that asks for your location and your device orientation has no business also counting you.
No entrance motion
Nothing fades in
The design system this site is built on had a scroll-triggered blur-up reveal. On a tool it delays content someone is trying to read, so it was removed outright rather than shortened.
No map
No embedded map tiles
A map would mean requests to a tile server carrying your position in the URL, which would undo the one privacy promise this site makes.
No stored position
Coordinates are not remembered
They live in the page while the tab is open. Only your theme and your choice of north reference persist, and both are single words.
No degree pages
There is no page for 187°
360 near-identical pages would rank for a while and help nobody. The 32 points of the rose are genuinely distinct; individual degrees are not.
No false precision
Every method states its error
Each guide ends with how wrong it can be. A direction you cannot put a tolerance on is not an answer, and 11.25° of quiet error is worse than a stated one.
Next