Search code examples
androidgpslocationmagnetometer

android nGPS: get location based on magnetic field instead of gps or cell triangulation


Does anybody know how to convert results from the magnetic-field sensor from an android device to coordinates using the World Magnetic Model? Is there a webservice that does that?


Solution

  • You cannot do this. First of all you want co-ordinates which means 2 values. Only one what magnetic field provides is not enough. Second - even if you catch it correctly you will only know that you are on one of those isolines. That's not too much. You can be in Europe or Africa as well. Third and final - it's real magnetic field around you. Nearby passing car which is heavy metallic object object will change your field dramatically. Other magnetic sources like your phone ringing or electric wiring around will tell you that you travel from Brasil to Egypt when you come form Bathroom to Living room.