Compass and altitude Description
This is a demonstration piece, not for general consumption. So it only needs to work like, rather than as, a compass and an altimeter. It is made using the standard android libraries, updated in Feb 2024 and I make absolutely no guarantees about their accuracy. This does not use the maps library so the elevation data is taken from the WGS84 meridian. This means you will need to know your local EGM96 variation to make sense of it. The app points in the same direction regardless of the attitude of the device (not necessarily north) and gives you a height that changes as you change location. The source code is on github.
Open up