mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 03:03:34 +08:00
drivers replace math::Vector<3> with matrix::Vector3f
This commit is contained in:
@@ -50,6 +50,15 @@ get_rot_matrix(enum Rotation rot, math::Matrix<3, 3> *rot_matrix)
|
||||
rot_matrix->from_euler(roll, pitch, yaw);
|
||||
}
|
||||
|
||||
__EXPORT matrix::Dcmf
|
||||
get_rot_matrix(enum Rotation rot)
|
||||
{
|
||||
return matrix::Dcmf{matrix::Eulerf{
|
||||
math::radians((float)rot_lookup[rot].roll),
|
||||
math::radians((float)rot_lookup[rot].pitch),
|
||||
math::radians((float)rot_lookup[rot].yaw)}};
|
||||
}
|
||||
|
||||
#define HALF_SQRT_2 0.70710678118654757f
|
||||
|
||||
__EXPORT void
|
||||
|
||||
@@ -133,9 +133,9 @@ const rot_lookup_t rot_lookup[] = {
|
||||
/**
|
||||
* Get the rotation matrix
|
||||
*/
|
||||
__EXPORT void
|
||||
get_rot_matrix(enum Rotation rot, math::Matrix<3, 3> *rot_matrix);
|
||||
__EXPORT void get_rot_matrix(enum Rotation rot, math::Matrix<3, 3> *rot_matrix);
|
||||
|
||||
__EXPORT matrix::Dcmf get_rot_matrix(enum Rotation rot);
|
||||
|
||||
/**
|
||||
* rotate a 3 element float vector in-place
|
||||
|
||||
Reference in New Issue
Block a user