I am developing a navigation app which combines compass and gyroscope to withstand magnetic field disturbances which can be found in cities.
I am able to know what the magnetic field is supposed to be. In my location its 50μT. (Here I am hoping to find an api which gives me magnetic field from geolocation. Or I have to calculate it). Then I am able to detect if the magnetic field is for instance +- 10μT or greater to assume there is magnetic field disturbance with the magnetometer.
Then I am hoping to use the gyroscope until I get a accurate compass reading again.
Has anyone tried this? Would it work?