Compass
Digital & True North
A digital compass with a big clear heading, true north for where you are, and a warning when metal pulls the needle.
- Platform
- Android
- When
- Oct 2026
- Role
- Sole developer
- Version
- 1.0.1, 29 Oct 2026
- Price
- Free, optional one-time Pro
- Status
- In testing on Google Play
How it works
4 steps- 01
Hold your phone any way
Upright, flat or tilted, in portrait or landscape. Your heading shows in degrees and in words.
Open larger:
- 02
Switch on True north
It works out the correction for where you are from your approximate location, and keeps it for offline use.
Open larger:
- 03
Lock a bearing
With Pro, lock a direction and see exactly how far to turn left or right to stay on course.
Open larger:
- 04
Recalibrate when it asks
If the sensor drifts or metal is nearby, a card tells you and shows you the figure 8 that fixes it.
Open larger:
The problem
Your phone’s sensor finds magnetic north, but maps use true north, and the gap depends on where you are. Phone compasses also drift, and a metal case or a laptop nearby pulls the needle without any warning.
What I built
A single-screen compass in Jetpack Compose. The heading comes from the phone’s fused rotation vector, or from the accelerometer and magnetometer on a phone without a gyroscope. The dial turns on an expressive spring, stepped per frame so it never stalls between sensor readings. True north is free and works out the local magnetic declination on the phone, and a one-time Compass Pro adds bearing lock and four dial styles.
Hard partA heading that stays right however you hold the phone: flat, upright, or tilted to one side.
What it does
- 01
True north, for free
Switch between magnetic and true north. The correction, like 12.7° E, shows under the title and works offline.
- 02
Steady at any angle
Accurate held upright, flat or tilted, with unit tests across poses and bearings.
- 03
Knows when it’s off
Watches the sensor’s accuracy and the strength of the magnetic field, and warns you about interference.
- 04
A tick you can feel
A light vibration as you pass north, east, south and west.
- 05
Bearing lock (Pro)
Lock a direction and follow the arc, with how far to turn in degrees.
- 06
Four dial styles (Pro)
Cookie, Sunny, Scallop and Midnight, in a light and dark theme that follows your phone.
Under the hood
- 01SensorsRotation vector and magnetometer
The fused rotation vector gives a smooth heading. The magnetometer is always read too, for its accuracy and the field strength.
- 02HeadingOne angle from a rotation matrix
The rotation matrix is remapped for the way the screen is turned, then reduced to one angle by a function small enough to unit test.
- 03True northDeclination, on the phone
Android’s GeomagneticField turns an approximate location into a correction. Only the angle is saved, so it keeps working offline.
- 04DialA spring, a tick and a warning
The dial follows the heading on a spring, a light tick marks N, E, S and W, and a card appears when the reading can’t be trusted.
It watches the field, not just the needle
Earth’s magnetic field is roughly 25 to 65 microtesla. Far outside that, a magnet or metal is skewing the reading, so the app shows the calibration card even when the sensor still reports good accuracy.
Google Play decides who owns Pro
A saved flag is only a head start, so Pro is there the moment the app opens. Every launch and resume checks with Google Play again, so a refund locks it again.
In the code
One line of trigonometry, tested in every pose
Tipping the phone turns it about the screen’s x axis, and tilting only lifts one end, so the direction square to that axis stays put. Being a plain function of the matrix, it can be tested with no phone at all.
sensor/CompassSensor.kt, lines 121 to 124
fun headingOf(r: FloatArray): Float {
val degrees = Math.toDegrees(atan2(-r[3], r[0]).toDouble()).toFloat()
return (degrees + 360f) % 360f
}Decisions
- 01
Approximate location only, and only for True north
Declination changes by well under a degree across a city, so coarse location is plenty, and the compass itself never needs it.
Trade-offOn a phone with no location yet, True north has nothing to work from.
- 02
The compass and true north stay free, with no ads
Pro only adds bearing lock and dial styles, so the reading itself is never behind a payment.
Trade-offThe free app earns nothing, so it rests on people wanting what Pro adds.
A bug I remember
Tilt the phone, and north moved
- What it did
- Tilting the phone 30 degrees to one side moved the heading by about 26 degrees.
- Why
- The first version added where the top edge and the back of the phone point, flattened onto the ground. That is steady as you tip the phone forward or back, but a sideways tilt skews the sum.
- The fix
- The heading is now the level direction square to the screen’s x axis, which tipping and tilting both leave alone. Unit tests build poses from plain motions and check the reading in each.
Timeline
1.0.0, in testing on Google Play
A compass with true north, calibration help, bearing lock and dial styles (Pro).
1.0.1
The privacy policy can be opened from inside the app.
Built with
KotlinJetpack ComposeMaterial 3 ExpressiveGoogle Play BillingSensorManager
Your dataNo ads, no analytics and no account. Your location is optional, used only for True north, and never leaves your phone.
Compass is in testing on Google Play, so it isn’t in the store for everyone yet.
Every screen
6 from its Google Play listing, in testing- Open larger:

01Find north at a glance
- Open larger:

02True north, worked out
- Open larger:

03Lock a bearing, then follow it
- Open larger:

04Make the dial yours
- Open larger:

05Easy on the eyes at night
- Open larger:

06Tells you when it’s off

