How to take a heading 01 Start the sensor. Press Start and allow motion access; iOS may ask separately. 02 Hold the device flat and away from magnets. Speakers, laptop lids and car mounts bend the local field. 03 Read the dial and magnetic card. The dial shows the smoothed heading and compass point; the card prints one decimal. 04 Set the location or an override. The declination card uses the dipole value, or your typed survey value. 05 Switch to true north. The dial and true-heading card add the declination to the magnetic reading.
Worked examples
Input
Readout
Orientation alpha 30°, screen upright
magnetic heading 330.0°
Orientation alpha 30°, screen rotated 90°
heading 60.0°
Smoothing 350° → 10°, factor 0.25
355.0° (moves along the short arc)
Circular mean of 350° and 10°
0.0° , not 180°
11.24° / 11.25°
N / NNE
348.74° / 348.75°
NNW / N
Magnetic 90.0°, Beijing declination +1.705° E
true heading 91.705°
Greenwich (51.4779° N, 0.0015° W), dipole model
declination −14.97°
Beijing geomagnetic latitude
30.708° vs 39.9042° geographic
The chain from alpha to a heading Device orientation reports alpha counterclockwise, so the compass heading is 360 − alpha , plus the screen rotation — the same alpha 30° reads 330° upright and 60° with the screen turned 90°. Readings are low-passed along the shortest arc: 350° followed by 10° moves through 355°, and two samples 20° apart across north average to 0° , never 180°. The dial rounds to the nearest 22.5° sector, with the boundary falling on the upper sector: 11.25° is NNE and 348.75° is back to N, so a bearing of 348.74° reads NNW.
Limits and what it does not do
The declination is a dipole approximation. It leaves out the non-dipole field: expect a few degrees of error at mid-latitudes, up to about 10° in East Asia and the South Atlantic anomaly, and more near the poles. The NOAA link opens a real calculator.
Hardware quality varies. A relative orientation source cannot know true north, and nearby iron or magnets shift the field; the panel flags the relative case rather than showing a confident angle. What it does not do. It does not calibrate the magnetometer, show a map or record a track; use the Level tab for tilt and the GPS tab for position.
Where it is used Navigation outdoors Take the magnetic heading, then switch to true north once the declination is set; at Beijing the correction is +1.7° — negligible on a short walk, not on a bearing held for kilometres.
Orientation-aware apps Alpha, screen angle and smoothing are the same inputs an AR overlay or camera level uses; the worked values above are the contract between the sensor stream and the displayed direction.
Privacy Orientation and declination are processed in your browser; the location is used locally and only the NOAA link you click opens an external page.
References
W3C, DeviceOrientation Event Specification — alpha, beta, gamma, absolute/relative events. w3.org (访问日期:2026-10-07)
Wikipedia, Magnetic declination — the magnetic–true north angle. en.wikipedia.org (访问日期:2026-10-07)
Wikipedia, Earth's magnetic field — the dipole and the omitted non-dipole field. en.wikipedia.org (访问日期:2026-10-07)
NOAA NCEI, Geomagnetism FAQ — declination calculation. ncei.noaa.gov (访问日期:2026-10-07)
Wikipedia, Points of the compass — the 16-point rose. en.wikipedia.org (访问日期:2026-10-07)
Calculators in this hub
Hand-picked tools, one click away. The mini versions compute live and carry your values into the full calculator.
Sources & review
Reviewed by CalcX Editorial Team
Updated 2026-10-07