You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blackbox - IMU quaternion - fix case when w is negative (betaflight#14275)
quaternion w can ce negative, causing problem with unit quaternion
reconstruction. Send inverted quaternion in negative-w case (q and -q
are identical rotations)
STATIC_ASSERT(offsetof(quaternion_t, w) ==0, "Code expects quaternion in w, x, y, z order");
1254
-
blackboxCurrent->imuAttitudeQuaternion[i] =lrintf(imuAttitudeQuaternion.v[i+1] *0x7FFF); //Scale to int16 by value 0x7FFF = 2^15 - 1; Use i+1 index for x,y,z components access, [0] - w
0 commit comments