As seen in the picture above, I am trying to get an angle from the bno055 IMU but when I run the arctan function it doesn't reveal the angle. What am I doing wrong?
I do not think atan() a built in function. Maybe:
Angle = val * 180 / PI;
If you post code as a picture then people can't try it themselves. Always post code correctly.
You may want to read this before you proceed:-
how to get the best out of this forum
Have you tried atan2()
atan() returns the angle in radians
as @Grumpy_Mike pointed out look at atan2()
Thanks for the help but it says it is expecting two values for atan2() what would those be?
https://www.cplusplus.com/reference/cmath/atan2/
Why might the ratio of two orientation angles, about different axes, be useful or interesting?
double val = euler.y()/euler.x();
Introduction to Euler angles: Euler angles - Wikipedia
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
