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

@@ -28,6 +28,19 @@ TEST(Angle, calc) {
}
TEST(Angle, signedDiff) {
const float d = 0.00001f;
ASSERT_NEAR(+M_PI/2, Angle::getSignedDiffRAD_2PI(0, M_PI/2), d); // CCW
ASSERT_NEAR(-M_PI/2, Angle::getSignedDiffRAD_2PI(M_PI/2, 0), d); // CW -> negative
ASSERT_NEAR(+M_PI/2, Angle::getSignedDiffRAD_2PI(M_PI/2, M_PI), d); // CCW
ASSERT_NEAR(-M_PI/2, Angle::getSignedDiffRAD_2PI(M_PI, M_PI/2), d); // CW -> negative
ASSERT_NEAR(-M_PI/2, Angle::getSignedDiffRAD_2PI(0, M_PI*1.5), d); // CW -> negative
}
TEST(Angle, diff) {
const float r = Angle::getRAD_2PI(0,0, +1,0); // to the right

View File

@@ -26,6 +26,16 @@ TEST(Heading, diff) {
}
TEST(Heading, mod) {
const float d = 0.0001;
Heading h1(+0); h1 += 3.1415; ASSERT_NEAR(3.1415, h1.getRAD(), d);
Heading h2(+4); h2 += 3; ASSERT_NEAR(7 - 2*M_PI, h2.getRAD(), d);
Heading h3(+0); h3 -= 3; ASSERT_NEAR(2*M_PI-3, h3.getRAD(), d);
}
TEST(Heading, ctor) {
// OK