fixed some issues

added new pose/turn detections
new helper classes
define-flags for libEigen
This commit is contained in:
2018-09-04 10:49:00 +02:00
parent f990485d44
commit 857d7a1553
51 changed files with 2149 additions and 207 deletions

View File

@@ -3,20 +3,20 @@
#include <cmath>
#include <sstream>
#include "../../math/Floatingpoint.h"
/** data received from an accelerometer sensor */
struct GravityData {
float x;
float y;
float z;
FPDefault x;
FPDefault y;
FPDefault z;
GravityData() : x(0), y(0), z(0) {;}
GravityData(const float x, const float y, const float z) : x(x), y(y), z(z) {;}
float magnitude() const {
FPDefault magnitude() const {
return std::sqrt( x*x + y*y + z*z );
}
@@ -38,7 +38,7 @@ struct GravityData {
return GravityData(x-o.x, y-o.y, z-o.z);
}
GravityData operator / (const float val) const {
GravityData operator / (const FPDefault val) const {
return GravityData(x/val, y/val, z/val);
}
@@ -60,7 +60,7 @@ struct GravityData {
private:
static inline bool EQ_OR_NAN(const float a, const float b) {return (a==b) || ( (a!=a) && (b!=b) );}
static inline bool EQ_OR_NAN(const FPDefault a, const FPDefault b) {return (a==b) || ( (a!=a) && (b!=b) );}
};