Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2010

    How to interpret data from rotation sensor on Symbian device?

    Hi everyone,

    So I have some troubles with interpreting data from rotation sensor on Symbian device: I've found example which displays x, y and z angles from rotation sensor on the screen using QRotationReading class, I built this example and launched it on N8 device, but I don't understand angle values... For example, if hold device vertically in portrait mode and then rotate by 45 degrees around normal vector of the screen (vector which is perpendicular to the screen), rotation sensor retrieves x=45 and y=45. Why? According to this documentation http://doc.qt.nokia.com/qtmobility-1...onreading.html these angles should be at least x=45 and y=90! Well, If rotate device from vertical position in portrait mode around screen's normal vector, angle values are changing from x=90, y=0 to x=0, y=90. Why is it so? Can someone explain it to me?

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009

    Re: How to interpret data from rotation sensor on Symbian device?

    Rotation data represents Euler angles
    and they are bit tricky in practise use as there are three rotations and each depends on previous rotations.
    There are other ways of describing rotations in 3D: rotation matrix and quaternions, which are considered to be easier in practical use.
    In you example you rotate phone around axis y, which is the last step in 3 step rotation according to Euler angles. As a result this rotation is expressed also through rotations around z and x axes before it goes to rotation around y. This reflects the fact that Euler angles describe rotation not in the simplest possible way, but rather concentrate on providing unique way of rotation representation.

    Also note that rotation is expressed from original position, where phone lies horizontally with screen facing the sky.
    Last edited by divanov; 2011-01-13 at 09:09.

  3. #3
    Registered User
    Join Date
    Jan 2012

    Re: How to interpret data from rotation sensor on Symbian device?

    Could you give more details on these rotations? I'm also having difficulties interpretating these angels.

    By your description, it seems, that we are talking about intrinsic rotations, which is not clear from documentation IMHO. Lets assume, that rotation angle z = 0, x = 15, y = 25. How should I interpret this?
    I could build a rotation matrix by first creating a rotation, Rx, about x-axis, 15 deg. Then rotate the y-axis with Rx , yr = Rx*y. Then create an rotation matrix Ry from the rotated y-axis, yr, and 25 deg. The complete rotation would then be:
    R = Ry*Rx
    This seems not to be correct, because if I rotate the vector [0 0 1]' by R, then I should get an vector pointing the same direction as the accellerometer reading, which it is not. What it it I'm missing?

Similar Threads

  1. Ignore Device rotation
    By pixsta in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-06-18, 09:58
  2. Rotation Sensor Data Interpretation
    By kanadkanhere in forum Symbian User Interface
    Replies: 3
    Last Post: 2010-03-28, 11:13
  3. N97 SDK, JSR256 sensor API, simulate a phone rotation...
    By sblantipodi in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2009-09-20, 21:20
  4. Sensor plugin accelerometer and rotation data
    By machiel in forum Symbian User Interface
    Replies: 16
    Last Post: 2009-09-08, 07:33
  5. N96 accelerometer calibration using the rotation sensor
    By Amatic in forum General Development Questions
    Replies: 0
    Last Post: 2009-02-27, 05:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts