We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9630fb9 commit c63969cCopy full SHA for c63969c
src/MadgwickAHRS.h
@@ -46,6 +46,9 @@ class Madgwick{
46
//float getPitch(){return atan2f(2.0f * q2 * q3 - 2.0f * q0 * q1, 2.0f * q0 * q0 + 2.0f * q3 * q3 - 1.0f);};
47
//float getRoll(){return -1.0f * asinf(2.0f * q1 * q3 + 2.0f * q0 * q2);};
48
//float getYaw(){return atan2f(2.0f * q1 * q2 - 2.0f * q0 * q3, 2.0f * q0 * q0 + 2.0f * q1 * q1 - 1.0f);};
49
+ float* getQuaternion() {
50
+ return {q0,q1,q2,q3};
51
+ }
52
float getRoll() {
53
if (!anglesComputed) computeAngles();
54
return roll * 57.29578f;
0 commit comments