Sunday, July 22, 2012

Digital compass calibration

As I promised recently I'm publishing several important notes about digital compasses. They became a regular part of modern mobile devices and WiFiLine employs them as a useful tool for indoor orientation. It's great to have a compass at hands, but unfortunately digital compasses are not as reliable as real magnetic devices. It's not about their accuracy in general, but about ability to produce relevant readings every time you use it. If you think this passage contradicts itself, it's not quite so. Here is what I mean.

From time to time a digital compass may stop working properly and demonstrate strange behaviour, for example, got stuck at a specific angle (this is a most simple case of mulfunction, so it's easy to spot, but there can be others less obviuos). All such problems can be solved by special manipulations called calibration. And if the calibration was successful the digital compass shows accurate results. But what it means in fact is that you never know if your digital compass works well at the moment, and if calibration did actually work, unless you have a physical analogue for the reference. ;-)

Although it may sound frustrative, in most situations you can figure out if your compass works well just by its stable direction while you smoothly turn round yourself. If it's not, the calibration is required.

You can find a lot of information about calibration in the Internet. Most of sources advise to make a so called "figure 8" motion several times in different planes. Try it first, many users succeeded in this. But I admit, this method can only work with a specific subset of mobile devices, while the others may fail. My test device was in the second group, so I needed another solution and discovered the following method.

Lay your device on your hand in parallel to the ground, screen showing to the sky, in portrait orientation (long side goes from you away). Then incline the device to the right and to the left (one after another) along the long axis, as much as your hand allows, so that the screen faces (almost) down. Repeat this several times. Android developers call this operation "rolling".

Then incline the device along the short axis, so that its screen is turned to one side and to another. Try to achieve as large sweep angle as you can, as well. Repeat this several times. Android developers call this operation "pitching".

This method worked for me, I hope it may help you as well.

After your digital compass is calibrated you can finally proceed to navigation, but don't forget while using compass to hold your device almost horizontally. If you lean it much to any side, it starts adding some correction to that side and direction to North is biased. This is much similar to magnetic compasses, which should be used in horizontal position, otherwise their needle heels and hangs on frame.

No comments:

Post a Comment