mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Yaw Inversion in quaternion_to_rpy
This commit is contained in:
parent
08d1dab047
commit
8be859bb36
1 changed files with 3 additions and 6 deletions
|
@ -505,12 +505,9 @@ void quaternion_to_rpy(const q4_t *q, rpy_t *o) // (degrees) yaw->pitch->roll or
|
|||
if ((y0 == 0) && (y1 == 0)) { o->y = 0.0f; } // atan(0,0)!
|
||||
else { o->y = atan2_approx(y0, y1); }
|
||||
}
|
||||
#ifdef NAZE
|
||||
o->y = -o->y; // yaw inversion hack for NAZE32
|
||||
#endif
|
||||
#ifdef SPARKY
|
||||
o->y = -o->y; // yaw inversion hack for SPARKY
|
||||
#endif
|
||||
|
||||
o->y = -o->y; // yaw inversion hack for all boards
|
||||
|
||||
}
|
||||
|
||||
void angle_vector(const q4_t *a, v3_t *o) // convert from quaternion to angle vector[rad]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue