Hi all,
  I'm debuging my gsensor in my devices.And now in my sensor HAL layer
code ,I return two types data.(ID_ACCELERATION and ID_ORIENTATION).I'm
confused how covert x,y,z data to pitch,roll.....In my code I use
                  pitch = atan(sensors.acceleration.y/
sensors.acceleration.z)*360/M_PI;
                  roll = atan(sensors.acceleration.x/
sensors.acceleration.z)*180/M_PI;
                  sensors.orientation.azimuth = 0.0;
But it seems have some error.Now I can not rotate my screen
automaitic,but can play some g-sensor game,like(labyrinthfull.apk).So
my question is that ,if I want to rotate screen automatic,which data
the system need to use?x,y,z? or pitch roll azimuth? or antoher data?
Can somebody show me some example,thanks.Any suggestion is appracite.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to