objective c - Transforming Pitch and Roll values in iOS -


i have been trying compare pitch , roll pattern (2 second recording) readings.

what have done record pitch , roll values 10 seconds. in 10 seconds similar motion applied device.

when plot these on graph, values same.

this happens when providing motion device same orientation/position. example, device lying down on table , motion provided device. readings same.

but if device rotate 180 deg. ccw, readings inverted.

is there way can achieve same reading every position? via applying transformation formula? have done acceleration values using pitch roll , yaw. but, don't know how achieve pitch , roll itself.

basically, want achieve pitch , roll values should independent of yaw.

here plot pitch values.. readings same expect 2 starting 1.5 in graph. these 2 times when device rotated 180 deg. ccw

enter image description here

update:

i tried store cmattitude in nsuserdefaults , applied multiplybyinverseofattitude. still graph plot inverse.

cmattitude *currentatt = motion.attitude;

        if (firstattitude)//firstattitude stored cmattitude         {             [currentatt multiplybyinverseofattitude:firstattitude];         }          cmquaternion quat = currentatt.quaternion;  

enter image description here


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -