Is it possible to get the altitude of my position using the Android magnetometer? If yes how can I calculate the altitude? As I understood I get from the Android API three coordinates x,y and z and the magnetic field strength in Tesla. I can transfer these coordinates into the Euler angles to determine the position, but I do not know if I can calculate the altitude. Does anybody know about that and is able to help me to figure out the altitude without using GPS?
Asked
Active
Viewed 1,318 times
1 Answers
3
There is a reason most devices use GPS (which already has horrible dilutiuon when it comes to altitude calculation) or even a barometric system to calculate their altitude : Magnetic measurements are terribly unstable and perceptive to interference from outside, not to mention that the planet does not have a completely uniform magnetic field, and that it runs lateral with the surface rather than in a straight angle with it.
If you managed to get a decent altitude reading with a magnetometer, i think you would be elligable for a prize in the fields of mathematics, physics and programming.

Timothy Groote
- 8,614
- 26
- 52
-
Thanks for the answer. I just forgot to mention that I would need it for indoor navigation to detect the current floor, but it seems that will be impossible at the moment. – Irgendw Pointer May 13 '13 at 10:56
-
Indoor is possibly even worse unfortunately :( every power mains has enough of a magnetic field to throw your reading off by miles – Timothy Groote May 14 '13 at 14:39
-
If you want the current floor then you could get the relative floor as you move around with a phone with a pressure sensor. Plenty of accuracy from what I have seen doing my bike computer app for that. – Ifor May 14 '13 at 15:53
-
Yeah, a pressure sensor. the question was about using a magnetometer ;) – Timothy Groote May 15 '13 at 13:54