79768799

Date: 2025-09-18 18:27:03
Score: 1
Natty:
Report link

The problemn you are facing is from the type of sensor you are using, the acelerometer will use the gravity to estimate the angle.
For example, lets say Z+ is equivalent to UP, Y+ is to Front and X+ is to Right.
The pitch angle 0º would be 10g at the axel Z+.
The pitch angle 90º would be 10g at Y+.
The pitch angle -90º would be 10g at Y-.

The problemn is when derivate the math behind you eventually will come across a tangent. the equation would be something like (arctan( Ay/Az)), that is, you can only get angles beetween -90 to +90.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: David Amato Mantegari