mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 09:01:36 +08:00
ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters (#13249)
* Conversions lib: add quaternion getter * vehicle_status: add flag is_vtol_tailsitter * ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters
This commit is contained in:
committed by
Julian Oes
parent
380cae18d1
commit
8f910f8435
@@ -50,6 +50,15 @@ get_rot_matrix(enum Rotation rot)
|
||||
math::radians((float)rot_lookup[rot].yaw)}};
|
||||
}
|
||||
|
||||
__EXPORT matrix::Quatf
|
||||
get_rot_quaternion(enum Rotation rot)
|
||||
{
|
||||
return matrix::Quatf{matrix::Eulerf{
|
||||
math::radians((float)rot_lookup[rot].roll),
|
||||
math::radians((float)rot_lookup[rot].pitch),
|
||||
math::radians((float)rot_lookup[rot].yaw)}};
|
||||
}
|
||||
|
||||
__EXPORT void
|
||||
rotate_3f(enum Rotation rot, float &x, float &y, float &z)
|
||||
{
|
||||
|
||||
@@ -136,8 +136,14 @@ const rot_lookup_t rot_lookup[] = {
|
||||
/**
|
||||
* Get the rotation matrix
|
||||
*/
|
||||
__EXPORT matrix::Dcmf
|
||||
get_rot_matrix(enum Rotation rot);
|
||||
|
||||
__EXPORT matrix::Dcmf get_rot_matrix(enum Rotation rot);
|
||||
/**
|
||||
* Get the rotation quaternion
|
||||
*/
|
||||
__EXPORT matrix::Quatf
|
||||
get_rot_quaternion(enum Rotation rot);
|
||||
|
||||
/**
|
||||
* rotate a 3 element float vector in-place
|
||||
|
||||
Reference in New Issue
Block a user