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

@@ -27,25 +27,53 @@ public:
Assert::isBetween(rad, 0.0f, (float)_2PI, "radians out of bounds");
}
/** angular difference [0:PI] */
/** POSITIVE angular difference [0:PI] */
float getDiffHalfRAD(const Heading other) const {
return Angle::getDiffRAD_2PI_PI(rad, other.rad);
}
/** signled angular difference [-PI:+PI] */
float getSignedDiff(const Heading other) const {
return Angle::getSignedDiffRAD_2PI(rad, other.rad);
}
/** update the angle but ensure we stay within [0:2PI] */
Heading& operator += (const float _rad) {
Assert::isBetween(_rad, float(-_2PI*0.99), float(+_2PI*0.99), "radians out of bounds");
// Assert::isBetween(_rad, float(-_2PI*0.999), float(+_2PI*0.999), "radians out of bounds");
// Assert::isBetween(_rad, float(-_2PI), float(+_2PI), "radians out of bounds");
rad += _rad;
if (rad >= _2PI) {rad -= _2PI;}
else if (rad < 0) {rad += _2PI;}
while (rad >= _2PI) {rad -= _2PI;}
while (rad < 0) {rad += _2PI;}
return *this;
}
/** update the angle but ensure we stay within [0:2PI] */
Heading& operator -= (const float _rad) {
return *this += (-_rad);
}
/** update the angle but ensure we stay within [0:2PI] */
Heading operator + (const float _rad) const {
return (Heading(*this) += _rad);
}
/** update the angle but ensure we stay within [0:2PI] */
Heading operator - (const float _rad) const {
return (Heading(*this) -= _rad);
}
/** update the angle but ensure we stay within [0:2PI] */
Heading operator - (const Heading head) const {
return *this - head.rad;
}
/** update the angle but ensure we stay within [0:2PI] */
Heading operator + (const Heading head) const {
return *this + head.rad;
}
Heading& operator = (const float _rad) {
rad = _rad;
return *this;