Sample Header Ad - 728x90

The 3D compass is unreliable on many Android phones. What can I do?

0 votes
0 answers
147 views
I'm writing a Wayfinding app which relies on the compass. But my Samsung Galaxy S9 seems to have an unreliable compass - both my app and the "Compass 3D" app don't reliably track magnetic north...sometimes the compass works as I turn around slowly, but then the compass stops, and then it goes backwards. I'm constantly recalibrating, rotating the phone in 3 axes, but this doesn't fix the problem. I've tried it both within the case, which has a small magnetic clasp, and outside the case. The compass is maybe slightly better when the phone is held flat (horizontal) but my app needs the compass when the app is held vertical in landscape mode. I have a very cheap Samsung A31 phone which seems to have a much better compass. Every iPhone I've used also seems to have a good compass, even one attached to a very strong magnetic case. So I figured I just have a bad phone, and I went into a phone shop. The salesman had a brand new Samsung S21, his own personal phone, which he proudly showed to me. We downloaded the "Compass 3D" app and calibrated his phone. But it worked even worse than mine. So I ended up not buying any phone. But now I'm stuck. Any ideas, anyone? I need my phone to work better than the phones of the potential users of the app, because I'm creating content. More specifically, (a) are some manufacturers/models better than others? (b) do others experience this same problem? (c) is it true that some axes work better than others (holding phone flat=better)? (d) is there some trick to calibration, or how frequently do I need to recalibrate? (e) anything else I'm missing?
Asked by Tim Cooper (151 rep)
Nov 11, 2021, 05:17 AM
Last activity: Nov 14, 2021, 05:18 AM