Symbian3/SDK/Source/GUID-92AD13DF-216A-4B5A-9C6D-5FA50BB0D692.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-92AD13DF-216A-4B5A-9C6D-5FA50BB0D692" xml:lang="en"><title>Sensor
       
    13 Data Compensator Overview</title><shortdesc>The Sensor Data Compensator provides APIs to correct sensor data,
       
    14 based on device or display orientation. That is, using the APIs, the coordinate
       
    15 system can be adjusted appropriately to get correct sensor axis data in relation
       
    16 to the Symbian device user's current display orientation.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    17 <section id="GUID-173CC4BB-4C2D-43B0-9ADD-85C716B9297B"><title>Description</title> 
       
    18      <p>The sensor channel APIs retrieve coordinate information and angle
       
    19 data from different sensors when a display or device orientation change is
       
    20 detected. The data is bound to the device form factor and hardware configuration
       
    21 using device based coordinate system. Using the data, the sensor data compensator
       
    22 APIs can adjust the coordinate system to match the changed system characteristics.
       
    23 This procedure is called sensor data compensation. </p><p>For example, if
       
    24 a display orientation change (as illustrated in the following figure) is detected,
       
    25 the accelerometer sensor provides axis data using the device base coordinate
       
    26 system. To convert the axis data to match the current display orientation,
       
    27 sensor data compensator APIs can be used. The data compensator APIs enable
       
    28 you to adjust the coordinate system to match the changed system characteristics.</p><fig id="GUID-CB810DA3-6532-47DF-878E-A0D8A07ACC7C">
       
    29 <title>Example to illustrate adjustment of the coordinate system due to device
       
    30 orientation change</title>
       
    31 <image href="GUID-24B8686D-727A-47A8-B01D-1BA1FBC8F771_d0e135898_href.png" placement="inline"/>
       
    32 </fig><p>To convert the sensor data to the compensated values, the adjustment
       
    33 values (for example, interchanged x-axis with y-axis) for each device state
       
    34 that the compensation is applied to, must be configured and taken as an input
       
    35 for calculations.</p><fig id="GUID-15844543-6586-43AE-87C8-B90A4D24404D">
       
    36 <title>Correcting the coordinate system of a Symbian device</title>
       
    37 <desc>The figure depicts the correction of coordinate system in the Symbian
       
    38 device</desc>
       
    39 <image href="GUID-BF822A89-F932-400F-82FC-FB998B768EBF_d0e135910_href.png" placement="inline"/>
       
    40 </fig><p>The following example explains how the sensor data compensation works,
       
    41 by illustrating the behavior of maps application of the Symbian device when
       
    42 the keyboard is in opened and closed state. </p><table id="GUID-6CF1E7CE-0076-415F-BF6A-E92034B6F6D4">
       
    43 <tgroup cols="3"><colspec colname="col1"/><colspec colname="col2"/><colspec colname="col3"/>
       
    44 <thead>
       
    45 <row>
       
    46 <entry valign="top">Symbian device position</entry>
       
    47 <entry valign="top">Symbian device movement</entry>
       
    48 <entry valign="top">Application behavior</entry>
       
    49 </row>
       
    50 </thead>
       
    51 <tbody>
       
    52 <row>
       
    53 <entry>The keyboard is closed and the display is upward and parallel with
       
    54 the table surface</entry>
       
    55 <entry>The Symbian device spins around the z-axis</entry>
       
    56 <entry>The compass needle points to the north and the map does not move on
       
    57 the screen.</entry>
       
    58 </row>
       
    59 <row>
       
    60 <entry>The keyboard is opened and the display is upward and parallel with
       
    61 the table surface</entry>
       
    62 <entry>The Symbian device spins around the z-axis</entry>
       
    63 <entry>The compass needle points to the north and the map is always in the
       
    64 north-south direction on the screen.</entry>
       
    65 </row>
       
    66 </tbody>
       
    67 </tgroup>
       
    68 </table> </section>
       
    69 <section id="GUID-983C07BB-4B1A-4030-A533-22728BDCF281"><title>APIs</title><table id="GUID-B0112D3A-0CCB-47FF-BF2C-6DC4EE1217A7">
       
    70 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
       
    71 <thead>
       
    72 <row>
       
    73 <entry>API</entry>
       
    74 <entry>Description</entry>
       
    75 </row>
       
    76 </thead>
       
    77 <tbody>
       
    78 <row>
       
    79 <entry>CSensorDataCompensator</entry>
       
    80 <entry>The sensor data compensator class provides functions to
       
    81 compensate sensor data.</entry>
       
    82 </row>
       
    83 </tbody>
       
    84 </tgroup>
       
    85 </table></section>
       
    86 <section id="GUID-E046AE53-A268-4085-8BF4-293873115857"><title>Typical Uses</title><ul>
       
    87 <li><p><xref href="GUID-64AC6F53-A9A5-46FD-BCC6-4A9BD8D4DB5C.dita">Compensating
       
    88 Sensor Data</xref></p></li>
       
    89 </ul></section>
       
    90 </conbody></concept>