About rotate screen use G-SENSOR

by lgbk » Mon, 17 May 2010 15:42:14 GMT


Sponsored Links
 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.

-- 



About rotate screen use G-SENSOR

by lgbk » Mon, 17 May 2010 17:28:26 GMT


 Some guys told me the sensor raw data is enough.So if it is right ,I
think the raw data I have covert and report successfull.So maybe I
forget some config in system.I also heared that I need config
something in init,rc but I didn,t know what need I add.Can anybody
told me or give me some suggestion,thanks!!!




-- 


Sponsored Links


Other Threads

1. Date&Time in LKM

Hi,

Currently I am writing a loadable kernel module. I want to printk the
current date and time. Is it possible? When I searched the net I only
found one explaining about do_gettimeofday() but it is not printing
out the actual date and time.

Thanks in Advance,
Perumal

2. Target suggestion to port Android

Hi all,

We have an activity to demonstrate porting of Android on any feasible
target. I am very much confused in selecting any reasonable target in
terms of cost and complexity.

Any good suggestions?

Ashish

3. java.util.TimerTask on android

4. Any way to go from an itermId to position in a ListView/Adapter

5. Timezone changed intent action received too many times

6. Anybody knows what the error: Error parsing keycodes w means?

7. To the moderators: why are my messages being deleted?