qtmobility/src/sensors/qrotationsensor.cpp
changeset 5 453da2cfceef
parent 4 90517678cc4f
child 8 71781823f776
equal deleted inserted replaced
4:90517678cc4f 5:453da2cfceef
    54     \brief The QRotationReading class represents one reading from the
    54     \brief The QRotationReading class represents one reading from the
    55            rotation sensor.
    55            rotation sensor.
    56 
    56 
    57     \section2 QRotationReading Units
    57     \section2 QRotationReading Units
    58 
    58 
    59     The rotation reading contains 3 angles, measured in degrees that define the orientation
    59     The rotation reading contains 3 angles, measured in degrees that define
    60     of the device in three-dimensional space. The three angles are applied to the device in the
    60     the orientation of the device in three-dimensional space. The rotations
    61     following order.
    61     should not be confused with relative rotations such as yaw and pitch.
       
    62     These rotations are of the devices axes relative to the external
       
    63     reference points that define the reference co-ordinate axes: X, Y and Z
       
    64     in the diagram.
       
    65     
       
    66     The three angles are applied to the device in the following order.
    62 
    67 
    63     \list
    68     \list
    64     \o Right-handed rotation z (-180, 180]. Starting from the x axis and incrementing towards the
    69     \o Right-handed rotation z (-180, 180]. Starting from the x-axis and
    65        y axis.
    70      incrementing in the direction of the y-axis.
    66     \o Right-handed rotation x (-90, 90]. Starting from the new (once-rotated) y axis and
    71     \o Right-handed rotation x [-90, 90]. Starting from the new
    67        incrementing towards the z axis.
    72      (once-rotated) y-axis and incrementing towards the z-axis.
    68     \o Right-handed rotation y (-180, 180]. Starting from the new (twice-rotated) z axis and
    73     \o Right-handed rotation y (-180, 180]. Starting from the new
    69        incrementing towards the x axis.
    74      (twice-rotated) z-axis and incrementing towards the x-axis.
    70     \endlist
    75     \endlist
    71 
    76 
    72     \image Rotation_angles.png Visual representation of the rotation angles.
    77     \image Rotation_angles.png Visual representation of the rotation angles.
    73 
    78 
    74     The 0 point for the z angle is defined as a fixed, external entity and is device-specific. While magnetic
    79     The 0 point for the z angle is defined as a fixed, external entity and
    75     north is typically used as this reference point it may not be. Do not attempt to compare values
    80     is device-specific. While magnetic North is typically used as this
    76     for the z angle between devices or even on the same device if it has moved a significant distance.
    81     reference point it may not be. Do not attempt to compare values
    77     If the device cannot detect a fixed, external entity the z angle will always be 0 and the
    82     for the z angle between devices or even on the same device if it has
    78     QRotationSensor::hasZ property will be set to false.
    83     moved a significant distance.
    79 
    84     
    80     The 0 point for the x and y angles are defined as when the x and y axes of the device are oriented
    85     If the device cannot detect a fixed, external entity the z angle will
    81     towards the horizon.
    86     always be 0 and the QRotationSensor::hasZ property will be set to false.
       
    87 
       
    88     The 0 point for the x and y angles are defined as when the x and y axes
       
    89     of the device are oriented towards the horizon.
       
    90 
       
    91     Note that when x is 90 or -90, values for z and y achieve rotation around
       
    92     the same axis (due to the order of operations). In this case the y
       
    93     rotation will be 0.
    82 */
    94 */
    83 
    95 
    84 /*!
    96 /*!
    85     \property QRotationReading::x
    97     \property QRotationReading::x
    86     \brief the rotation around the x axis.
    98     \brief the rotation around the x axis.