Microsoft has chosen to make its Windows operating system the base for its tablet vision rather than re-purposing the Windows Phone platform. The Metro UI revamp was just the start of making desktop Windows work on a mobile device, though. Microsoft has been working to develop an effective sensor support system for Windows 8, and it’s more complicated than just reading the raw data from a sensor or two. Luckily, Microsoft could refer to how other platforms have been handling these issues.
Device orientation is a difficult problem to tackle when you’re looking to build a completely fluid experience. Gaming, augmented reality, mapping, and a multitude of other apps take advantage of device orientation data, and users will notice if something is not right. Microsoft found that when getting Windows 8 ready for tablets, the performance of sensors was lacking in all these instances. The solution was to combine sensor output.
Microsoft is calling this approach sensor fusion, and it employs three different types of sensors. The accelerometer is used to measure the movement of the device based on gravity along three axes. A magnetometer (or digital compass) can measure magnetic field strength along three axes. Combining these two sensors in software would allow you to use 6-axis motion sensing to play a 2D game like Labyrinth. For 3D applications, Microsoft had to go further.
In the last few years, a third type of sensor started showing up in mobile devices: the gyroscope. A gyroscope is used to detect rotation along the three primary axes of the device. To get the best and smoothest orientation data on a mobile device, gyroscope data can be used to refine the signals from accelerometers and magnetometers. The result is the 9-axis sensor fusion system for Windows 8.
On Android, older devices had to make do with the data from just the first two sensors. It wasn’t until later that gyroscopes were used to mitigate the inherent noise allowing for more accurate orientation data. However, not all devices make use of this capability, and some don’t even have a gyroscope. Samsung makes more extensive use of gyro sensors in TouchWiz than most OEMs.
Apple has slowly been adding sensors over the years, and integrating them in a way not unlike Microsoft. The iPhone 3GS added a magnetometer, and the iPhone 4 added a gyroscope. With the iOSdeveloper APIs, apps can tap into all three sensors to get the best orientation data with the least interference.
Microsoft has worked in a few ways to make its sensor fusion system more than the sum of its parts. An app like a 3D game does not need to interpret the raw output of three sensors; it can rely on sensor fusion to mathematically clean up the data and pass it along. With the higher quality orientation data, apps can be more responsive, and react to natural motions better. Redmond has also developed hardware guidelines for OEMs to follow, ensuring the sensor packages they choose will work with the Microsoft drivers behind sensor fusion.
Read more at Building Windows 8