Question

Windows 8 provides various sensors for Windows Store apps. One of them is the OrientationSensor. I don't really understand what it does, or rather how it differs from the Inclinometer.

MSDN has a rather short explanation:

This sensor returns a rotation matrix and a Quaternion that can be used to adjust the user's perspective in a game application.

So, it returns a mathematical representation of a 3D rotation that (presumably?) corresponds to the device orientation. But the Inclinometer essentially does the same, albeit with a different mathematical representation:

This sensor returns pitch, roll, and yaw values that correspond to rotation angles around the x, y, and z axes, respectively.

I understand that matrices and quaternions are preferable in some situations, and that they avoid gimbal lock. But the Inclinometer could provide that, too. Why are there two sensors for this? What's the difference between them?

Was it helpful?

Solution

Warning: I am no expert on the topic, and my answer might be inaccurate, or downright wrong.

Looks like they're both sensor fusions of h/w sensors- accelerometer, gyro, and magnetometer. (https://blogs.msdn.com/b/b8/archive/2012/01/24/supporting-sensors-in-windows-8.aspx)

According to http://msdn.microsoft.com/library/windows/apps/hh465294.aspx, "Developers typically use this data to control complex games."

Also, http://msdn.microsoft.com/en-US/library/windows/apps/hh465282.aspx says that

The mathematics behind quaternions is fairly exotic in that it involves the geometric properties of complex numbers and mathematical properties of imaginary numbers, but working with them is simple, and frameworks like DirectX support them."

It seems that OrientationSensor is a convenience API for those few cases where it indeed proves to be convenient.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top