The Sensor Data Compensator provides APIs to correct sensor data, based on device or display orientation. That is, using the APIs, the coordinate system can be adjusted appropriately to get correct sensor axis data in relation to the Symbian device user's current display orientation.
The sensor channel APIs retrieve coordinate information and angle data from different sensors when a display or device orientation change is detected. The data is bound to the device form factor and hardware configuration using device based coordinate system. Using the data, the sensor data compensator APIs can adjust the coordinate system to match the changed system characteristics. This procedure is called sensor data compensation.
For example, if a display orientation change (as illustrated in the following figure) is detected, the accelerometer sensor provides axis data using the device base coordinate system. To convert the axis data to match the current display orientation, sensor data compensator APIs can be used. The data compensator APIs enable you to adjust the coordinate system to match the changed system characteristics.
To convert the sensor data to the compensated values, the adjustment values (for example, interchanged x-axis with y-axis) for each device state that the compensation is applied to, must be configured and taken as an input for calculations.
The following example explains how the sensor data compensation works, by illustrating the behavior of maps application of the Symbian device when the keyboard is in opened and closed state.
|Symbian device position||Symbian device movement||Application behavior|
|The keyboard is closed and the display is upward and parallel with the table surface||The Symbian device spins around the z-axis||The compass needle points to the north and the map does not move on the screen.|
|The keyboard is opened and the display is upward and parallel with the table surface||The Symbian device spins around the z-axis||The compass needle points to the north and the map is always in the north-south direction on the screen.|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.