4

This proram is to detect values of the gyroscope (Roll, Pitch and Yaw).

Please i want to know what is the max and Min values of Roll, Pitch and Yaw. (Values of Gyroscope)


Initialising :

[[UIAccelerometer sharedAccelerometer] setUpdateInterval:0.2f];

[[UIAccelerometer sharedAccelerometer] setDelegate:self];

motionManager = [[CMMotionManager alloc] init];

motionManager.accelerometerUpdateInterval = 0.01; // 100Hz

motionManager.deviceMotionUpdateInterval = 0.01; // 100Hz

[motionManager startDeviceMotionUpdates];


motionManager.deviceMotion.attitude.roll // Max and Min Value ?

motionManager.deviceMotion.attitude.yaw // Max and Min Value ?

motionManager.deviceMotion.attitude.Pitch // Max and Min Value ?

And how to pass to the Values -> Degree ?

Thanks

Joe
  • 447
  • 12
  • 25
  • Could you possibly put a little bit more effort into your question and add one or two complete sentences to make it understandable? – Till Feb 04 '12 at 18:25
  • Sorry for my english, i am Frensh, ask me question and i will try to explaine it for you :) – Joe Feb 04 '12 at 23:32

1 Answers1

7

This is the solution :

if you put

#define degrees(x) (180 * x / M_PI)

Then the values in Degree :

Vroll = degrees(motionManager.deviceMotion.attitude.roll);
Vyaw  = degrees(motionManager.deviceMotion.attitude.yaw);
Vpitch= degrees(motionManager.deviceMotion.attitude.pitch);

So :

Vroll Min : -180°, Max : 180°

Vyaw Min : -180°, Max : 180°

Vpitch Min : -90°, Max : 90°

Thanks stackoverflow :)

Community
  • 1
  • 1
Joe
  • 447
  • 12
  • 25