diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-12-16 08:24:51 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-12-16 08:24:51 +0100 |
commit | 9520983e08397c453af735d0ff0736cc007c2c45 (patch) | |
tree | 171df31a96bd6863c5dfd94242274177f9413dd2 /src/lib/mathlib/math | |
parent | 9980e4482146333340cc105b560bdbd26acb999f (diff) | |
download | px4-firmware-9520983e08397c453af735d0ff0736cc007c2c45.tar.gz px4-firmware-9520983e08397c453af735d0ff0736cc007c2c45.tar.bz2 px4-firmware-9520983e08397c453af735d0ff0736cc007c2c45.zip |
lots' of header juggling and small changes to make mc att control compile for NuttX and ROS
Diffstat (limited to 'src/lib/mathlib/math')
-rw-r--r-- | src/lib/mathlib/math/Matrix.hpp | 12 | ||||
-rw-r--r-- | src/lib/mathlib/math/Vector.hpp | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/mathlib/math/Matrix.hpp b/src/lib/mathlib/math/Matrix.hpp index 806f5933a..1e76aae60 100644 --- a/src/lib/mathlib/math/Matrix.hpp +++ b/src/lib/mathlib/math/Matrix.hpp @@ -49,9 +49,8 @@ #ifdef CONFIG_ARCH_ARM #include "../CMSIS/Include/arm_math.h" #else -#include <math/eigen_math.h> +#include <platforms/ros/eigen_math.h> #include <Eigen/Eigen> -#define M_PI_2_F 1.5707963267948966192f #endif namespace math @@ -122,6 +121,15 @@ public: memcpy(data, d, sizeof(data)); } +#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__)) + /** + * set data from boost::array + */ + void set(const boost::array<float, 9ul> d) { + set(static_cast<const float*>(d.data())); + } +#endif + /** * access by index */ diff --git a/src/lib/mathlib/math/Vector.hpp b/src/lib/mathlib/math/Vector.hpp index 57b45e3ab..20f099831 100644 --- a/src/lib/mathlib/math/Vector.hpp +++ b/src/lib/mathlib/math/Vector.hpp @@ -49,7 +49,7 @@ #ifdef CONFIG_ARCH_ARM #include "../CMSIS/Include/arm_math.h" #else -#include <math/eigen_math.h> +#include <platforms/ros/eigen_math.h> #endif namespace math |