MCPcopy Create free account
hub / github.com/aster94/SensorFusion / computeAngles

Method computeAngles

src/SensorFusion.cpp:71–77  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

69
70//-------------------------------------------------------------------------------------------
71void SF::computeAngles()
72{
73 roll = atan2f(q0*q1 + q2*q3, 0.5f - q1*q1 - q2*q2);
74 pitch = asinf(-2.0f * (q1*q3 - q0*q2));
75 yaw = atan2f(q1*q2 + q0*q3, 0.5f - q2*q2 - q3*q3);
76 anglesComputed = 1;
77}
78
79
80

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected