eli5: Hiw do devices know which way is “downwards” for it to know where to rotate

169 views

How do devices like phones or ipad know which way is “down” for them to auto rotate?

In: 13

7 Answers

Anonymous 0 Comments

For a long time now phones have had 3-way accelerometers on them. These detect acceleration in each of the 3 dimensions. The assumption they make to detect rotation is that the phone is generally sitting still not experiencing any acceleration except for the force pushing it off the ground against the force of gravity. By looking at which direction the largest acceleration comes from the phone assumes this direction is down. Of course with a smoothing filter so that any random quick accelerations do not result in the screen rotating.

Although not needed for just getting the phone screen to rotate phones also come with a 3-axis gyroscope. This is more accurate at detecting rotation so that moving the phone side to side or such does not get mistakengly detected as rotating the phone. However it have no way of knowing exactly which way is down. The phones therefore use the accelerometer to constantly calibrate the gyroscope. But although this technique is used for more advanced motion tracking I do not think it is done for screen rotation because of the delay it usually take for the screen to rotate after you rotate your phone.

You are viewing 1 out of 7 answers, click here to view all answers.