drivers replace math::Vector<3> with matrix::Vector3f

This commit is contained in:
Daniel Agar
2018-03-21 13:48:45 -04:00
parent e504dc86b7
commit 1b174eeca2
20 changed files with 97 additions and 88 deletions
+9
View File
@@ -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
+2 -2
View File
@@ -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