Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old February 2nd, 2012, 06:17 AM   #1 (permalink)
New Member
 
Join Date: Aug 2010
Posts: 8
 
Device(s):
Thanks: 1
Thanked 0 Times in 0 Posts
Default SensorManager.getRotationMatrix gravity parameter or accelerometer parameter values in android?

In Android Documentation is specified the third parameter as

float[] gravity
then is specifies

[0 0 g] = R * gravity (g = magnitude of gravity)
Now, in most of the examples online I can see everyone sending accelerometer values to getRotationMatrix, but, Isn't suppose that I should send only gravity values?

For example, if the mobile phone has the gravity sensor, Should I send it raw output to getRotationMatrix? If it hasn't one, Should I send accelerometer values? Should I extract non gravity components first? (as accelerometer values are Acceleration minus G).

Will the use of gravity sensor values be more reliable than using accelerometer values in mobile phones that have that sensor?

Thanks in advance! Guillermo.

polonskyg is offline  
Reply With Quote
Sponsors
Reply

Bookmarks

Tags
android, getrotationmatrix, sensorevent, sensors


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:25 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo