Device Orientation

Hi,

We're using the orientationEvent (iOS API) to get notified when the device's orientation changes. However, we need to know the device's orientation more accurately. Is it possible to get the device's orientation in degrees, rather than the presets (MBLAccelerometerOrientationPortrait, MBLAccelerometerOrientationPortraitUpsideDown etc)?

Thanks,

Joe

Comments

  • Unfortunately, the accelerometer we use (BMI160) does not report angles, only portrait/landscape + front/back.
  • Ah, I see. 

    I have another question: is it possible to have the have the orientation changes reported for a different plane?
  • Any news on this? 
  • The orientation detection does not have any configuration options except a hysteresis setting.
  • I see. Thanks.
  • Each x,y,z output from the accelerometer will vary with angle of the accelerometer. You could map out the positions you need to know about and record the x,y,z output at each point.  There might be a sine/cosine wave that could also predict any angle from the output too, from reading I've done around this.

This discussion has been closed.