Hi guys I'm having a pitch roll understanding problem. attached is the image(pitchroll.jpg) of my perception.
should pitch/roll range from 0-360degrees, or +-180degrees?
well i used atan2(x,z) to obtain pitch, but due to the discontinuity of atan2 function, there will be a jump from -180 to 180 degrees. if i shifted the range to 360degrees, then they'll be a jump from 0 to 360degrees when you tilt in the negative direction.
the other image(tilt.jpg) which i googled online shifts pitch/roll to the 4 quadrants, hence the max of pitch and roll is 90degrees each. using this solution, for example if your vehicle rolls 110 degrees from the right, your acclerometer will interpret it as a roll of 70degrees.
sighs i'm so confused. hopefully i did not confuse you guys. how did you do your pitch and rolls?