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

@@ -40,6 +40,18 @@ public:
return (tmp <= M_PI) ? (tmp) : (2*M_PI-tmp);
}
/**
* gets the angular difference between
* - the given radians [0:2PI]
* - as a change-in-direction between [-PI:+PI]
*/
static float getSignedDiffRAD_2PI(const float r1, const float r2) {
Assert::isBetween(r1, 0.0f, (float)(2*M_PI), "r1 out of bounds");
Assert::isBetween(r2, 0.0f, (float)(2*M_PI), "r2 out of bounds");
const float a1 = (r2-r1);
if (std::abs(a1) < M_PI) {return a1;} else {return (M_PI-a1);}
}
/** convert degrees to radians */
static constexpr float degToRad(const float deg) {
return deg / 180.0f * M_PI;