huge commit

- worked on about everything
- grid walker using plugable modules
- wifi models
- new distributions
- worked on geometric data-structures
- added typesafe timestamps
- worked on grid-building
- added sensor-classes
- added sensor analysis (step-detection, turn-detection)
- offline data reader
- many test-cases
This commit is contained in:
2016-08-29 08:18:44 +02:00
parent 99ee95ce7b
commit a2c9e575a2
94 changed files with 8298 additions and 257 deletions

View File

@@ -92,6 +92,9 @@ struct Point3 {
return std::sqrt(dx*dx + dy*dy + dz*dz);
}
/** get a normalized copy */
Point3 normalized() const {return *this / this->length();}
float length() const {return std::sqrt(x*x + y*y + z*z);}
float length(const float norm) const {
@@ -109,4 +112,16 @@ private:
};
inline bool dot(const Point3& p1, const Point3& p2) {
return p1.x*p2.x + p1.y*p2.y + p1.z*p2.z;
}
inline Point3 cross(const Point3& a, const Point3& b) {
return Point3(
a.y*b.z - a.z*b.y,
a.z*b.x - a.x*b.z,
a.x*b.y - a.y*b.x
);
}
#endif // POINT3_H