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?

  • $\begingroup$ Why can't you use GPS? $\endgroup$ – FooTheBar May 3 '19 at 14:20
  • $\begingroup$ gps just gives me location. I am calculating which direction to go in the app. So I need to know which way the user is facing $\endgroup$ – lolelo May 3 '19 at 14:23
  • $\begingroup$ Any map app estimates velocity vector by taking first difference of positions given by gps sensor $\endgroup$ – Long Smith May 3 '19 at 15:15
  • $\begingroup$ If you still want to use gyro and magnetometer you should look at kalman filter $\endgroup$ – Long Smith May 3 '19 at 15:16
  • $\begingroup$ doesn't the earth's magnetic field fluctuate continuously? $\endgroup$ – jsotola May 5 '19 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.